aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2011-07-29 11:53:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-01 13:46:47 -0400
commitb6b67df3f24c45af0012ee3c8af2f62ca083ae18 (patch)
tree85e8c9a6e4d12f35d926f01cd4dd25f74e9112af /drivers/net
parentd4930086bdd0c08a8b3a4d66a9c702297cb74a99 (diff)
rtlwifi: Fix kernel oops on ARM SOC
This driver uses information from the self member of the pci_bus struct to get information regarding the bridge to which the PCIe device is attached. Unfortunately, this member is not established on all architectures, which leads to a kernel oops. Skipping the entire block that uses the self member to determine the bridge vendor will only affect RTL8192DE devices as that driver sets the ASPM support flag differently when the bridge vendor is Intel. If the self member is available, there is no functional change. This patch fixes Bugzilla No. 40212. Reported-by: Hubert Liao <liao.hubertt@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> [back to 2.6.38] Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 5efd57833489..56f12358389d 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
1696 pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); 1696 pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn);
1697 pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); 1697 pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn);
1698 1698
1699 /*find bridge info */ 1699 if (bridge_pdev) {
1700 pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; 1700 /*find bridge info if available */
1701 for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { 1701 pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;
1702 if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { 1702 for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {
1703 pcipriv->ndis_adapter.pcibridge_vendor = tmp; 1703 if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {
1704 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, 1704 pcipriv->ndis_adapter.pcibridge_vendor = tmp;
1705 ("Pci Bridge Vendor is found index: %d\n", 1705 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
1706 tmp)); 1706 ("Pci Bridge Vendor is found index:"
1707 break; 1707 " %d\n", tmp));
1708 break;
1709 }
1708 } 1710 }
1709 } 1711 }
1710 1712