compat-drivers: refresh alx patch for INTX-MSI issue
authorxiong <xiong@qca.qualcomm.com>
Fri, 1 Mar 2013 22:10:39 +0000 (06:10 +0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 2 Mar 2013 00:17:15 +0000 (16:17 -0800)
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 <xiong@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/unified-drivers/network/0005-alx-intx-msi-workaround.patch [new file with mode: 0644]

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 (file)
index 0000000..baf2e6d
--- /dev/null
@@ -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;