aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_ct.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.(none)>2005-10-29 11:28:33 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-29 11:28:33 -0400
commit604a3e3042eb89ffaa4f735ef9208281aae786c7 (patch)
tree54c4ad58274b0bb79386c6c57b4849bfb92d4118 /drivers/scsi/lpfc/lpfc_ct.c
parent21568f5387636fe2bfb9ee42383d76de11ed99c7 (diff)
[SCSI] lpfc: Fix for "command completion for iotax x?? not found"
From: James Smart <James.Smart@emulex.com> There were scenarios where the error handlers could reuse an iotag value of an active io. Remove all possibility of this by pre-assigning iotag resources to command resources. Signed-off-by: James Smart <James.Smart@emulex.com> Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_ct.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_ct.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
index 1280f0e54636..40c34a30a94a 100644
--- a/drivers/scsi/lpfc/lpfc_ct.c
+++ b/drivers/scsi/lpfc/lpfc_ct.c
@@ -235,7 +235,6 @@ lpfc_gen_req(struct lpfc_hba *phba, struct lpfc_dmabuf *bmp,
235 235
236 if (geniocb == NULL) 236 if (geniocb == NULL)
237 return 1; 237 return 1;
238 memset(geniocb, 0, sizeof (struct lpfc_iocbq));
239 238
240 icmd = &geniocb->iocb; 239 icmd = &geniocb->iocb;
241 icmd->un.genreq64.bdl.ulpIoTag32 = 0; 240 icmd->un.genreq64.bdl.ulpIoTag32 = 0;
@@ -279,7 +278,7 @@ lpfc_gen_req(struct lpfc_hba *phba, struct lpfc_dmabuf *bmp,
279 geniocb->drvrTimeout = icmd->ulpTimeout + LPFC_DRVR_TIMEOUT; 278 geniocb->drvrTimeout = icmd->ulpTimeout + LPFC_DRVR_TIMEOUT;
280 spin_lock_irq(phba->host->host_lock); 279 spin_lock_irq(phba->host->host_lock);
281 if (lpfc_sli_issue_iocb(phba, pring, geniocb, 0) == IOCB_ERROR) { 280 if (lpfc_sli_issue_iocb(phba, pring, geniocb, 0) == IOCB_ERROR) {
282 list_add_tail(&geniocb->list, lpfc_iocb_list); 281 lpfc_sli_release_iocbq(phba, geniocb);
283 spin_unlock_irq(phba->host->host_lock); 282 spin_unlock_irq(phba->host->host_lock);
284 return 1; 283 return 1;
285 } 284 }
@@ -487,7 +486,7 @@ out:
487 kfree(inp); 486 kfree(inp);
488 kfree(bmp); 487 kfree(bmp);
489 spin_lock_irq(phba->host->host_lock); 488 spin_lock_irq(phba->host->host_lock);
490 list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list); 489 lpfc_sli_release_iocbq(phba, cmdiocb);
491 spin_unlock_irq(phba->host->host_lock); 490 spin_unlock_irq(phba->host->host_lock);
492 return; 491 return;
493} 492}
@@ -526,7 +525,7 @@ lpfc_cmpl_ct_cmd_rft_id(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb,
526 kfree(inp); 525 kfree(inp);
527 kfree(bmp); 526 kfree(bmp);
528 spin_lock_irq(phba->host->host_lock); 527 spin_lock_irq(phba->host->host_lock);
529 list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list); 528 lpfc_sli_release_iocbq(phba, cmdiocb);
530 spin_unlock_irq(phba->host->host_lock); 529 spin_unlock_irq(phba->host->host_lock);
531 return; 530 return;
532} 531}
@@ -735,7 +734,7 @@ lpfc_cmpl_ct_cmd_fdmi(struct lpfc_hba * phba,
735 kfree(inp); 734 kfree(inp);
736 kfree(bmp); 735 kfree(bmp);
737 spin_lock_irq(phba->host->host_lock); 736 spin_lock_irq(phba->host->host_lock);
738 list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list); 737 lpfc_sli_release_iocbq(phba, cmdiocb);
739 spin_unlock_irq(phba->host->host_lock); 738 spin_unlock_irq(phba->host->host_lock);
740 return; 739 return;
741} 740}