By Jonathan Corbet
August 29, 2011
On September 9, 2010, Broadcom
announced
that it was releasing an open source driver for its wireless networking
chipsets. Broadcom had long resisted calls for free drivers for this
hardware, so this announcement was quite well received in the community,
despite the fact that the quality of the code itself was not quite up to
contemporary kernel standards. One year later, this driver is again under
discussion, but the tone of the conversation has changed somewhat.
After a year of work, Broadcom's driver may never see a mainline release.
Broadcom's submission was actually two drivers: brcmsmac for software-MAC
chipsets, and brcmfmac for "FullMAC" chipsets with hardware MAC support.
These drivers were immediately pulled into the staging tree with the understanding that
there were a lot of things needing fixing before they could make the
move to the mainline proper. In the following year, developers dedicated
themselves to the task of cleaning up the drivers; nearly 900 changes have
been merged in this time. The bulk of the changes came from Broadcom
employees, but quite a few others have contributed fixes to the drivers as
well.
This work has produced a driver that is free of checkpatch warnings, works
on both small-endian and big-endian platforms, uses kernel libraries where
appropriate, and generally looks much better than it originally did. On
August 24, Broadcom developer Henry Ptasinski decided that the time had
come: he posted a patch moving the Broadcom
drivers into the mainline. Greg Kroah-Hartman, maintainer of the staging
tree, said that he was fine with the driver
moving out of staging if the networking developers agreed. Some of those
developers came up with some technical issues, but it appeared that these
drivers were getting close to ready to make the big move out of staging.
That was when Rafał Miłecki chimed
in: "Henry: a simple question, please explain it to me, what
brcmsmac does provide that b43 doesn't?" Rafał, naturally, is
the maintainer of the b43 driver; b43, which has been in the mainline for
years, is a driver for Broadcom chipsets developed primarily from
reverse-engineered information. It has reached a point where, Rafał
claims, it supports everything Broadcom's driver does with one exception
(BCM4313 chipsets) that will be fixed
soon. Rafał also claims that the b43 driver performs better, supports hardware that brcmsmac does not, and
is, in general, a better piece of code.
So Rafał was clear on what he thought of the brcmsmac driver (brcmfmac
didn't really enter into the discussion); he was
also quite clear on what he would like to
see happen:
We would like to have b43 supported by Broadcom. It sounds much
better, I've shown you a lot of advantages of such a
choice. Switching to brcmsmac on the other hand needs a lot of work
and improvements.
On one hand, Rafał is in a reasonably strong position. The b43 driver
is in the mainline now; there is, in general, a strong resistance to the
merging of duplicate drivers for the same hardware. Code quality is, to
some extent, in the eye of the beholder, but there have been few beholders
who have gone on record to say that they like Broadcom's driver better.
Looking at the situation with an eye purely on the quality of the kernel's
code base in the long term, it is hard to make an argument that the
brcmsmac driver should move into the mainline.
On the other hand, if one considers the feelings of developers and the
desire to have more hardware companies supporting their products with
drivers in the Linux kernel, one has to ask why Broadcom was allowed to put
this driver into staging and merge hundreds of patches improving it if that
driver was never going to make it into the mainline. Letting Broadcom
invest that much work into its driver, then asking it to drop everything
and support the reverse-engineered driver that it declined to support one
year ago seems harsh. It's not a story that is likely to prove
inspirational for developers in other companies who are considering trying
to work more closely with the kernel community.
What seems to have happened here (according mainly to a history posted by Rafał, who is not a
disinterested observer) is that, one year ago, the brcmsmac driver
supported hardware that had no support in b43. Since then, b43 has gained
support for that additional hardware; nobody objected to the addition of
duplicated driver support at that time (as one would probably expect, given
that the Broadcom driver was in staging). Rafał doesn't say whether
the brcmsmac driver was helpful to him in filling out hardware support in
the b43 driver. In the end, it doesn't matter; it would appear that the
need for brcmsmac has passed.
One of the most important lessons for kernel developers to learn is that
one should focus on the end result rather than on the merging of a specific
piece of code. One can argue that Broadcom has what it wanted now: free
driver support for its hardware in the mainline kernel. One could also
argue that Broadcom should have worked on adding support to b43 from the
beginning rather than posting a competing driver. Or, failing that, one
could say that the Broadcom developers should have noticed the improvements
going into b43 and thought about the implications for their own work.
But none of that is
going to make the Broadcom developers feel any better about how things have
turned out. They might come around to working on b43, but one expects that
it is not a hugely appealing alternative at the moment.
The kernel process can be quite wasteful - in terms of code and developer
time lost - at times. Any kernel developer who has been in the community
for a significant time will have invested significant time into code that
went straight into the bit bucket at some time or other. But that doesn't
mean that this waste is good or always necessary. There would be value in
finding more reliable ways to warn developers when they are working on code
that is unlikely to be merged. Kernel development is distributed, and
there are no managers paying attention to how developers spend their time;
it works well in general, but it can lead to situations where
developers work at cross purposes and somebody, eventually, has to lose
out.
That would appear to have happened here. In the short term, the kernel and
its users have come out ahead: we have a choice of drivers for Broadcom
wireless chipsets and can pick the best one to carry forward. Even
Broadcom can be said to have come out ahead if it gains better support for
its hardware under Linux. Whether we will pay a longer-term cost in
developers who conclude that the kernel community is too hard to work with
is harder to measure. But it remains true that the kernel community can,
at times, be a challenging place to work.
(
Log in to post comments)