diff options
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_tgt.c')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_tgt.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_tgt.c b/drivers/scsi/bnx2fc/bnx2fc_tgt.c index 082a25c3117e..85ffdeaa3b85 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_tgt.c +++ b/drivers/scsi/bnx2fc/bnx2fc_tgt.c | |||
@@ -181,8 +181,14 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt) | |||
181 | 181 | ||
182 | set_bit(BNX2FC_FLAG_IO_COMPL, &io_req->req_flags); | 182 | set_bit(BNX2FC_FLAG_IO_COMPL, &io_req->req_flags); |
183 | set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags); | 183 | set_bit(BNX2FC_FLAG_IO_CLEANUP, &io_req->req_flags); |
184 | rc = bnx2fc_initiate_cleanup(io_req); | 184 | |
185 | BUG_ON(rc); | 185 | /* Do not issue cleanup when disable request failed */ |
186 | if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags)) | ||
187 | bnx2fc_process_cleanup_compl(io_req, io_req->task, 0); | ||
188 | else { | ||
189 | rc = bnx2fc_initiate_cleanup(io_req); | ||
190 | BUG_ON(rc); | ||
191 | } | ||
186 | } | 192 | } |
187 | 193 | ||
188 | list_for_each_safe(list, tmp, &tgt->active_tm_queue) { | 194 | list_for_each_safe(list, tmp, &tgt->active_tm_queue) { |
@@ -212,8 +218,13 @@ void bnx2fc_flush_active_ios(struct bnx2fc_rport *tgt) | |||
212 | io_req->cb_arg = NULL; | 218 | io_req->cb_arg = NULL; |
213 | } | 219 | } |
214 | 220 | ||
215 | rc = bnx2fc_initiate_cleanup(io_req); | 221 | /* Do not issue cleanup when disable request failed */ |
216 | BUG_ON(rc); | 222 | if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags)) |
223 | bnx2fc_process_cleanup_compl(io_req, io_req->task, 0); | ||
224 | else { | ||
225 | rc = bnx2fc_initiate_cleanup(io_req); | ||
226 | BUG_ON(rc); | ||
227 | } | ||
217 | } | 228 | } |
218 | 229 | ||
219 | list_for_each_safe(list, tmp, &tgt->io_retire_queue) { | 230 | list_for_each_safe(list, tmp, &tgt->io_retire_queue) { |
@@ -321,9 +332,13 @@ static void bnx2fc_upload_session(struct fcoe_port *port, | |||
321 | 332 | ||
322 | del_timer_sync(&tgt->upld_timer); | 333 | del_timer_sync(&tgt->upld_timer); |
323 | 334 | ||
324 | } else | 335 | } else if (test_bit(BNX2FC_FLAG_DISABLE_FAILED, &tgt->flags)) { |
336 | printk(KERN_ERR PFX "ERROR!! DISABLE req failed, destroy" | ||
337 | " not sent to FW\n"); | ||
338 | } else { | ||
325 | printk(KERN_ERR PFX "ERROR!! DISABLE req timed out, destroy" | 339 | printk(KERN_ERR PFX "ERROR!! DISABLE req timed out, destroy" |
326 | " not sent to FW\n"); | 340 | " not sent to FW\n"); |
341 | } | ||
327 | 342 | ||
328 | /* Free session resources */ | 343 | /* Free session resources */ |
329 | bnx2fc_free_session_resc(hba, tgt); | 344 | bnx2fc_free_session_resc(hba, tgt); |