diff options
author | Darren Trapp <darren.trapp@cavium.com> | 2018-01-15 23:46:51 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-01-22 20:03:26 -0500 |
commit | b027a5ace443f4f1eb58648ab236025b7b0f6df9 (patch) | |
tree | 0dc33d2b2b0734f56428b3eef7881709db6a90ee | |
parent | 8a7eac2fd19edd30f922bde56aaa499d5516b2d8 (diff) |
scsi: qla2xxx: Fix queue ID for async abort with Multiqueue
[mkp: sparse warning]
Signed-off-by: Darren Trapp <darren.trapp@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 10 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 6 |
3 files changed, 15 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index f7396a2e28ba..be7d6824581a 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -442,6 +442,7 @@ struct srb_iocb { | |||
442 | struct { | 442 | struct { |
443 | uint32_t cmd_hndl; | 443 | uint32_t cmd_hndl; |
444 | __le16 comp_status; | 444 | __le16 comp_status; |
445 | __le16 req_que_no; | ||
445 | struct completion comp; | 446 | struct completion comp; |
446 | } abt; | 447 | } abt; |
447 | struct ct_arg ctarg; | 448 | struct ct_arg ctarg; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index e030ee38fa6f..aececf664654 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1565,6 +1565,13 @@ qla24xx_async_abort_cmd(srb_t *cmd_sp) | |||
1565 | sp->name = "abort"; | 1565 | sp->name = "abort"; |
1566 | qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha)); | 1566 | qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha)); |
1567 | abt_iocb->u.abt.cmd_hndl = cmd_sp->handle; | 1567 | abt_iocb->u.abt.cmd_hndl = cmd_sp->handle; |
1568 | |||
1569 | if (vha->flags.qpairs_available && cmd_sp->qpair) | ||
1570 | abt_iocb->u.abt.req_que_no = | ||
1571 | cpu_to_le16(cmd_sp->qpair->req->id); | ||
1572 | else | ||
1573 | abt_iocb->u.abt.req_que_no = cpu_to_le16(vha->req->id); | ||
1574 | |||
1568 | sp->done = qla24xx_abort_sp_done; | 1575 | sp->done = qla24xx_abort_sp_done; |
1569 | abt_iocb->timeout = qla24xx_abort_iocb_timeout; | 1576 | abt_iocb->timeout = qla24xx_abort_iocb_timeout; |
1570 | init_completion(&abt_iocb->u.abt.comp); | 1577 | init_completion(&abt_iocb->u.abt.comp); |
@@ -1599,6 +1606,9 @@ qla24xx_async_abort_command(srb_t *sp) | |||
1599 | struct qla_hw_data *ha = vha->hw; | 1606 | struct qla_hw_data *ha = vha->hw; |
1600 | struct req_que *req = vha->req; | 1607 | struct req_que *req = vha->req; |
1601 | 1608 | ||
1609 | if (vha->flags.qpairs_available && sp->qpair) | ||
1610 | req = sp->qpair->req; | ||
1611 | |||
1602 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1612 | spin_lock_irqsave(&ha->hardware_lock, flags); |
1603 | for (handle = 1; handle < req->num_outstanding_cmds; handle++) { | 1613 | for (handle = 1; handle < req->num_outstanding_cmds; handle++) { |
1604 | if (req->outstanding_cmds[handle] == sp) | 1614 | if (req->outstanding_cmds[handle] == sp) |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 2c6a236dff96..1b62e943ec49 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -3275,7 +3275,9 @@ qla24xx_abort_iocb(srb_t *sp, struct abort_entry_24xx *abt_iocb) | |||
3275 | memset(abt_iocb, 0, sizeof(struct abort_entry_24xx)); | 3275 | memset(abt_iocb, 0, sizeof(struct abort_entry_24xx)); |
3276 | abt_iocb->entry_type = ABORT_IOCB_TYPE; | 3276 | abt_iocb->entry_type = ABORT_IOCB_TYPE; |
3277 | abt_iocb->entry_count = 1; | 3277 | abt_iocb->entry_count = 1; |
3278 | abt_iocb->handle = cpu_to_le32(MAKE_HANDLE(req->id, sp->handle)); | 3278 | abt_iocb->handle = |
3279 | cpu_to_le32(MAKE_HANDLE(aio->u.abt.req_que_no, | ||
3280 | aio->u.abt.cmd_hndl)); | ||
3279 | abt_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); | 3281 | abt_iocb->nport_handle = cpu_to_le16(sp->fcport->loop_id); |
3280 | abt_iocb->handle_to_abort = | 3282 | abt_iocb->handle_to_abort = |
3281 | cpu_to_le32(MAKE_HANDLE(req->id, aio->u.abt.cmd_hndl)); | 3283 | cpu_to_le32(MAKE_HANDLE(req->id, aio->u.abt.cmd_hndl)); |
@@ -3283,7 +3285,7 @@ qla24xx_abort_iocb(srb_t *sp, struct abort_entry_24xx *abt_iocb) | |||
3283 | abt_iocb->port_id[1] = sp->fcport->d_id.b.area; | 3285 | abt_iocb->port_id[1] = sp->fcport->d_id.b.area; |
3284 | abt_iocb->port_id[2] = sp->fcport->d_id.b.domain; | 3286 | abt_iocb->port_id[2] = sp->fcport->d_id.b.domain; |
3285 | abt_iocb->vp_index = vha->vp_idx; | 3287 | abt_iocb->vp_index = vha->vp_idx; |
3286 | abt_iocb->req_que_no = cpu_to_le16(req->id); | 3288 | abt_iocb->req_que_no = cpu_to_le16(aio->u.abt.req_que_no); |
3287 | /* Send the command to the firmware */ | 3289 | /* Send the command to the firmware */ |
3288 | wmb(); | 3290 | wmb(); |
3289 | } | 3291 | } |