diff options
author | David S. Miller <davem@davemloft.net> | 2017-05-15 15:36:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-15 15:36:09 -0400 |
commit | 66f4bc819d71bb600f1c879c9a7161de1cc725f8 (patch) | |
tree | af9a39f437355719c399dcb18ee70427c3818142 | |
parent | ca9df7ede41afd006d74fd6f09f36d909d0eaad7 (diff) | |
parent | 8b671f906c2debc4f2393438c4e7668936522e99 (diff) |
Merge branch 'ldmsw-fixes'
Shannon Nelson says:
====================
ldmvsw: port removal stability
Under heavy reboot stress testing we found a couple of timing issues
when removing the device that could cause the kernel great heartburn,
addressed by these two patches.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/sun/ldmvsw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c index 5a90fed06260..5b56c24b6ed2 100644 --- a/drivers/net/ethernet/sun/ldmvsw.c +++ b/drivers/net/ethernet/sun/ldmvsw.c | |||
@@ -411,13 +411,14 @@ static int vsw_port_remove(struct vio_dev *vdev) | |||
411 | 411 | ||
412 | if (port) { | 412 | if (port) { |
413 | del_timer_sync(&port->vio.timer); | 413 | del_timer_sync(&port->vio.timer); |
414 | del_timer_sync(&port->clean_timer); | ||
414 | 415 | ||
415 | napi_disable(&port->napi); | 416 | napi_disable(&port->napi); |
417 | unregister_netdev(port->dev); | ||
416 | 418 | ||
417 | list_del_rcu(&port->list); | 419 | list_del_rcu(&port->list); |
418 | 420 | ||
419 | synchronize_rcu(); | 421 | synchronize_rcu(); |
420 | del_timer_sync(&port->clean_timer); | ||
421 | spin_lock_irqsave(&port->vp->lock, flags); | 422 | spin_lock_irqsave(&port->vp->lock, flags); |
422 | sunvnet_port_rm_txq_common(port); | 423 | sunvnet_port_rm_txq_common(port); |
423 | spin_unlock_irqrestore(&port->vp->lock, flags); | 424 | spin_unlock_irqrestore(&port->vp->lock, flags); |
@@ -427,7 +428,6 @@ static int vsw_port_remove(struct vio_dev *vdev) | |||
427 | 428 | ||
428 | dev_set_drvdata(&vdev->dev, NULL); | 429 | dev_set_drvdata(&vdev->dev, NULL); |
429 | 430 | ||
430 | unregister_netdev(port->dev); | ||
431 | free_netdev(port->dev); | 431 | free_netdev(port->dev); |
432 | } | 432 | } |
433 | 433 | ||