diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 41 |
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 | ||
3266 | static 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; | ||
3279 | error: | ||
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 | |||
3288 | static void ql_release_adapter_resources(struct ql_adapter *qdev) | 3266 | static 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; | ||
3609 | error: | ||
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 | ||
3623 | static struct nic_operations qla8012_nic_ops = { | 3618 | static struct nic_operations qla8012_nic_ops = { |