Skip to contentSkip to conversation

backports: backport alx

PATCH New Luis R. Rodriguez 1 participant 4 messages Jul 1, 2013

lore
Share & tools
lore
#0 lore raw

cover backports: backport alx

From: "Luis R. Rodriguez" <[email protected]>

Johannes threw alx upstream, this fixes the backport based on the new shiny code.

Luis R. Rodriguez (3):
backports: remove alx extra patch
backports: add new alx upstream backport
backports: add SPEED_UNKNOWN and DUPLEX_UNKNOWN

 backport/backport-include/linux/ethtool.h          |    8 ++
 .../network/0001-netdev_ops/alx.patch              |   11 ++
 .../network/0001-netdev_ops/mwifiex.patch          |    2 +-
 .../network/0007-pci_dev_dev_flags/INFO            |   28 +++++
 .../network/0007-pci_dev_dev_flags/alx.patch       |   13 +++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   24 ++++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   14 +++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   58 +++++++++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   13 +++
 ...drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch |    2 +-
 .../network/0001-backport-alx/alx.patch            |  123 --------------------
 .../network/0002-alx-make-kconfig/alx.patch        |   32 -----
 .../0003-alx-deactivate-loopback-test/alx.patch    |   25 ----
 13 files changed, 171 insertions(+), 182 deletions(-)
 create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
 create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
 create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
 create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
 delete mode 100644 patches/unified-drivers/network/0001-backport-alx/alx.patch
 delete mode 100644 patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
 delete mode 100644 patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/3 backports: remove alx extra patch

From: "Luis R. Rodriguez" <[email protected]>

The alx driver was upstreamed by Johannes, so this is no longer required. Note that this driver is now GPLv2 or later, BSD folks will have to look at the old unified tree for a permissive licensed port.

---
 .../network/0001-netdev_ops/mwifiex.patch          |    2 +-
 ...drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch |    2 +-
 .../network/0002-alx-make-kconfig/alx.patch        |   32 --------------------
 3 files changed, 2 insertions(+), 34 deletions(-)
 delete mode 100644 patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch
patches/collateral-evolutions/network/0001-netdev_ops/mwifiex.patch +1 -1
index 0567191..58a38ab 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwifiex/main.c
 +++ b/drivers/net/wireless/mwifiex/main.c
-@@ -750,7 +750,7 @@ static const struct net_device_ops mwifi
+@@ -749,7 +749,7 @@ static const struct net_device_ops mwifi
  void mwifiex_init_priv_params(struct mwifiex_private *priv,
  						struct net_device *dev)
  {
patches/collateral-evolutions/network/62-usb_driver_lpm/drivers_net_wireless_rtlwifi_rtl8192cu_sw.patch +1 -1
index 28b2173..23181a0 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
 +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
-@@ -385,7 +385,9 @@ static struct usb_driver rtl8192cu_drive
+@@ -386,7 +386,9 @@ static struct usb_driver rtl8192cu_drive
  #ifdef CONFIG_AUTOSUSPEND
  	.supports_autosuspend = 1,
  #endif
patches/unified-drivers/network/0002-alx-make-kconfig/alx.patch deleted +0 -32
deleted file mode 100644
index 465e499..0000000
@@ -1,32 +0,0 @@
---- a/drivers/net/ethernet/atheros/Kconfig
-+++ b/drivers/net/ethernet/atheros/Kconfig
-@@ -67,4 +67,22 @@ config ATL1C
- 	  To compile this driver as a module, choose M here.  The module
- 	  will be called atl1c.
- 
-+config ALX
-+	tristate "Qualcomm Atheros L1F Gigabit Ethernet support"
-+	depends on PCI
-+	select CRC32
-+	select NET_CORE
-+	select MII
-+	---help---
-+	  This driver supports the Qualcomm Atheros L1F ethernet adapter.
-+	  This driver supports following chipsets:
-+
-+	  1969:1091 - AR8161 Gigabit Ethernet
-+	  1969:1090 - AR8162 Fast Ethernet
-+	  1969:10A1 - AR8171 Gigabit Ethernet
-+	  1969:10A0 - AR8172 Fast Ethernet
-+
-+	  To compile this driver as a module, choose M here.  The module
-+	  will be called alx.
-+
- endif # NET_VENDOR_ATHEROS
---- a/drivers/net/ethernet/atheros/Makefile
-+++ b/drivers/net/ethernet/atheros/Makefile
-@@ -6,3 +6,4 @@ obj-$(CONFIG_ATL1) += atlx/
- obj-$(CONFIG_ATL2) += atlx/
- obj-$(CONFIG_ATL1E) += atl1e/
- obj-$(CONFIG_ATL1C) += atl1c/
-+obj-$(CONFIG_ALX) += alx/
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/3 backports: add new alx upstream backport

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

This backports the new upstream alx driver and
properly splits up each required backports into
its respective collateral evolution bucket.

---
 .../network/0001-netdev_ops/alx.patch              |   11 ++
 .../network/0007-pci_dev_dev_flags/INFO            |   28 +++++
 .../network/0007-pci_dev_dev_flags/alx.patch       |   13 +++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   24 ++++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   14 +++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   58 +++++++++
 .../drivers_net_ethernet_atheros_alx_main.patch    |   13 +++
 .../network/0001-backport-alx/alx.patch            |  123 --------------------
 .../0003-alx-deactivate-loopback-test/alx.patch    |   25 ----
 9 files changed, 161 insertions(+), 148 deletions(-)
 create mode 100644 patches/collateral-evolutions/network/0001-netdev_ops/alx.patch
 create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO
 create mode 100644 patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch
 create mode 100644 patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch
 create mode 100644 patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch
 delete mode 100644 patches/unified-drivers/network/0001-backport-alx/alx.patch
 delete mode 100644 patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch
patches/collateral-evolutions/network/0001-netdev_ops/alx.patch new file +11 -0
new file mode 100644
index 0000000..46ed1fe
@@ -0,0 +1,11 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1317,7 +1317,7 @@ static int alx_probe(struct pci_dev *pde
+ 		goto out_free_netdev;
+ 	}
+ 
+-	netdev->netdev_ops = &alx_netdev_ops;
++	netdev_attach_ops(netdev, &alx_netdev_ops);
+ 	SET_ETHTOOL_OPS(netdev, &alx_ethtool_ops);
+ 	netdev->irq = pdev->irq;
+ 	netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
patches/collateral-evolutions/network/0007-pci_dev_dev_flags/INFO new file +28 -0
new file mode 100644
index 0000000..fc95b61
@@ -0,0 +1,28 @@
+The struct pci_dev dev_flags member was added as of
+v2.6.24 via ba698ad4. This collateral evolution can be
+enhanced and backported atomically through these series
+of patches. The end goal is to optimize this in SmPL form.
+
+mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains ba698ad4
+v2.6.24-rc2~28^2~6
+
+commit ba698ad4b7e466cbb4a8bde6b9da8080ab06808d
+Author: David Miller <[email protected]>
+Date:   Thu Oct 25 01:16:30 2007 -0700
+
+    PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
+    
+    A reasonably common problem with some devices is that they will
+    disable MSI generation when the INTX_DISABLE bit is set in the
+    PCI_COMMAND register.
+    
+    Quirk this explicitly, guarding the pci_intx() calls in msi.c with
+    this quirk indication.
+    
+    The first entries for this quirk are for 5714 and 5780 Tigon3 chips,
+    and thus we can remove the workaround code from the tg3.c driver.
+    
+    Signed-off-by: David S. Miller <[email protected]>
+    Acked-by: Michael Chan <[email protected]>
+    Acked-by: Jeff Garzik <[email protected]>
+    Signed-off-by: Greg Kroah-Hartman <[email protected]>
patches/collateral-evolutions/network/0007-pci_dev_dev_flags/alx.patch new file +13 -0
new file mode 100644
index 0000000..aa782b7
@@ -0,0 +1,13 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1322,8 +1322,10 @@ static int alx_probe(struct pci_dev *pde
+ 	netdev->irq = pdev->irq;
+ 	netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
+ 	if (ent->driver_data & ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG)
+ 		pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
++#endif
+ 
+ 	err = alx_init_sw(alx);
+ 	if (err) {
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_ethernet_atheros_alx_main.patch new file +24 -0
new file mode 100644
index 0000000..4f4cce9
@@ -0,0 +1,24 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -1590,6 +1590,8 @@ static const struct pci_error_handlers a
+ };
+ 
+ #ifdef CONFIG_PM_SLEEP
++compat_pci_suspend(alx_suspend);
++compat_pci_resume(alx_resume);
+ static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
+ #define ALX_PM_OPS      (&alx_pm_ops)
+ #else
+@@ -1615,7 +1617,12 @@ static struct pci_driver alx_driver = {
+ 	.remove      = alx_remove,
+ 	.shutdown    = alx_shutdown,
+ 	.err_handler = &alx_err_handlers,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ 	.driver.pm   = ALX_PM_OPS,
++#elif defined(CONFIG_PM_SLEEP)
++	.suspend        = alx_suspend_compat,
++	.resume         = alx_resume_compat,
++#endif
+ };
+ 
+ module_pci_driver(alx_driver);
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_ethernet_atheros_alx_main.patch new file +14 -0
new file mode 100644
index 0000000..886bb87
@@ -0,0 +1,14 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -466,7 +466,11 @@ static void __alx_set_rx_mode(struct net
+ 
+ 	if (!(netdev->flags & IFF_ALLMULTI)) {
+ 		netdev_for_each_mc_addr(ha, netdev)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ 			alx_add_mc_addr(hw, ha->addr, mc_hash);
++#else
++			alx_add_mc_addr(hw, ha->dmi_addr, mc_hash);
++#endif
+ 
+ 		alx_write_mem32(hw, ALX_HASH_TBL0, mc_hash[0]);
+ 		alx_write_mem32(hw, ALX_HASH_TBL1, mc_hash[1]);
patches/collateral-evolutions/network/40-netdev-hw-features/drivers_net_ethernet_atheros_alx_main.patch new file +58 -0

58 lines not on this page · raw message

patches/collateral-evolutions/network/61-netdev-addr_assign_type/drivers_net_ethernet_atheros_alx_main.patch new file +13 -0
new file mode 100644
index 0000000..a492664
@@ -0,0 +1,13 @@
+--- a/drivers/net/ethernet/atheros/alx/main.c
++++ b/drivers/net/ethernet/atheros/alx/main.c
+@@ -499,8 +499,10 @@ static int alx_set_mac_address(struct ne
+ 	if (!is_valid_ether_addr(addr->sa_data))
+ 		return -EADDRNOTAVAIL;
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+ 	if (netdev->addr_assign_type & NET_ADDR_RANDOM)
+ 		netdev->addr_assign_type ^= NET_ADDR_RANDOM;
++#endif
+ 
+ 	memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
+ 	memcpy(hw->mac_addr, addr->sa_data, netdev->addr_len);
patches/unified-drivers/network/0001-backport-alx/alx.patch deleted +0 -123

123 lines not on this page · raw message

patches/unified-drivers/network/0003-alx-deactivate-loopback-test/alx.patch deleted +0 -25
deleted file mode 100644
index 3ed96a4..0000000
@@ -1,25 +0,0 @@
---- a/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-+++ b/drivers/net/ethernet/atheros/alx/alx_ethtool.c
-@@ -1687,7 +1687,9 @@ static void alx_self_test(struct net_dev
- {
- 	struct alx_adapter *adpt = netdev_priv(netdev);
- 	bool if_running = netif_running(netdev);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- 	bool phy_lpback = etest->flags & ETH_TEST_FL_EXTERNAL_LB;
-+#endif
- 
- 	ALX_FLAG_SET(adpt, TESTING);
- 	memset(data, 0, sizeof(u64) * ALX_TEST_LEN);
-@@ -1707,10 +1709,12 @@ static void alx_self_test(struct net_dev
- 		if (alx_diag_interrupt(adpt, &data[2]))
- 			etest->flags |= ETH_TEST_FL_FAILED;
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
- 		if (phy_lpback)
- 			etest->flags |= ETH_TEST_FL_EXTERNAL_LB_DONE;
- 		if (alx_diag_loopback(adpt, &data[3], phy_lpback))
- 			etest->flags |= ETH_TEST_FL_FAILED;
-+#endif
- 
- 	} else {
- 		netif_info(adpt, hw, adpt->netdev,  "online test start...\n");
Signature · 1 line
1.7.10.4
#3 lore raw

PATCH 3/3 backports: add SPEED_UNKNOWN and DUPLEX_UNKNOWN

In reply to Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

This gets us in synch with next-20130618.

This was added via uapi/linux/ethtool.h but using that file causes some odd issues I simply cannot resolve right now. I stuff these definitions into the regular include/linux/ethtool.h for now.

This backports commit 589665f5 added via v3.2.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains \
	589665f5a6008dbce1d0af2cb93e94a80bf78151

v3.2-rc1~4^2~10

commit 589665f5a6008dbce1d0af2cb93e94a80bf78151

Author: Dan Carpenter <[email protected]>
Date:   Fri Nov 4 08:21:38 2011 +0000

bonding: comparing a u8 with -1 is always false

slave->duplex is a u8 type so the in bond_info_show_slave() when we check "if (slave->duplex == -1)", it's always false.

1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.79              [  OK  ]
18  3.1.10              [  OK  ]
19  3.10-rc1            [  OK  ]
20  3.2.45              [  OK  ]
21  3.3.8               [  OK  ]
22  3.4.46              [  OK  ]
23  3.5.7               [  OK  ]
24  3.6.11              [  OK  ]
25  3.7.10              [  OK  ]
26  3.8.13              [  OK  ]
27  3.9.3               [  OK  ]
real    15m7.262s
user    335m33.818s
sys     82m36.486s
---
 backport/backport-include/linux/ethtool.h |    8 ++++++++
 1 file changed, 8 insertions(+)
backport/backport-include/linux/ethtool.h +8 -0
index 0c1eee6..2f323b0 100644
@@ -3,6 +3,14 @@
 #include_next <linux/ethtool.h>
 #include <linux/version.h>
 
+#ifndef SPEED_UNKNOWN
+#define SPEED_UNKNOWN  -1
+#endif /* SPEED_UNKNOWN */
+
+#ifndef DUPLEX_UNKNOWN
+#define DUPLEX_UNKNOWN 0xff
+#endif /* DUPLEX_UNKNOWN */
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
 #define ethtool_rxfh_indir_default LINUX_BACKPORT(ethtool_rxfh_indir_default)
 static inline u32 ethtool_rxfh_indir_default(u32 index, u32 n_rx_rings)
Signature · 1 line
1.7.10.4