summaryrefslogtreecommitdiff
path: root/patches/unified-drivers
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>2012-12-01 11:13:21 -0800
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2012-12-01 11:13:21 -0800
commit395acf3b07436d4f92e174746cbb613efbfd4b2d (patch)
treeb6f665cd9797fa5175e332e04d3935789eee8faf /patches/unified-drivers
parent35ea8a06d06f9d157a53988b959bb8c2ea1bc8d8 (diff)
compat-drivers: fix alx backport on netdev features
This updates the hunks that deal with the netdevice features. We no longer need device checks given that the driver no longer supports atl1c devices. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches/unified-drivers')
-rw-r--r--patches/unified-drivers/network/0001-backport-alx.patch33
1 files changed, 14 insertions, 19 deletions
diff --git a/patches/unified-drivers/network/0001-backport-alx.patch b/patches/unified-drivers/network/0001-backport-alx.patch
index b1aadc98..e77c1bcc 100644
--- a/patches/unified-drivers/network/0001-backport-alx.patch
+++ b/patches/unified-drivers/network/0001-backport-alx.patch
@@ -2,7 +2,7 @@ This should go into patches/01-netdev.patch
--- a/drivers/net/ethernet/atheros/alx/alx_main.c
+++ b/drivers/net/ethernet/atheros/alx/alx_main.c
-@@ -102,7 +102,11 @@ static void __alx_set_rx_mode(struct net_device *netdev)
+@@ -102,7 +102,11 @@ static void __alx_set_rx_mode(struct net
/* comoute mc addresses' hash value ,and put it into hash table */
netdev_for_each_mc_addr(ha, netdev)
@@ -14,7 +14,7 @@ This should go into patches/01-netdev.patch
ALX_MEM_W32(adpt, ALX_HASH_TBL0, adpt->mc_hash[0]);
ALX_MEM_W32(adpt, ALX_HASH_TBL1, adpt->mc_hash[1]);
-@@ -133,8 +137,10 @@ static int alx_set_mac_address(struct net_device *netdev, void *data)
+@@ -133,8 +137,10 @@ static int alx_set_mac_address(struct ne
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
@@ -25,7 +25,7 @@ This should go into patches/01-netdev.patch
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
memcpy(adpt->mac_addr, addr->sa_data, netdev->addr_len);
-@@ -1130,6 +1136,7 @@ static int __devinit alx_init_sw(struct alx_adapter *adpt)
+@@ -1130,6 +1136,7 @@ static int __devinit alx_init_sw(struct
return err;
}
@@ -33,7 +33,7 @@ This should go into patches/01-netdev.patch
static netdev_features_t alx_fix_features(struct net_device *netdev,
netdev_features_t features)
{
-@@ -1167,6 +1174,7 @@ static int alx_set_features(struct net_device *netdev,
+@@ -1167,6 +1174,7 @@ static int alx_set_features(struct net_d
return 0;
}
@@ -41,7 +41,7 @@ This should go into patches/01-netdev.patch
/* alx_change_mtu - Change the Maximum Transfer Unit */
static int alx_change_mtu(struct net_device *netdev, int new_mtu)
-@@ -1188,7 +1196,17 @@ static int alx_change_mtu(struct net_device *netdev, int new_mtu)
+@@ -1188,7 +1196,17 @@ static int alx_change_mtu(struct net_dev
netdev->mtu = new_mtu;
adpt->rxbuf_size = new_mtu > ALX_DEF_RXBUF_SIZE ?
ALIGN(max_frame, 8) : ALX_DEF_RXBUF_SIZE;
@@ -59,7 +59,7 @@ This should go into patches/01-netdev.patch
alx_reinit(adpt);
}
-@@ -2476,8 +2494,10 @@ static const struct net_device_ops alx_netdev_ops = {
+@@ -2476,8 +2494,10 @@ static const struct net_device_ops alx_n
.ndo_change_mtu = alx_change_mtu,
.ndo_do_ioctl = alx_ioctl,
.ndo_tx_timeout = alx_tx_timeout,
@@ -70,7 +70,7 @@ This should go into patches/01-netdev.patch
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = alx_poll_controller,
#endif
-@@ -2571,7 +2591,7 @@ alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -2571,7 +2591,7 @@ alx_probe(struct pci_dev *pdev, const st
goto err_iomap;
}
@@ -79,7 +79,7 @@ This should go into patches/01-netdev.patch
alx_set_ethtool_ops(netdev);
netdev->irq = pdev->irq;
netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
-@@ -2614,12 +2634,26 @@ alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+@@ -2614,12 +2634,21 @@ alx_probe(struct pci_dev *pdev, const st
}
}
@@ -91,22 +91,17 @@ This should go into patches/01-netdev.patch
NETIF_F_TSO6;
netdev->features = netdev->hw_features | NETIF_F_HW_VLAN_TX;
+#else
-+ netdev->features = NETIF_F_SG |
++ netdev->features = NETIF_F_SG |
+ NETIF_F_HW_CSUM |
-+ NETIF_F_HW_VLAN_RX;
-+ if (adpt->hw.mac_type != alx_mac_l1c &&
-+ adpt->hw.mac_type != alx_mac_l2c) {
-+ netdev->features = netdev->features |
-+ NETIF_F_TSO |
-+ NETIF_F_TSO6;
-+ }
-+ netdev->features = netdev->features |
++ NETIF_F_HW_VLAN_RX |
++ NETIF_F_TSO |
++ NETIF_F_TSO6 |
+ NETIF_F_HW_VLAN_TX;
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)) */
/* read permanent mac addr from register or eFuse */
if (alx_get_perm_macaddr(adpt, adpt->perm_addr)) {
-@@ -2785,6 +2819,8 @@ static struct pci_error_handlers alx_err_handler = {
+@@ -2785,6 +2814,8 @@ static struct pci_error_handlers alx_err
#ifdef CONFIG_PM_SLEEP
static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
#define ALX_PM_OPS (&alx_pm_ops)
@@ -115,7 +110,7 @@ This should go into patches/01-netdev.patch
#else
#define ALX_PM_OPS NULL
#endif
-@@ -2796,7 +2832,12 @@ static struct pci_driver alx_driver = {
+@@ -2796,7 +2827,12 @@ static struct pci_driver alx_driver = {
.remove = __devexit_p(alx_remove),
.shutdown = alx_shutdown,
.err_handler = &alx_err_handler,