diff options
Diffstat (limited to 'drivers/scsi/fcoe/libfcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/libfcoe.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c index d0b5208e1a45..62a4c2026072 100644 --- a/drivers/scsi/fcoe/libfcoe.c +++ b/drivers/scsi/fcoe/libfcoe.c | |||
@@ -148,13 +148,17 @@ static void fcoe_ctlr_reset_fcfs(struct fcoe_ctlr *fip) | |||
148 | */ | 148 | */ |
149 | void fcoe_ctlr_destroy(struct fcoe_ctlr *fip) | 149 | void fcoe_ctlr_destroy(struct fcoe_ctlr *fip) |
150 | { | 150 | { |
151 | flush_work(&fip->recv_work); | 151 | cancel_work_sync(&fip->recv_work); |
152 | spin_lock_bh(&fip->fip_recv_list.lock); | ||
153 | __skb_queue_purge(&fip->fip_recv_list); | ||
154 | spin_unlock_bh(&fip->fip_recv_list.lock); | ||
155 | |||
152 | spin_lock_bh(&fip->lock); | 156 | spin_lock_bh(&fip->lock); |
153 | fip->state = FIP_ST_DISABLED; | 157 | fip->state = FIP_ST_DISABLED; |
154 | fcoe_ctlr_reset_fcfs(fip); | 158 | fcoe_ctlr_reset_fcfs(fip); |
155 | spin_unlock_bh(&fip->lock); | 159 | spin_unlock_bh(&fip->lock); |
156 | del_timer_sync(&fip->timer); | 160 | del_timer_sync(&fip->timer); |
157 | flush_work(&fip->link_work); | 161 | cancel_work_sync(&fip->link_work); |
158 | } | 162 | } |
159 | EXPORT_SYMBOL(fcoe_ctlr_destroy); | 163 | EXPORT_SYMBOL(fcoe_ctlr_destroy); |
160 | 164 | ||