aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-22 17:16:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-22 17:16:42 -0400
commitcf508b1211dbe576778ff445ea1b4b0bcfa5c4ea (patch)
tree4774838c2db17db71662a625fea25def8823341a /drivers
parentd29f749e252bcdbfe7a75a58f0ee92da16f127c0 (diff)
netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep.
The new address list lock needs to handle the same device layering issues that the _xmit_lock one does. This integrates work done by Patrick McHardy. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bonding/bond_main.c3
-rw-r--r--drivers/net/hamradio/bpqether.c2
-rw-r--r--drivers/net/macvlan.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c3
4 files changed, 11 insertions, 0 deletions
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
5043static struct lock_class_key bonding_netdev_xmit_lock_key; 5043static struct lock_class_key bonding_netdev_xmit_lock_key;
5044static struct lock_class_key bonding_netdev_addr_lock_key;
5044 5045
5045static void bond_set_lockdep_class_one(struct net_device *dev, 5046static 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
5053static void bond_set_lockdep_class(struct net_device *dev) 5054static 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/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 */
125static struct lock_class_key bpq_netdev_xmit_lock_key; 125static struct lock_class_key bpq_netdev_xmit_lock_key;
126static struct lock_class_key bpq_netdev_addr_lock_key;
126 127
127static void bpq_set_lockdep_class_one(struct net_device *dev, 128static 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
134static void bpq_set_lockdep_class(struct net_device *dev) 135static 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/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 */
278static struct lock_class_key macvlan_netdev_xmit_lock_key; 278static struct lock_class_key macvlan_netdev_xmit_lock_key;
279static 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
296static void macvlan_set_lockdep_class(struct net_device *dev) 297static 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/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 */
3103static struct lock_class_key hostap_netdev_xmit_lock_key; 3103static struct lock_class_key hostap_netdev_xmit_lock_key;
3104static struct lock_class_key hostap_netdev_addr_lock_key;
3104 3105
3105static void prism2_set_lockdep_class_one(struct net_device *dev, 3106static 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
3113static void prism2_set_lockdep_class(struct net_device *dev) 3114static 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