diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/au1000_eth.c | 5 | ||||
-rw-r--r-- | drivers/net/bfin_mac.c | 1 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 3 | ||||
-rw-r--r-- | drivers/net/cpmac.c | 2 | ||||
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 5 | ||||
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 7 | ||||
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 2 | ||||
-rw-r--r-- | drivers/net/macb.c | 4 | ||||
-rw-r--r-- | drivers/net/macvlan.c | 3 | ||||
-rw-r--r-- | drivers/net/sh_eth.c | 5 | ||||
-rw-r--r-- | drivers/net/tc35815.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_hw.c | 3 |
12 files changed, 16 insertions, 25 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 3ab61e40e86a..cb8be490e5ae 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -911,9 +911,8 @@ au1000_adjust_link(struct net_device *dev) | |||
911 | if(phydev->link != aup->old_link) { | 911 | if(phydev->link != aup->old_link) { |
912 | // link state changed | 912 | // link state changed |
913 | 913 | ||
914 | if (phydev->link) // link went up | 914 | if (!phydev->link) { |
915 | netif_tx_schedule_all(dev); | 915 | /* link went down */ |
916 | else { // link went down | ||
917 | aup->old_speed = 0; | 916 | aup->old_speed = 0; |
918 | aup->old_duplex = -1; | 917 | aup->old_duplex = -1; |
919 | } | 918 | } |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index a6a3da89f590..a8ec60e1ed75 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -357,7 +357,6 @@ static void bfin_mac_adjust_link(struct net_device *dev) | |||
357 | if (!lp->old_link) { | 357 | if (!lp->old_link) { |
358 | new_state = 1; | 358 | new_state = 1; |
359 | lp->old_link = 1; | 359 | lp->old_link = 1; |
360 | netif_tx_schedule_all(dev); | ||
361 | } | 360 | } |
362 | } else if (lp->old_link) { | 361 | } else if (lp->old_link) { |
363 | new_state = 1; | 362 | new_state = 1; |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 9737c06045d6..a641eeaa2a2f 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -5041,6 +5041,7 @@ static int bond_check_params(struct bond_params *params) | |||
5041 | } | 5041 | } |
5042 | 5042 | ||
5043 | static struct lock_class_key bonding_netdev_xmit_lock_key; | 5043 | static struct lock_class_key bonding_netdev_xmit_lock_key; |
5044 | static struct lock_class_key bonding_netdev_addr_lock_key; | ||
5044 | 5045 | ||
5045 | static void bond_set_lockdep_class_one(struct net_device *dev, | 5046 | static void bond_set_lockdep_class_one(struct net_device *dev, |
5046 | struct netdev_queue *txq, | 5047 | struct netdev_queue *txq, |
@@ -5052,6 +5053,8 @@ static void bond_set_lockdep_class_one(struct net_device *dev, | |||
5052 | 5053 | ||
5053 | static void bond_set_lockdep_class(struct net_device *dev) | 5054 | static void bond_set_lockdep_class(struct net_device *dev) |
5054 | { | 5055 | { |
5056 | lockdep_set_class(&dev->addr_list_lock, | ||
5057 | &bonding_netdev_addr_lock_key); | ||
5055 | netdev_for_each_tx_queue(dev, bond_set_lockdep_class_one, NULL); | 5058 | netdev_for_each_tx_queue(dev, bond_set_lockdep_class_one, NULL); |
5056 | } | 5059 | } |
5057 | 5060 | ||
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index fbd4280c102c..a7800e559090 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -945,10 +945,8 @@ static void cpmac_adjust_link(struct net_device *dev) | |||
945 | if (!priv->oldlink) { | 945 | if (!priv->oldlink) { |
946 | new_state = 1; | 946 | new_state = 1; |
947 | priv->oldlink = 1; | 947 | priv->oldlink = 1; |
948 | netif_tx_schedule_all(dev); | ||
949 | } | 948 | } |
950 | } else if (priv->oldlink) { | 949 | } else if (priv->oldlink) { |
951 | netif_tx_stop_all_queues(dev); | ||
952 | new_state = 1; | 950 | new_state = 1; |
953 | priv->oldlink = 0; | 951 | priv->oldlink = 0; |
954 | priv->oldspeed = 0; | 952 | priv->oldspeed = 0; |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index ae9ecb7df22b..4e4f68304e82 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -197,9 +197,6 @@ static void mpc52xx_fec_adjust_link(struct net_device *dev) | |||
197 | if (priv->link == PHY_DOWN) { | 197 | if (priv->link == PHY_DOWN) { |
198 | new_state = 1; | 198 | new_state = 1; |
199 | priv->link = phydev->link; | 199 | priv->link = phydev->link; |
200 | netif_tx_schedule_all(dev); | ||
201 | netif_carrier_on(dev); | ||
202 | netif_start_queue(dev); | ||
203 | } | 200 | } |
204 | 201 | ||
205 | } else if (priv->link) { | 202 | } else if (priv->link) { |
@@ -207,8 +204,6 @@ static void mpc52xx_fec_adjust_link(struct net_device *dev) | |||
207 | priv->link = PHY_DOWN; | 204 | priv->link = PHY_DOWN; |
208 | priv->speed = 0; | 205 | priv->speed = 0; |
209 | priv->duplex = -1; | 206 | priv->duplex = -1; |
210 | netif_stop_queue(dev); | ||
211 | netif_carrier_off(dev); | ||
212 | } | 207 | } |
213 | 208 | ||
214 | if (new_state && netif_msg_link(priv)) | 209 | if (new_state && netif_msg_link(priv)) |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 445763e5648e..52911889fd12 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -738,9 +738,6 @@ static void generic_adjust_link(struct net_device *dev) | |||
738 | if (!fep->oldlink) { | 738 | if (!fep->oldlink) { |
739 | new_state = 1; | 739 | new_state = 1; |
740 | fep->oldlink = 1; | 740 | fep->oldlink = 1; |
741 | netif_tx_schedule_all(dev); | ||
742 | netif_carrier_on(dev); | ||
743 | netif_start_queue(dev); | ||
744 | } | 741 | } |
745 | 742 | ||
746 | if (new_state) | 743 | if (new_state) |
@@ -750,8 +747,6 @@ static void generic_adjust_link(struct net_device *dev) | |||
750 | fep->oldlink = 0; | 747 | fep->oldlink = 0; |
751 | fep->oldspeed = 0; | 748 | fep->oldspeed = 0; |
752 | fep->oldduplex = -1; | 749 | fep->oldduplex = -1; |
753 | netif_carrier_off(dev); | ||
754 | netif_stop_queue(dev); | ||
755 | } | 750 | } |
756 | 751 | ||
757 | if (new_state && netif_msg_link(fep)) | 752 | if (new_state && netif_msg_link(fep)) |
@@ -826,6 +821,8 @@ static int fs_enet_open(struct net_device *dev) | |||
826 | } | 821 | } |
827 | phy_start(fep->phydev); | 822 | phy_start(fep->phydev); |
828 | 823 | ||
824 | netif_start_queue(dev); | ||
825 | |||
829 | return 0; | 826 | return 0; |
830 | } | 827 | } |
831 | 828 | ||
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index b6500b2aacf2..58f4b1d7bf1f 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -123,6 +123,7 @@ static LIST_HEAD(bpq_devices); | |||
123 | * off into a separate class since they always nest. | 123 | * off into a separate class since they always nest. |
124 | */ | 124 | */ |
125 | static struct lock_class_key bpq_netdev_xmit_lock_key; | 125 | static struct lock_class_key bpq_netdev_xmit_lock_key; |
126 | static struct lock_class_key bpq_netdev_addr_lock_key; | ||
126 | 127 | ||
127 | static void bpq_set_lockdep_class_one(struct net_device *dev, | 128 | static void bpq_set_lockdep_class_one(struct net_device *dev, |
128 | struct netdev_queue *txq, | 129 | struct netdev_queue *txq, |
@@ -133,6 +134,7 @@ static void bpq_set_lockdep_class_one(struct net_device *dev, | |||
133 | 134 | ||
134 | static void bpq_set_lockdep_class(struct net_device *dev) | 135 | static void bpq_set_lockdep_class(struct net_device *dev) |
135 | { | 136 | { |
137 | lockdep_set_class(&dev->addr_list_lock, &bpq_netdev_addr_lock_key); | ||
136 | netdev_for_each_tx_queue(dev, bpq_set_lockdep_class_one, NULL); | 138 | netdev_for_each_tx_queue(dev, bpq_set_lockdep_class_one, NULL); |
137 | } | 139 | } |
138 | 140 | ||
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 0496d16f9de5..daba82bbcb56 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c | |||
@@ -164,9 +164,7 @@ static void macb_handle_link_change(struct net_device *dev) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | if (phydev->link != bp->link) { | 166 | if (phydev->link != bp->link) { |
167 | if (phydev->link) | 167 | if (!phydev->link) { |
168 | netif_tx_schedule_all(dev); | ||
169 | else { | ||
170 | bp->speed = 0; | 168 | bp->speed = 0; |
171 | bp->duplex = -1; | 169 | bp->duplex = -1; |
172 | } | 170 | } |
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index efbc15567dd3..42394505bb50 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c | |||
@@ -276,6 +276,7 @@ static int macvlan_change_mtu(struct net_device *dev, int new_mtu) | |||
276 | * separate class since they always nest. | 276 | * separate class since they always nest. |
277 | */ | 277 | */ |
278 | static struct lock_class_key macvlan_netdev_xmit_lock_key; | 278 | static struct lock_class_key macvlan_netdev_xmit_lock_key; |
279 | static struct lock_class_key macvlan_netdev_addr_lock_key; | ||
279 | 280 | ||
280 | #define MACVLAN_FEATURES \ | 281 | #define MACVLAN_FEATURES \ |
281 | (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ | 282 | (NETIF_F_SG | NETIF_F_ALL_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \ |
@@ -295,6 +296,8 @@ static void macvlan_set_lockdep_class_one(struct net_device *dev, | |||
295 | 296 | ||
296 | static void macvlan_set_lockdep_class(struct net_device *dev) | 297 | static void macvlan_set_lockdep_class(struct net_device *dev) |
297 | { | 298 | { |
299 | lockdep_set_class(&dev->addr_list_lock, | ||
300 | &macvlan_netdev_addr_lock_key); | ||
298 | netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL); | 301 | netdev_for_each_tx_queue(dev, macvlan_set_lockdep_class_one, NULL); |
299 | } | 302 | } |
300 | 303 | ||
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index a4bc812aa999..c69ba1395fa9 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -642,17 +642,12 @@ static void sh_eth_adjust_link(struct net_device *ndev) | |||
642 | | ECMR_DM, ioaddr + ECMR); | 642 | | ECMR_DM, ioaddr + ECMR); |
643 | new_state = 1; | 643 | new_state = 1; |
644 | mdp->link = phydev->link; | 644 | mdp->link = phydev->link; |
645 | netif_tx_schedule_all(ndev); | ||
646 | netif_carrier_on(ndev); | ||
647 | netif_start_queue(ndev); | ||
648 | } | 645 | } |
649 | } else if (mdp->link) { | 646 | } else if (mdp->link) { |
650 | new_state = 1; | 647 | new_state = 1; |
651 | mdp->link = PHY_DOWN; | 648 | mdp->link = PHY_DOWN; |
652 | mdp->speed = 0; | 649 | mdp->speed = 0; |
653 | mdp->duplex = -1; | 650 | mdp->duplex = -1; |
654 | netif_stop_queue(ndev); | ||
655 | netif_carrier_off(ndev); | ||
656 | } | 651 | } |
657 | 652 | ||
658 | if (new_state) | 653 | if (new_state) |
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 41d3ac45685f..a645e5028c14 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c | |||
@@ -672,7 +672,6 @@ static void tc_handle_link_change(struct net_device *dev) | |||
672 | if (dev->flags & IFF_PROMISC) | 672 | if (dev->flags & IFF_PROMISC) |
673 | tc35815_set_multicast_list(dev); | 673 | tc35815_set_multicast_list(dev); |
674 | #endif | 674 | #endif |
675 | netif_tx_schedule_all(dev); | ||
676 | } else { | 675 | } else { |
677 | lp->speed = 0; | 676 | lp->speed = 0; |
678 | lp->duplex = -1; | 677 | lp->duplex = -1; |
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c index 13d5882f1f21..3153fe9d7ce0 100644 --- a/drivers/net/wireless/hostap/hostap_hw.c +++ b/drivers/net/wireless/hostap/hostap_hw.c | |||
@@ -3101,6 +3101,7 @@ static void prism2_clear_set_tim_queue(local_info_t *local) | |||
3101 | * This is a natural nesting, which needs a split lock type. | 3101 | * This is a natural nesting, which needs a split lock type. |
3102 | */ | 3102 | */ |
3103 | static struct lock_class_key hostap_netdev_xmit_lock_key; | 3103 | static struct lock_class_key hostap_netdev_xmit_lock_key; |
3104 | static struct lock_class_key hostap_netdev_addr_lock_key; | ||
3104 | 3105 | ||
3105 | static void prism2_set_lockdep_class_one(struct net_device *dev, | 3106 | static void prism2_set_lockdep_class_one(struct net_device *dev, |
3106 | struct netdev_queue *txq, | 3107 | struct netdev_queue *txq, |
@@ -3112,6 +3113,8 @@ static void prism2_set_lockdep_class_one(struct net_device *dev, | |||
3112 | 3113 | ||
3113 | static void prism2_set_lockdep_class(struct net_device *dev) | 3114 | static void prism2_set_lockdep_class(struct net_device *dev) |
3114 | { | 3115 | { |
3116 | lockdep_set_class(&dev->addr_list_lock, | ||
3117 | &hostap_netdev_addr_lock_key); | ||
3115 | netdev_for_each_tx_queue(dev, prism2_set_lockdep_class_one, NULL); | 3118 | netdev_for_each_tx_queue(dev, prism2_set_lockdep_class_one, NULL); |
3116 | } | 3119 | } |
3117 | 3120 | ||