From: xiong Date: Fri, 1 Mar 2013 22:10:39 +0000 (+0800) Subject: compat-drivers: refresh alx patch for INTX-MSI issue X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=24feb35c98a9452d202a122d99755c7edd2a9850;p=openwrt%2Fstaging%2Fblogic.git compat-drivers: refresh alx patch for INTX-MSI issue chip revsion less than C0 has INTX/MSI issue. this patch should be removed after the kernel drivers/pci/quirks.c contains this workaround. Signed-off-by: xiong Signed-off-by: Luis R. Rodriguez --- diff --git a/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch b/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch new file mode 100644 index 000000000000..baf2e6d40c36 --- /dev/null +++ b/patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch @@ -0,0 +1,16 @@ +For new kernels this is dealt with in drivers/pci/quirks.c +Since older kernels will not have this we add a hack to the +driver to deal with the PCI quirk. + +--- a/drivers/net/ethernet/atheros/alx/alx_main.c ++++ b/drivers/net/ethernet/atheros/alx/alx_main.c +@@ -1026,6 +1026,9 @@ static int alx_identify_hw(struct alx_adapter *adpt) + if (rev < ALX_REV_C0) { + hw->ptrn_ofs = 0x600; + hw->max_ptrns = 8; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) ++ pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG; ++#endif + } else { + hw->ptrn_ofs = 0x14000; + hw->max_ptrns = 16;