aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRon Mercer <ron.mercer@qlogic.com>2009-03-09 06:59:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-10 07:43:48 -0400
commitdb98812f6bbe17c5994d6290a68f8de8aa5ff8b9 (patch)
tree5eb83228e5b5d336a2518532c2fde2a470c58ecd /drivers
parent1a77733ccb9654716160fdfb3f1f2a9e1759de19 (diff)
qlge: Move reset logic into asic_reset_worker func.
Get rid of extraneous ql_cycle_adapter. It's only called from the one place. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/qlge/qlge_main.c41
1 files changed, 18 insertions, 23 deletions
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index d800ff40b32b..ed7138d07bad 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -3263,28 +3263,6 @@ err_init:
3263 return err; 3263 return err;
3264} 3264}
3265 3265
3266static int ql_cycle_adapter(struct ql_adapter *qdev)
3267{
3268 int status;
3269
3270 status = ql_adapter_down(qdev);
3271 if (status)
3272 goto error;
3273
3274 status = ql_adapter_up(qdev);
3275 if (status)
3276 goto error;
3277
3278 return status;
3279error:
3280 QPRINTK(qdev, IFUP, ALERT,
3281 "Driver up/down cycle failed, closing device\n");
3282 rtnl_lock();
3283 dev_close(qdev->ndev);
3284 rtnl_unlock();
3285 return status;
3286}
3287
3288static void ql_release_adapter_resources(struct ql_adapter *qdev) 3266static void ql_release_adapter_resources(struct ql_adapter *qdev)
3289{ 3267{
3290 ql_free_mem_resources(qdev); 3268 ql_free_mem_resources(qdev);
@@ -3617,7 +3595,24 @@ static void ql_asic_reset_work(struct work_struct *work)
3617{ 3595{
3618 struct ql_adapter *qdev = 3596 struct ql_adapter *qdev =
3619 container_of(work, struct ql_adapter, asic_reset_work.work); 3597 container_of(work, struct ql_adapter, asic_reset_work.work);
3620 ql_cycle_adapter(qdev); 3598 int status;
3599
3600 status = ql_adapter_down(qdev);
3601 if (status)
3602 goto error;
3603
3604 status = ql_adapter_up(qdev);
3605 if (status)
3606 goto error;
3607
3608 return;
3609error:
3610 QPRINTK(qdev, IFUP, ALERT,
3611 "Driver up/down cycle failed, closing device\n");
3612 rtnl_lock();
3613 set_bit(QL_ADAPTER_UP, &qdev->flags);
3614 dev_close(qdev->ndev);
3615 rtnl_unlock();
3621} 3616}
3622 3617
3623static struct nic_operations qla8012_nic_ops = { 3618static struct nic_operations qla8012_nic_ops = {