* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
@ 2011-01-07 18:48 Michael Büsch
2011-11-09 11:14 ` David Woodhouse
0 siblings, 1 reply; 7+ messages in thread
From: Michael Büsch @ 2011-01-07 18:48 UTC (permalink / raw)
To: John Linville; +Cc: Larry Finger, linux-wireless, b43-dev
Some Broadcom based wireless devices contain dangling ethernet cores.
This triggers the ssb probing mechanism and tries to load the b44 driver
on this core.
Ignore the dangling core in the ssb core scanning code to avoid
access to the core and failure of b44 probing.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Does not need to go into stable, because probing of that core
doesn't hurt except for failure messages in the logs.
Index: linux-2.6.37/drivers/ssb/scan.c
===================================================================
--- linux-2.6.37.orig/drivers/ssb/scan.c 2011-01-07 15:35:10.518000002 +0100
+++ linux-2.6.37/drivers/ssb/scan.c 2011-01-07 15:45:54.231998930 +0100
@@ -420,6 +420,16 @@
bus->pcicore.dev = dev;
#endif /* CONFIG_SSB_DRIVER_PCICORE */
break;
+ case SSB_DEV_ETHERNET:
+ if (bus->bustype == SSB_BUSTYPE_PCI) {
+ if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
+ (bus->host_pci->device & 0xFF00) == 0x4300) {
+ /* This is a dangling ethernet core on a
+ * wireless device. Ignore it. */
+ continue;
+ }
+ }
+ break;
default:
break;
}
--
Greetings Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-01-07 18:48 [PATCH] ssb: Ignore dangling ethernet cores on wireless devices Michael Büsch
@ 2011-11-09 11:14 ` David Woodhouse
2011-11-09 11:50 ` Gábor Stefanik
0 siblings, 1 reply; 7+ messages in thread
From: David Woodhouse @ 2011-11-09 11:14 UTC (permalink / raw)
To: Michael Büsch; +Cc: John Linville, linux-wireless, b43-dev, Larry Finger
On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>
> + case SSB_DEV_ETHERNET:
> + if (bus->bustype == SSB_BUSTYPE_PCI) {
> + if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
> + (bus->host_pci->device & 0xFF00) == 0x4300) {
> + /* This is a dangling ethernet core on a
> + * wireless device. Ignore it. */
> + continue;
> + }
> + }
> + break;
Do you also need to check for (bus->host_pci->device / 1000) == 43?
Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
Would it be better to invert the test and check for != 0x4400?
--
dwmw2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20111109/c750bf6b/attachment.bin>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-11-09 11:14 ` David Woodhouse
@ 2011-11-09 11:50 ` Gábor Stefanik
2011-11-09 11:51 ` Gábor Stefanik
0 siblings, 1 reply; 7+ messages in thread
From: Gábor Stefanik @ 2011-11-09 11:50 UTC (permalink / raw)
To: David Woodhouse
Cc: Michael Büsch, John Linville, linux-wireless, b43-dev,
Larry Finger
On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse <dwmw2@infradead.org> wrote:
> On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>>
>> + ? ? ? ? ? ? ? case SSB_DEV_ETHERNET:
>> + ? ? ? ? ? ? ? ? ? ? ? if (bus->bustype == SSB_BUSTYPE_PCI) {
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (bus->host_pci->device & 0xFF00) == 0x4300) {
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* This is a dangling ethernet core on a
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* wireless device. Ignore it. */
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? continue;
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
>> + ? ? ? ? ? ? ? ? ? ? ? }
>> + ? ? ? ? ? ? ? ? ? ? ? break;
>
> Do you also need to check for (bus->host_pci->device / 1000) == 43?
> Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
>
> Would it be better to invert the test and check for != 0x4400?
I do not know of any Broadcom wireless device with a decimal PCI ID
(as opposed to a decimal Chip ID).
>
> --
> dwmw2
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-11-09 11:50 ` Gábor Stefanik
@ 2011-11-09 11:51 ` Gábor Stefanik
2011-11-09 12:16 ` Jonas Gorski
0 siblings, 1 reply; 7+ messages in thread
From: Gábor Stefanik @ 2011-11-09 11:51 UTC (permalink / raw)
To: David Woodhouse
Cc: Michael Büsch, John Linville, linux-wireless, b43-dev,
Larry Finger
On Wed, Nov 9, 2011 at 12:50 PM, G?bor Stefanik <netrolller.3d@gmail.com> wrote:
> On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse <dwmw2@infradead.org> wrote:
>> On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>>>
>>> + ? ? ? ? ? ? ? case SSB_DEV_ETHERNET:
>>> + ? ? ? ? ? ? ? ? ? ? ? if (bus->bustype == SSB_BUSTYPE_PCI) {
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (bus->host_pci->device & 0xFF00) == 0x4300) {
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* This is a dangling ethernet core on a
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* wireless device. Ignore it. */
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? continue;
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
>>> + ? ? ? ? ? ? ? ? ? ? ? }
>>> + ? ? ? ? ? ? ? ? ? ? ? break;
>>
>> Do you also need to check for (bus->host_pci->device / 1000) == 43?
>> Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
>>
>> Would it be better to invert the test and check for != 0x4400?
>
> I do not know of any Broadcom wireless device with a decimal PCI ID
> (as opposed to a decimal Chip ID).
Edit: However, 0x4700 should also be checked, as some BCM43xx chips
use 0x47xx PCI IDs.
>
>>
>> --
>> dwmw2
>>
>
>
>
> --
> Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
>
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-11-09 11:51 ` Gábor Stefanik
@ 2011-11-09 12:16 ` Jonas Gorski
2011-11-09 13:53 ` Larry Finger
0 siblings, 1 reply; 7+ messages in thread
From: Jonas Gorski @ 2011-11-09 12:16 UTC (permalink / raw)
To: Gábor Stefanik
Cc: David Woodhouse, Michael Büsch, John Linville,
linux-wireless, b43-dev, Larry Finger
On 9 November 2011 12:51, G?bor Stefanik <netrolller.3d@gmail.com> wrote:
> On Wed, Nov 9, 2011 at 12:50 PM, G?bor Stefanik <netrolller.3d@gmail.com> wrote:
>> On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse <dwmw2@infradead.org> wrote:
>>> On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>>>>
>>>> + ? ? ? ? ? ? ? case SSB_DEV_ETHERNET:
>>>> + ? ? ? ? ? ? ? ? ? ? ? if (bus->bustype == SSB_BUSTYPE_PCI) {
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM &&
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (bus->host_pci->device & 0xFF00) == 0x4300) {
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* This is a dangling ethernet core on a
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* wireless device. Ignore it. */
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? continue;
>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
>>>> + ? ? ? ? ? ? ? ? ? ? ? }
>>>> + ? ? ? ? ? ? ? ? ? ? ? break;
>>>
>>> Do you also need to check for (bus->host_pci->device / 1000) == 43?
>>> Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
>>>
>>> Would it be better to invert the test and check for != 0x4400?
>>
>> I do not know of any Broadcom wireless device with a decimal PCI ID
>> (as opposed to a decimal Chip ID).
>
> Edit: However, 0x4700 should also be checked, as some BCM43xx chips
> use 0x47xx PCI IDs.
As far as I can tell from this snippet (I'm missing the original
message), this code is SSB, and the only 0x47xx I know of is the
BCM4313, and that's a BCMA card. So this doesn't apply here.
Same for the five digit Chip IDs (which might leak into the PCI ID, if
the card has no SPROM), AFAIK these are also BCMA exclusive.
A check for != 0x44xx would probably still the safest way.
Regards
Jonas
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-11-09 12:16 ` Jonas Gorski
@ 2011-11-09 13:53 ` Larry Finger
2011-11-09 15:46 ` Rafał Miłecki
0 siblings, 1 reply; 7+ messages in thread
From: Larry Finger @ 2011-11-09 13:53 UTC (permalink / raw)
To: Jonas Gorski
Cc: Gábor Stefanik, David Woodhouse, Michael Büsch,
John Linville, linux-wireless, b43-dev
On 11/09/2011 06:16 AM, Jonas Gorski wrote:
> On 9 November 2011 12:51, G?bor Stefanik<netrolller.3d@gmail.com> wrote:
>> On Wed, Nov 9, 2011 at 12:50 PM, G?bor Stefanik<netrolller.3d@gmail.com> wrote:
>>> On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse<dwmw2@infradead.org> wrote:
>>>> On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>>>>>
>>>>> + case SSB_DEV_ETHERNET:
>>>>> + if (bus->bustype == SSB_BUSTYPE_PCI) {
>>>>> + if (bus->host_pci->vendor == PCI_VENDOR_ID_BROADCOM&&
>>>>> + (bus->host_pci->device& 0xFF00) == 0x4300) {
>>>>> + /* This is a dangling ethernet core on a
>>>>> + * wireless device. Ignore it. */
>>>>> + continue;
>>>>> + }
>>>>> + }
>>>>> + break;
>>>>
>>>> Do you also need to check for (bus->host_pci->device / 1000) == 43?
>>>> Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
>>>>
>>>> Would it be better to invert the test and check for != 0x4400?
>>>
>>> I do not know of any Broadcom wireless device with a decimal PCI ID
>>> (as opposed to a decimal Chip ID).
>>
>> Edit: However, 0x4700 should also be checked, as some BCM43xx chips
>> use 0x47xx PCI IDs.
>
> As far as I can tell from this snippet (I'm missing the original
> message), this code is SSB, and the only 0x47xx I know of is the
> BCM4313, and that's a BCMA card. So this doesn't apply here.
>
> Same for the five digit Chip IDs (which might leak into the PCI ID, if
> the card has no SPROM), AFAIK these are also BCMA exclusive.
The only known card with this problem is the BCM4303, with PCI IDs 14e4:4301. My
suspicion is that Broadcom created a chip that could be used for wireless or
wired depending on which core was connected. Thus, it is an artifact of the
early days. One can clean up the code as much as you want, but I do not believe
any other chips are involved.
Larry
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] ssb: Ignore dangling ethernet cores on wireless devices
2011-11-09 13:53 ` Larry Finger
@ 2011-11-09 15:46 ` Rafał Miłecki
0 siblings, 0 replies; 7+ messages in thread
From: Rafał Miłecki @ 2011-11-09 15:46 UTC (permalink / raw)
To: Larry Finger
Cc: Jonas Gorski, Gábor Stefanik, David Woodhouse,
Michael Büsch, John Linville, linux-wireless, b43-dev
2011/11/9 Larry Finger <Larry.Finger@lwfinger.net>:
> On 11/09/2011 06:16 AM, Jonas Gorski wrote:
>>
>> On 9 November 2011 12:51, G?bor Stefanik<netrolller.3d@gmail.com> ?wrote:
>>>
>>> On Wed, Nov 9, 2011 at 12:50 PM, G?bor Stefanik<netrolller.3d@gmail.com>
>>> ?wrote:
>>>>
>>>> On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse<dwmw2@infradead.org>
>>>> ?wrote:
>>>>>
>>>>> On Fri, 2011-01-07 at 19:48 +0100, Michael B?sch wrote:
>>>>>>
>>>>>> + ? ? ? ? ? ? ? case SSB_DEV_ETHERNET:
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? if (bus->bustype == SSB_BUSTYPE_PCI) {
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if (bus->host_pci->vendor ==
>>>>>> PCI_VENDOR_ID_BROADCOM&&
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (bus->host_pci->device& ?0xFF00)
>>>>>> == 0x4300) {
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /* This is a dangling ethernet
>>>>>> core on a
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?* wireless device. Ignore it.
>>>>>> */
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? continue;
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? }
>>>>>> + ? ? ? ? ? ? ? ? ? ? ? break;
>>>>>
>>>>> Do you also need to check for (bus->host_pci->device / 1000) == 43?
>>>>> Or do the chips with 5-digit 'decimal' IDs not have the Ethernet cores?
>>>>>
>>>>> Would it be better to invert the test and check for != 0x4400?
>>>>
>>>> I do not know of any Broadcom wireless device with a decimal PCI ID
>>>> (as opposed to a decimal Chip ID).
>>>
>>> Edit: However, 0x4700 should also be checked, as some BCM43xx chips
>>> use 0x47xx PCI IDs.
>>
>> As far as I can tell from this snippet (I'm missing the original
>> message), this code is SSB, and the only 0x47xx I know of is the
>> BCM4313, and that's a BCMA card. So this doesn't apply here.
>>
>> Same for the five digit Chip IDs (which might leak into the PCI ID, if
>> the card has no SPROM), AFAIK these are also BCMA exclusive.
>
> The only known card with this problem is the BCM4303, with PCI IDs
> 14e4:4301. My suspicion is that Broadcom created a chip that could be used
> for wireless or wired depending on which core was connected. Thus, it is an
> artifact of the early days. One can clean up the code as much as you want,
> but I do not believe any other chips are involved.
It's BCM4301 btw. There was incorrect entry in lspci db for some time.
b43legacy has been always detecting it as BCM4301.
--
Rafa?
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-09 15:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-07 18:48 [PATCH] ssb: Ignore dangling ethernet cores on wireless devices Michael Büsch
2011-11-09 11:14 ` David Woodhouse
2011-11-09 11:50 ` Gábor Stefanik
2011-11-09 11:51 ` Gábor Stefanik
2011-11-09 12:16 ` Jonas Gorski
2011-11-09 13:53 ` Larry Finger
2011-11-09 15:46 ` Rafał Miłecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).