diff options
| author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2013-06-25 11:27:17 -0400 |
|---|---|---|
| committer | James Bottomley <JBottomley@Parallels.com> | 2013-07-08 12:16:29 -0400 |
| commit | 8edf3edd8da076008093a8a04d349bbef02ecd88 (patch) | |
| tree | 60c4bd99f3b36c580a9423a8cb22455d11fc9c6c | |
| parent | 754d1243915d0fda6874fa0f1a926d85eb09e0b4 (diff) | |
[SCSI] qla2xxx: Set the index in outstanding command array to NULL when cmd is aborted when the request timeout.
Call the generic BSG free routine to unmap the DMA buffers.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 39719f892488..5ba0cc1f982b 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c | |||
| @@ -2153,6 +2153,7 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job) | |||
| 2153 | (sp->type == SRB_ELS_CMD_HST) || | 2153 | (sp->type == SRB_ELS_CMD_HST) || |
| 2154 | (sp->type == SRB_FXIOCB_BCMD)) | 2154 | (sp->type == SRB_FXIOCB_BCMD)) |
| 2155 | && (sp->u.bsg_job == bsg_job)) { | 2155 | && (sp->u.bsg_job == bsg_job)) { |
| 2156 | req->outstanding_cmds[cnt] = NULL; | ||
| 2156 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 2157 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
| 2157 | if (ha->isp_ops->abort_command(sp)) { | 2158 | if (ha->isp_ops->abort_command(sp)) { |
| 2158 | ql_log(ql_log_warn, vha, 0x7089, | 2159 | ql_log(ql_log_warn, vha, 0x7089, |
| @@ -2180,8 +2181,6 @@ qla24xx_bsg_timeout(struct fc_bsg_job *bsg_job) | |||
| 2180 | 2181 | ||
| 2181 | done: | 2182 | done: |
| 2182 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 2183 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
| 2183 | if (bsg_job->request->msgcode == FC_BSG_HST_CT) | 2184 | sp->free(vha, sp); |
| 2184 | kfree(sp->fcport); | ||
| 2185 | qla2x00_rel_sp(vha, sp); | ||
| 2186 | return 0; | 2185 | return 0; |
| 2187 | } | 2186 | } |
