Message ID | 20220308082048.9774-2-njavali@marvell.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | qla2xxx driver fixes | expand |
> On Mar 8, 2022, at 12:20 AM, Nilesh Javali <njavali@marvell.com> wrote: > > From: Quinn Tran <qutran@marvell.com> > > User experienced no task management error while target device > is responding with error. The RSP_CODE field in the status > iocb is in little endian. Driver assumes it's big endian, > where it picked up erroneous data. > > Convert the data back to big endian as is on the wire, > where current code will pick up correct status. > > Cc: stable@vger.kernel.org > Fixes: faef62d13463 ("[SCSI] qla2xxx: Fix Task Management command asynchronous handling") > Signed-off-by: Quinn Tran <qutran@marvell.com> > Signed-off-by: Nilesh Javali <njavali@marvell.com> > --- > drivers/scsi/qla2xxx/qla_isr.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c > index aaf6504570fd..198b782d7790 100644 > --- a/drivers/scsi/qla2xxx/qla_isr.c > +++ b/drivers/scsi/qla2xxx/qla_isr.c > @@ -2498,6 +2498,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) > iocb->u.tmf.data = QLA_FUNCTION_FAILED; > } else if ((le16_to_cpu(sts->scsi_status) & > SS_RESPONSE_INFO_LEN_VALID)) { > + host_to_fcp_swap(sts->data, sizeof(sts->data)); > if (le32_to_cpu(sts->rsp_data_len) < 4) { > ql_log(ql_log_warn, fcport->vha, 0x503b, > "Async-%s error - hdl=%x not enough response(%d).\n", > -- > 2.19.0.rc0 > Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> -- Himanshu Madhani Oracle Linux Engineering
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index aaf6504570fd..198b782d7790 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c @@ -2498,6 +2498,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req, void *tsk) iocb->u.tmf.data = QLA_FUNCTION_FAILED; } else if ((le16_to_cpu(sts->scsi_status) & SS_RESPONSE_INFO_LEN_VALID)) { + host_to_fcp_swap(sts->data, sizeof(sts->data)); if (le32_to_cpu(sts->rsp_data_len) < 4) { ql_log(ql_log_warn, fcport->vha, 0x503b, "Async-%s error - hdl=%x not enough response(%d).\n",