diff options
-rw-r--r-- | drivers/net/b44.c | 13 | ||||
-rw-r--r-- | drivers/net/gianfar.c | 2 | ||||
-rw-r--r-- | drivers/net/hp-plus.c | 2 | ||||
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 4 | ||||
-rw-r--r-- | net/sched/sch_drr.c | 6 |
5 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/b44.c b/drivers/net/b44.c index c38512ebcea6..dc5f051005fa 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c | |||
@@ -1264,8 +1264,14 @@ static void b44_clear_stats(struct b44 *bp) | |||
1264 | static void b44_chip_reset(struct b44 *bp, int reset_kind) | 1264 | static void b44_chip_reset(struct b44 *bp, int reset_kind) |
1265 | { | 1265 | { |
1266 | struct ssb_device *sdev = bp->sdev; | 1266 | struct ssb_device *sdev = bp->sdev; |
1267 | bool was_enabled; | ||
1267 | 1268 | ||
1268 | if (ssb_device_is_enabled(bp->sdev)) { | 1269 | was_enabled = ssb_device_is_enabled(bp->sdev); |
1270 | |||
1271 | ssb_device_enable(bp->sdev, 0); | ||
1272 | ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev); | ||
1273 | |||
1274 | if (was_enabled) { | ||
1269 | bw32(bp, B44_RCV_LAZY, 0); | 1275 | bw32(bp, B44_RCV_LAZY, 0); |
1270 | bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); | 1276 | bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE); |
1271 | b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); | 1277 | b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1); |
@@ -1277,10 +1283,8 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind) | |||
1277 | } | 1283 | } |
1278 | bw32(bp, B44_DMARX_CTRL, 0); | 1284 | bw32(bp, B44_DMARX_CTRL, 0); |
1279 | bp->rx_prod = bp->rx_cons = 0; | 1285 | bp->rx_prod = bp->rx_cons = 0; |
1280 | } else | 1286 | } |
1281 | ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev); | ||
1282 | 1287 | ||
1283 | ssb_device_enable(bp->sdev, 0); | ||
1284 | b44_clear_stats(bp); | 1288 | b44_clear_stats(bp); |
1285 | 1289 | ||
1286 | /* | 1290 | /* |
@@ -2236,6 +2240,7 @@ static void __devexit b44_remove_one(struct ssb_device *sdev) | |||
2236 | struct net_device *dev = ssb_get_drvdata(sdev); | 2240 | struct net_device *dev = ssb_get_drvdata(sdev); |
2237 | 2241 | ||
2238 | unregister_netdev(dev); | 2242 | unregister_netdev(dev); |
2243 | ssb_device_disable(sdev, 0); | ||
2239 | ssb_bus_may_powerdown(sdev->bus); | 2244 | ssb_bus_may_powerdown(sdev->bus); |
2240 | free_netdev(dev); | 2245 | free_netdev(dev); |
2241 | ssb_pcihost_set_power_state(sdev, PCI_D3hot); | 2246 | ssb_pcihost_set_power_state(sdev, PCI_D3hot); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 9b12a13a640f..9831b3f408aa 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -1284,7 +1284,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1284 | spin_lock_irqsave(&priv->txlock, flags); | 1284 | spin_lock_irqsave(&priv->txlock, flags); |
1285 | 1285 | ||
1286 | /* check if there is space to queue this packet */ | 1286 | /* check if there is space to queue this packet */ |
1287 | if (nr_frags > priv->num_txbdfree) { | 1287 | if ((nr_frags+1) > priv->num_txbdfree) { |
1288 | /* no space, stop the queue */ | 1288 | /* no space, stop the queue */ |
1289 | netif_stop_queue(dev); | 1289 | netif_stop_queue(dev); |
1290 | dev->stats.tx_fifo_errors++; | 1290 | dev->stats.tx_fifo_errors++; |
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 5e070f446635..0486cbe01adb 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -467,7 +467,7 @@ init_module(void) | |||
467 | if (this_dev != 0) break; /* only autoprobe 1st one */ | 467 | if (this_dev != 0) break; /* only autoprobe 1st one */ |
468 | printk(KERN_NOTICE "hp-plus.c: Presently autoprobing (not recommended) for a single card.\n"); | 468 | printk(KERN_NOTICE "hp-plus.c: Presently autoprobing (not recommended) for a single card.\n"); |
469 | } | 469 | } |
470 | dev = alloc_ei_netdev(); | 470 | dev = alloc_eip_netdev(); |
471 | if (!dev) | 471 | if (!dev) |
472 | break; | 472 | break; |
473 | dev->irq = irq[this_dev]; | 473 | dev->irq = irq[this_dev]; |
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 8fe267feb81e..1bcc3431859e 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -258,11 +258,11 @@ unique: | |||
258 | 258 | ||
259 | if (twp != NULL) { | 259 | if (twp != NULL) { |
260 | *twp = tw; | 260 | *twp = tw; |
261 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); | 261 | NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED); |
262 | } else if (tw != NULL) { | 262 | } else if (tw != NULL) { |
263 | /* Silly. Should hash-dance instead... */ | 263 | /* Silly. Should hash-dance instead... */ |
264 | inet_twsk_deschedule(tw, death_row); | 264 | inet_twsk_deschedule(tw, death_row); |
265 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); | 265 | NET_INC_STATS_BH(net, LINUX_MIB_TIMEWAITRECYCLED); |
266 | 266 | ||
267 | inet_twsk_put(tw); | 267 | inet_twsk_put(tw); |
268 | } | 268 | } |
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index f6b4fa97df70..e36e94ab4e10 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c | |||
@@ -66,11 +66,15 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
66 | { | 66 | { |
67 | struct drr_sched *q = qdisc_priv(sch); | 67 | struct drr_sched *q = qdisc_priv(sch); |
68 | struct drr_class *cl = (struct drr_class *)*arg; | 68 | struct drr_class *cl = (struct drr_class *)*arg; |
69 | struct nlattr *opt = tca[TCA_OPTIONS]; | ||
69 | struct nlattr *tb[TCA_DRR_MAX + 1]; | 70 | struct nlattr *tb[TCA_DRR_MAX + 1]; |
70 | u32 quantum; | 71 | u32 quantum; |
71 | int err; | 72 | int err; |
72 | 73 | ||
73 | err = nla_parse_nested(tb, TCA_DRR_MAX, tca[TCA_OPTIONS], drr_policy); | 74 | if (!opt) |
75 | return -EINVAL; | ||
76 | |||
77 | err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy); | ||
74 | if (err < 0) | 78 | if (err < 0) |
75 | return err; | 79 | return err; |
76 | 80 | ||