diff options
author | James.Smart@Emulex.Com <James.Smart@Emulex.Com> | 2005-06-25 10:34:30 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-07-02 18:57:22 -0500 |
commit | 5eb95af086f5d2e554bb119f3cb71f7ca38bfe85 (patch) | |
tree | d969d2f0e53b4c5289ff2acc4c141bf246866ac2 /drivers/scsi/lpfc/lpfc_sli.c | |
parent | 1f679cafd2d02b7076e9045d9c4fb77ef8d059f2 (diff) | |
download | linux-5eb95af086f5d2e554bb119f3cb71f7ca38bfe85.tar.gz linux-5eb95af086f5d2e554bb119f3cb71f7ca38bfe85.tar.bz2 linux-5eb95af086f5d2e554bb119f3cb71f7ca38bfe85.zip |
[SCSI] lpfc: Add completion handler to the abort iocbs
Add completion handler to the abort iocbs to close a hole where we
could reuse an iotag.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_sli.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index e01428895823..048447ac4ca0 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c @@ -2077,8 +2077,6 @@ lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, switch (piocb->iocb.ulpCommand) { case CMD_QUE_RING_BUF_CN: case CMD_QUE_RING_BUF64_CN: - case CMD_CLOSE_XRI_CN: - case CMD_ABORT_XRI_CN: /* * For IOCBs, like QUE_RING_BUF, that have no rsp ring * completion, iocb_cmpl MUST be 0. @@ -2561,6 +2559,16 @@ lpfc_sli_sum_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, return sum; } +void +lpfc_sli_abort_fcp_cmpl(struct lpfc_hba * phba, struct lpfc_iocbq * cmdiocb, + struct lpfc_iocbq * rspiocb) +{ + spin_lock_irq(phba->host->host_lock); + list_add_tail(&cmdiocb->list, &phba->lpfc_iocb_list); + spin_unlock_irq(phba->host->host_lock); + return; +} + int lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, uint16_t tgt_id, uint64_t lun_id, uint32_t ctx, @@ -2610,6 +2618,8 @@ lpfc_sli_abort_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, else abtsiocb->iocb.ulpCommand = CMD_CLOSE_XRI_CN; + /* Setup callback routine and issue the command. */ + abtsiocb->iocb_cmpl = lpfc_sli_abort_fcp_cmpl; ret_val = lpfc_sli_issue_iocb(phba, pring, abtsiocb, 0); if (ret_val == IOCB_ERROR) { list_add_tail(&abtsiocb->list, lpfc_iocb_list); |