Re: [PATCH v5 10/15] qla2xxx: Fix the code that reads from mailbox registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(&reg->isp25mq.req_q_out);
>>           else if (IS_P3P_TYPE(ha))
>> -            cnt = RD_REG_DWORD(&reg->isp82.req_q_out);
>> +            cnt = RD_REG_DWORD(reg->isp82.req_q_out);
>>           else if (IS_FWI2_CAPABLE(ha))
>>               cnt = RD_REG_DWORD(&reg->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 = &reg->isp25mq.req_q_in;
drivers/scsi/qla2xxx/qla_mid.c:771:	req->req_q_out = &reg->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.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux