From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "mroos@linux.ee" <mroos@linux.ee>,
"qla2xxx-upstream@qlogic.com" <qla2xxx-upstream@qlogic.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"himanshu.madhani@cavium.com" <himanshu.madhani@cavium.com>
Subject: Re: qla2xxx UBSAN warning in 4.14-rc1
Date: Wed, 24 Jan 2018 21:13:40 +0000 [thread overview]
Message-ID: <1516828413.3987.18.camel@wdc.com> (raw)
In-Reply-To: <alpine.LRH.2.21.1709181335450.628@math.ut.ee>
On Mon, 2017-09-18 at 13:49 +0300, Meelis Roos wrote:
> Hello, I decided to widen the coverage of my kernel testbed and put some
> FC cards into servers. This one is a PCI-X QLA2340 in HP Proliant DL 380
> G4 (first 64-bit generation of Proliants). I got a UBSAN warning from
> qla2xxx before probing for the firmware.
Would it be possible for you to test the (completely untested) patch below?
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 16c43bd9bb83..4cdda66a9f32 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -272,7 +272,7 @@ qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
/* Read all mbox registers? */
- mboxes = (1 << ha->mbx_count) - 1;
+ mboxes = (ha->mbx_count != 32 ? 1U << ha->mbx_count : 0) - 1U;
if (!ha->mcp)
ql_dbg(ql_dbg_async, vha, 0x5001, "MBX pointer ERROR.\n");
else
Thanks,
Bart.
next prev parent reply other threads:[~2018-01-24 21:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 10:49 qla2xxx UBSAN warning in 4.14-rc1 Meelis Roos
2017-09-26 21:36 ` Madhani, Himanshu
2017-11-09 8:59 ` Meelis Roos
2017-11-10 4:49 ` Himanshu Madhani
2018-01-24 20:35 ` Meelis Roos
2018-01-24 21:13 ` Bart Van Assche [this message]
2018-01-24 22:18 ` Meelis Roos
2018-01-25 7:25 ` Madhani, Himanshu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516828413.3987.18.camel@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=himanshu.madhani@cavium.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mroos@linux.ee \
--cc=qla2xxx-upstream@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox