diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ifb.c | 15 | ||||
-rw-r--r-- | drivers/net/tg3.c | 6 |
2 files changed, 18 insertions, 3 deletions
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c index 15949d3df17e..af233b591534 100644 --- a/drivers/net/ifb.c +++ b/drivers/net/ifb.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/moduleparam.h> | 35 | #include <linux/moduleparam.h> |
36 | #include <net/pkt_sched.h> | 36 | #include <net/pkt_sched.h> |
37 | #include <net/net_namespace.h> | 37 | #include <net/net_namespace.h> |
38 | #include <linux/lockdep.h> | ||
38 | 39 | ||
39 | #define TX_TIMEOUT (2*HZ) | 40 | #define TX_TIMEOUT (2*HZ) |
40 | 41 | ||
@@ -227,6 +228,16 @@ static struct rtnl_link_ops ifb_link_ops __read_mostly = { | |||
227 | module_param(numifbs, int, 0); | 228 | module_param(numifbs, int, 0); |
228 | MODULE_PARM_DESC(numifbs, "Number of ifb devices"); | 229 | MODULE_PARM_DESC(numifbs, "Number of ifb devices"); |
229 | 230 | ||
231 | /* | ||
232 | * dev_ifb->queue_lock is usually taken after dev->ingress_lock, | ||
233 | * reversely to e.g. qdisc_lock_tree(). It should be safe until | ||
234 | * ifb doesn't take dev->queue_lock with dev_ifb->ingress_lock. | ||
235 | * But lockdep should know that ifb has different locks from dev. | ||
236 | */ | ||
237 | static struct lock_class_key ifb_queue_lock_key; | ||
238 | static struct lock_class_key ifb_ingress_lock_key; | ||
239 | |||
240 | |||
230 | static int __init ifb_init_one(int index) | 241 | static int __init ifb_init_one(int index) |
231 | { | 242 | { |
232 | struct net_device *dev_ifb; | 243 | struct net_device *dev_ifb; |
@@ -246,6 +257,10 @@ static int __init ifb_init_one(int index) | |||
246 | err = register_netdevice(dev_ifb); | 257 | err = register_netdevice(dev_ifb); |
247 | if (err < 0) | 258 | if (err < 0) |
248 | goto err; | 259 | goto err; |
260 | |||
261 | lockdep_set_class(&dev_ifb->queue_lock, &ifb_queue_lock_key); | ||
262 | lockdep_set_class(&dev_ifb->ingress_lock, &ifb_ingress_lock_key); | ||
263 | |||
249 | return 0; | 264 | return 0; |
250 | 265 | ||
251 | err: | 266 | err: |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 26ffb67f1da2..f9ef8bd8b11e 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -64,8 +64,8 @@ | |||
64 | 64 | ||
65 | #define DRV_MODULE_NAME "tg3" | 65 | #define DRV_MODULE_NAME "tg3" |
66 | #define PFX DRV_MODULE_NAME ": " | 66 | #define PFX DRV_MODULE_NAME ": " |
67 | #define DRV_MODULE_VERSION "3.87" | 67 | #define DRV_MODULE_VERSION "3.88" |
68 | #define DRV_MODULE_RELDATE "December 20, 2007" | 68 | #define DRV_MODULE_RELDATE "March 20, 2008" |
69 | 69 | ||
70 | #define TG3_DEF_MAC_MODE 0 | 70 | #define TG3_DEF_MAC_MODE 0 |
71 | #define TG3_DEF_RX_MODE 0 | 71 | #define TG3_DEF_RX_MODE 0 |
@@ -11841,7 +11841,7 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) | |||
11841 | } | 11841 | } |
11842 | 11842 | ||
11843 | if (!is_valid_ether_addr(&dev->dev_addr[0])) { | 11843 | if (!is_valid_ether_addr(&dev->dev_addr[0])) { |
11844 | #ifdef CONFIG_SPARC64 | 11844 | #ifdef CONFIG_SPARC |
11845 | if (!tg3_get_default_macaddr_sparc(tp)) | 11845 | if (!tg3_get_default_macaddr_sparc(tp)) |
11846 | return 0; | 11846 | return 0; |
11847 | #endif | 11847 | #endif |