diff options
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 5642a9b250c2..c8f90cef728d 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -228,6 +228,7 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc) | |||
228 | struct invalidate_command_table *inv_tbl; | 228 | struct invalidate_command_table *inv_tbl; |
229 | struct be_dma_mem nonemb_cmd; | 229 | struct be_dma_mem nonemb_cmd; |
230 | unsigned int cid, tag, num_invalidate; | 230 | unsigned int cid, tag, num_invalidate; |
231 | int rc; | ||
231 | 232 | ||
232 | cls_session = starget_to_session(scsi_target(sc->device)); | 233 | cls_session = starget_to_session(scsi_target(sc->device)); |
233 | session = cls_session->dd_data; | 234 | session = cls_session->dd_data; |
@@ -285,9 +286,11 @@ static int beiscsi_eh_abort(struct scsi_cmnd *sc) | |||
285 | return FAILED; | 286 | return FAILED; |
286 | } | 287 | } |
287 | 288 | ||
288 | beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va); | 289 | rc = beiscsi_mccq_compl(phba, tag, NULL, &nonemb_cmd); |
289 | pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, | 290 | if (rc != -EBUSY) |
290 | nonemb_cmd.va, nonemb_cmd.dma); | 291 | pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, |
292 | nonemb_cmd.va, nonemb_cmd.dma); | ||
293 | |||
291 | return iscsi_eh_abort(sc); | 294 | return iscsi_eh_abort(sc); |
292 | } | 295 | } |
293 | 296 | ||
@@ -303,6 +306,7 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) | |||
303 | struct invalidate_command_table *inv_tbl; | 306 | struct invalidate_command_table *inv_tbl; |
304 | struct be_dma_mem nonemb_cmd; | 307 | struct be_dma_mem nonemb_cmd; |
305 | unsigned int cid, tag, i, num_invalidate; | 308 | unsigned int cid, tag, i, num_invalidate; |
309 | int rc; | ||
306 | 310 | ||
307 | /* invalidate iocbs */ | 311 | /* invalidate iocbs */ |
308 | cls_session = starget_to_session(scsi_target(sc->device)); | 312 | cls_session = starget_to_session(scsi_target(sc->device)); |
@@ -363,9 +367,10 @@ static int beiscsi_eh_device_reset(struct scsi_cmnd *sc) | |||
363 | return FAILED; | 367 | return FAILED; |
364 | } | 368 | } |
365 | 369 | ||
366 | beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va); | 370 | rc = beiscsi_mccq_compl(phba, tag, NULL, &nonemb_cmd); |
367 | pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, | 371 | if (rc != -EBUSY) |
368 | nonemb_cmd.va, nonemb_cmd.dma); | 372 | pci_free_consistent(phba->ctrl.pdev, nonemb_cmd.size, |
373 | nonemb_cmd.va, nonemb_cmd.dma); | ||
369 | return iscsi_eh_device_reset(sc); | 374 | return iscsi_eh_device_reset(sc); |
370 | } | 375 | } |
371 | 376 | ||
@@ -4360,12 +4365,16 @@ static int beiscsi_get_boot_info(struct beiscsi_hba *phba) | |||
4360 | goto boot_freemem; | 4365 | goto boot_freemem; |
4361 | } | 4366 | } |
4362 | 4367 | ||
4363 | ret = beiscsi_mccq_compl(phba, tag, NULL, nonemb_cmd.va); | 4368 | ret = beiscsi_mccq_compl(phba, tag, NULL, &nonemb_cmd); |
4364 | if (ret) { | 4369 | if (ret) { |
4365 | beiscsi_log(phba, KERN_ERR, | 4370 | beiscsi_log(phba, KERN_ERR, |
4366 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, | 4371 | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, |
4367 | "BM_%d : beiscsi_get_session_info Failed"); | 4372 | "BM_%d : beiscsi_get_session_info Failed"); |
4368 | goto boot_freemem; | 4373 | |
4374 | if (ret != -EBUSY) | ||
4375 | goto boot_freemem; | ||
4376 | else | ||
4377 | return ret; | ||
4369 | } | 4378 | } |
4370 | 4379 | ||
4371 | session_resp = nonemb_cmd.va ; | 4380 | session_resp = nonemb_cmd.va ; |
@@ -5594,6 +5603,8 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, | |||
5594 | phba->ctrl.mcc_tag[i] = i + 1; | 5603 | phba->ctrl.mcc_tag[i] = i + 1; |
5595 | phba->ctrl.mcc_numtag[i + 1] = 0; | 5604 | phba->ctrl.mcc_numtag[i + 1] = 0; |
5596 | phba->ctrl.mcc_tag_available++; | 5605 | phba->ctrl.mcc_tag_available++; |
5606 | memset(&phba->ctrl.ptag_state[i].tag_mem_state, 0, | ||
5607 | sizeof(struct beiscsi_mcc_tag_state)); | ||
5597 | } | 5608 | } |
5598 | 5609 | ||
5599 | phba->ctrl.mcc_alloc_index = phba->ctrl.mcc_free_index = 0; | 5610 | phba->ctrl.mcc_alloc_index = phba->ctrl.mcc_free_index = 0; |