提交 b6b67df3 编写于 作者: L Larry Finger 提交者: John W. Linville

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: NHubert Liao <liao.hubertt@gmail.com>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org> [back to 2.6.38]
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 d4930086
...@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev, ...@@ -1696,15 +1696,17 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn); pcipriv->ndis_adapter.devnumber = PCI_SLOT(pdev->devfn);
pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn); pcipriv->ndis_adapter.funcnumber = PCI_FUNC(pdev->devfn);
/*find bridge info */ if (bridge_pdev) {
pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; /*find bridge info if available */
for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) { pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor;
if (bridge_pdev->vendor == pcibridge_vendors[tmp]) { for (tmp = 0; tmp < PCI_BRIDGE_VENDOR_MAX; tmp++) {
pcipriv->ndis_adapter.pcibridge_vendor = tmp; if (bridge_pdev->vendor == pcibridge_vendors[tmp]) {
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, pcipriv->ndis_adapter.pcibridge_vendor = tmp;
("Pci Bridge Vendor is found index: %d\n", RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
tmp)); ("Pci Bridge Vendor is found index:"
break; " %d\n", tmp));
break;
}
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册