On 2020-05-11 23:17, Hannes Reinecke wrote: > On 5/11/20 10:09 PM, Bart Van Assche wrote: >> diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c >> index 182bd68c79ac..4d8039fc02e7 100644 >> --- a/drivers/scsi/qla2xxx/qla_iocb.c >> +++ b/drivers/scsi/qla2xxx/qla_iocb.c >> @@ -2268,7 +2268,7 @@ __qla2x00_alloc_iocbs(struct qla_qpair *qpair, srb_t *sp) >> IS_QLA28XX(ha)) >> cnt = RD_REG_DWORD(®->isp25mq.req_q_out); >> else if (IS_P3P_TYPE(ha)) >> - cnt = RD_REG_DWORD(®->isp82.req_q_out); >> + cnt = RD_REG_DWORD(reg->isp82.req_q_out); >> else if (IS_FWI2_CAPABLE(ha)) >> cnt = RD_REG_DWORD(®->isp24.req_q_out); >> else if (IS_QLAFX00(ha)) > > WTF? > Is 'isp82.req_q_out' a pointer, but the others are not? > This really looks dodgy... Hi Hannes, This is what I found in the qla2xxx source code: /* Request queue data structure */ struct req_que { [ ... ] uint32_t __iomem *req_q_in; /* FWI2-capable only. */ uint32_t __iomem *req_q_out; [ ... ] }; $ git grep -nHEw 'req_q_(out|in) = ' drivers/scsi/qla2xxx/qla_mid.c:770: req->req_q_in = ®->isp25mq.req_q_in; drivers/scsi/qla2xxx/qla_mid.c:771: req->req_q_out = ®->isp25mq.req_q_out; drivers/scsi/qla2xxx/qla_os.c:3217: req->req_q_in = &ha->iobase->isp24.req_q_in; drivers/scsi/qla2xxx/qla_os.c:3218: req->req_q_out = &ha->iobase->isp24.req_q_out; drivers/scsi/qla2xxx/qla_os.c:3223: req->req_q_in = &ha->mqiobase->isp25mq.req_q_in; drivers/scsi/qla2xxx/qla_os.c:3224: req->req_q_out = &ha->mqiobase->isp25mq.req_q_out; drivers/scsi/qla2xxx/qla_os.c:3230: req->req_q_in = &ha->iobase->ispfx00.req_q_in; drivers/scsi/qla2xxx/qla_os.c:3231: req->req_q_out = &ha->iobase->ispfx00.req_q_out; drivers/scsi/qla2xxx/qla_os.c:3237: req->req_q_out = &ha->iobase->isp82.req_q_out[0]; Bart.