From: Laurence Oberman <loberman@redhat.com>
To: Ian Rogers <irogers@google.com>,
Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
Kashyap Desai <kashyap.desai@broadcom.com>,
Sumit Saxena <sumit.saxena@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>
Cc: mpi3mr-linuxdrv.pdl@broadcom.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
Elkin Cruz <elkin@google.com>
Subject: Re: [PATCH v2 0/3] scsi: mpi3mr: Fix error return, start_time, and timeout check in mpi3mr_bring_ioc_ready()
Date: Fri, 20 Nov 2026 15:30:41 -0500 [thread overview]
Message-ID: <4569fb5f7f3d7c65263d4154d7cc3350d9cf8330.camel@redhat.com> (raw)
In-Reply-To: <20261120190031.1587531-1-irogers@google.com>
On Fri, 2026-11-20 at 11:00 -0800, Ian Rogers wrote:
> Split the mpi3mr_bring_ioc_ready() error-handling and retry fixes
> into
> three independent patches with individual Fixes: tags as requested by
> Laurence Oberman:
>
> 1. Return -1 instead of 0 on failure exits in
> mpi3mr_bring_ioc_ready()
> when retval is 0 (such as unrecoverable controller faults, hot-
> unplug
> during reset/diag-save waits, or ready-state faults and timeouts
> after mpi3mr_setup_admin_qpair() sets retval = 0).
> 2. Initialize start_time = jiffies on entry and guard the post-enable
> timestamp reset with a boolean flag so pre-enable failures and
> subsequent retries never read an uninitialized start_time.
> 3. Rewrite 'elapsed_time_sec < (mrioc->ready_timeout - 60)' as
> 'elapsed_time_sec + 60 < mrioc->ready_timeout' to avoid 32-bit
> unsigned underflow if a controller reports ready_timeout < 60.
>
> v2:
> - Split v1 into three patches, each with its own Fixes: tag
> (Laurence
> Oberman).
> - Move 'if (!retval) retval = -1;' to 'out_device_not_present:' in
> patch 1 so a single hunk covers both out_failed fallthroughs and
> early out_device_not_present jumps cleanly for stable backports.
> - Add Laurence's Reviewed-by tag on patches 1 and 2, and note the
> 510s (570s - 60s) firmware timeout math from commit 9634bb07083c
> in
> patch 3.
>
> v1:
> https://lore.kernel.org/r/20261119170900.1530138-1-irogers@google.com
>
> Ian Rogers (3):
> scsi: mpi3mr: Return error on all failure exits in
> mpi3mr_bring_ioc_ready()
> scsi: mpi3mr: Initialize start_time on all paths in
> mpi3mr_bring_ioc_ready()
> scsi: mpi3mr: Avoid ready_timeout underflow in
> mpi3mr_bring_ioc_ready()
>
> drivers/scsi/mpi3mr/mpi3mr_fw.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
Hello Ian
Thanks for the quick v2. Tested the series on 7.4.0-rc1 with a
Broadcom SAS40xx/41xx (FW 8.5.1.0.0.1), two SAS disks attached.
Firmware advertises "ready timeout: 510 seconds" (ioc_info
0xff000000), before and after the series.
Tests, all with mpi3mr_bring_ioc_ready() reaching ready on the first
attempt and no "retrying to bring IOC ready" or "failed to bring"
messages:
- boot probe
- modprobe -r / modprobe (mpi3mr_init_ioc path)
- sg_reset -H under fio 4k randread QD32 (mpi3mr_reinit_ioc path);
host reset completed in ~45s including diag save and port enable,
fio completed with no errors
- PCI remove/rescan of the controller
- 20 iterations of reload + host reset under fio: 40 successful
ready transitions, no retries, no failures, no fio errors
The failure paths themselves were not exercised, as they are hard to
trigger on healthy hardware; this confirms no regression on the good
path.
Minor, 3/3 changelog: the IOC info timeout field is 8 bits in 2s
units, so ready_timeout tops out at 510s and the retry window at 450s;
the "510 seconds" in 9634bb07083c most likely refers to the maximum
ready timeout rather than the retry cap, so 570s cannot be advertised.
Doesn't affect the code change. Martin may be able to fix it up on
apply.
The question to Broadcom on firmware advertising ready_timeout < 60
is still open for 3/3; on this controller it makes no difference.
For the series:
Tested-by: Laurence Oberman <loberman@redhat.com>
Regards
Laurence
prev parent reply other threads:[~2026-11-20 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 19:00 Ian Rogers
2026-11-20 19:00 ` [PATCH v2 1/3] scsi: mpi3mr: Return error on all failure exits " Ian Rogers
2026-11-20 19:00 ` [PATCH v2 2/3] scsi: mpi3mr: Initialize start_time on all paths " Ian Rogers
2026-11-20 19:00 ` [PATCH v2 3/3] scsi: mpi3mr: Avoid ready_timeout underflow " Ian Rogers
2026-11-20 20:30 ` Laurence Oberman [this message]
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=4569fb5f7f3d7c65263d4154d7cc3350d9cf8330.camel@redhat.com \
--to=loberman@redhat.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=elkin@google.com \
--cc=irogers@google.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mkp@kernel.org \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=sumit.saxena@broadcom.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
all inboxes | Powered by JetHome®