mirror of https://gitee.com/openkylin/linux.git
brcmsmac: handle non pci in ai_deviceremoved()
This is based on code from the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
a06f210991
commit
22291cea07
|
@ -816,6 +816,9 @@ bool ai_deviceremoved(struct si_pub *sih)
|
||||||
|
|
||||||
sii = (struct si_info *)sih;
|
sii = (struct si_info *)sih;
|
||||||
|
|
||||||
|
if (sii->icbus->hosttype != BCMA_HOSTTYPE_PCI)
|
||||||
|
return false;
|
||||||
|
|
||||||
pci_read_config_dword(sii->pcibus, PCI_VENDOR_ID, &w);
|
pci_read_config_dword(sii->pcibus, PCI_VENDOR_ID, &w);
|
||||||
if ((w & 0xFFFF) != PCI_VENDOR_ID_BROADCOM)
|
if ((w & 0xFFFF) != PCI_VENDOR_ID_BROADCOM)
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue