ssb: Ignore dangling ethernet cores on wireless devices
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
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.
---
Does not need to go into stable, because probing of that core doesn't hurt except for failure messages in the logs.
drivers/ssb/scan.c +10 -0
@@ -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 ; }
Signature · 1 line
Greetings Michael.
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
drivers/ssb/scan.c line 432
Quoted 11 lines · Michael B?sch
drivers/ssb/scan.c +10
-0+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?
Signature · 8 lines
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>
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
Quoted 13 lines · David Woodhouse
Quoted 11 lines · Michael B?sch
+ ? ? ? ? ? ? ? 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;
Quoted 4 lines
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).
Quoted 4 lines
--
dwmw2
Signature · 1 line
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
Quoted 14 lines · G?bor Stefanik
Quoted 13 lines · David Woodhouse
Quoted 11 lines · Michael B?sch
+ ? ? ? ? ? ? ? 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;
Quoted 7 lines
Quoted 4 lines
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.
Quoted 11 lines
Quoted 5 lines
--
dwmw2--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
Signature · 1 line
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
Quoted 18 lines · G?bor Stefanik
Quoted 17 lines · G?bor Stefanik
Quoted 16 lines · David Woodhouse
Quoted 11 lines · Michael B?sch
+ ? ? ? ? ? ? ? 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?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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,
0x4700should 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
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
Quoted 27 lines · Jonas Gorski
Quoted 18 lines · G?bor Stefanik
Quoted 17 lines · G?bor Stefanik
Quoted 16 lines · David Woodhouse
drivers/ssb/scan.c line 432
Quoted 11 lines · Michael B?sch
drivers/ssb/scan.c +10
-0+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?Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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,
0x4700should also be checked, as some BCM43xx chips use 0x47xx PCI IDs.
Quoted 6 lines
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
PATCH 1/1 ssb: Ignore dangling ethernet cores on wireless devices
2011/11/9 Larry Finger <[email protected]>:
Quoted 42 lines · Jonas Gorski
Quoted 41 lines · On 9 November 2011 12:51, G?bor Stefanik<[email protected]> ?wrote:
Quoted 27 lines
Quoted 24 lines · On Wed, Nov 9, 2011 at 12:50 PM, G?bor Stefanik<[email protected]> ?wrote:
Quoted 21 lines · On Wed, Nov 9, 2011 at 12:14 PM, David Woodhouse<[email protected]> ?wrote:
Quoted 15 lines · Michael B?sch
+ ? ? ? ? ? ? ? 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?Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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,
0x4700should 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.
Quoted 8 lines
Quoted 2 lines
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.
Signature · 1 line
Rafa?