scsi: mpi3mr: Fix error return, start_time, and timeout check in mpi3mr_bring_ioc_ready()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyIn review
- v11 patch 2 repliesSuperseded
Changes in v2 from the cover letter
- 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
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | scsi: mpi3mr: Return error on all failure exits in mpi3mr_bring_ioc_ready()drivers/ | +2 | 0 replies | |
| 2/3 | scsi: mpi3mr: Initialize start_time on all paths in mpi3mr_bring_ioc_ready()drivers/ | +5 | 0 replies | |
| 3/3 | scsi: mpi3mr: Avoid ready_timeout underflow in mpi3mr_bring_ioc_ready()drivers/ | +1 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Laurence Oberman |
|---|---|
| Series | T-b |
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] scsi: mpi3mr: Fix error return, start_time, and timeout check in mpi3mr_bring_ioc_ready()
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/[email protected]
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(-)
Signature · 1 line
2.56.1.750.gf70dc682cf-goog