aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-09-29 04:39:24 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-30 23:03:11 -0400
commitf2c0d8df05228b64dbb2d8d4b6e2089c98041ada (patch)
tree5a21c44e41d80c43795770ea11bd13afccfc6b17 /drivers/net
parent06a49f7280091bd3dc27d4a4ceb17c68b8cda895 (diff)
qlge: Protect reset recovery with rtnl_lock().
Move the call to rtnl_lock() to before the internal call to ql_adapter_down()/ql_adapter_up(). This prevents collisions that can happen when recovering from an asic error. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/qlge/qlge_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 92976c6b40f5..c30350c8c86a 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3703,7 +3703,7 @@ static void ql_asic_reset_work(struct work_struct *work)
3703 struct ql_adapter *qdev = 3703 struct ql_adapter *qdev =
3704 container_of(work, struct ql_adapter, asic_reset_work.work); 3704 container_of(work, struct ql_adapter, asic_reset_work.work);
3705 int status; 3705 int status;
3706 3706 rtnl_lock();
3707 status = ql_adapter_down(qdev); 3707 status = ql_adapter_down(qdev);
3708 if (status) 3708 if (status)
3709 goto error; 3709 goto error;
@@ -3711,12 +3711,12 @@ static void ql_asic_reset_work(struct work_struct *work)
3711 status = ql_adapter_up(qdev); 3711 status = ql_adapter_up(qdev);
3712 if (status) 3712 if (status)
3713 goto error; 3713 goto error;
3714 3714 rtnl_unlock();
3715 return; 3715 return;
3716error: 3716error:
3717 QPRINTK(qdev, IFUP, ALERT, 3717 QPRINTK(qdev, IFUP, ALERT,
3718 "Driver up/down cycle failed, closing device\n"); 3718 "Driver up/down cycle failed, closing device\n");
3719 rtnl_lock(); 3719
3720 set_bit(QL_ADAPTER_UP, &qdev->flags); 3720 set_bit(QL_ADAPTER_UP, &qdev->flags);
3721 dev_close(qdev->ndev); 3721 dev_close(qdev->ndev);
3722 rtnl_unlock(); 3722 rtnl_unlock();