Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: mpi3mr: Clear reset history on ready and recheck state after timeout

The driver retains reset history even after the IOC has successfully
reached the READY state. That leaves stale reset information active during
normal operation and can mislead recovery and diagnostics. In addition, if
the IOC becomes READY just as the ready timeout loop exits, the driver
still follows the failure path and may retry or report failure incorrectly.

Clear reset history once READY is confirmed so driver state matches actual
IOC status. After the timeout loop, recheck the IOC state and treat READY
as success instead of failing.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://patch.msgid.link/20260225082622.82588-1-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Ranjan Kumar and committed by
Martin K. Petersen
dbd53975 1ac22c8e

+10
+10
drivers/scsi/mpi3mr/mpi3mr_fw.c
··· 1618 1618 ioc_info(mrioc, 1619 1619 "successfully transitioned to %s state\n", 1620 1620 mpi3mr_iocstate_name(ioc_state)); 1621 + mpi3mr_clear_reset_history(mrioc); 1621 1622 return 0; 1622 1623 } 1623 1624 ioc_status = readl(&mrioc->sysif_regs->ioc_status); ··· 1637 1636 msleep(100); 1638 1637 elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000; 1639 1638 } while (elapsed_time_sec < mrioc->ready_timeout); 1639 + 1640 + ioc_state = mpi3mr_get_iocstate(mrioc); 1641 + if (ioc_state == MRIOC_STATE_READY) { 1642 + ioc_info(mrioc, 1643 + "successfully transitioned to %s state after %llu seconds\n", 1644 + mpi3mr_iocstate_name(ioc_state), elapsed_time_sec); 1645 + mpi3mr_clear_reset_history(mrioc); 1646 + return 0; 1647 + } 1640 1648 1641 1649 out_failed: 1642 1650 elapsed_time_sec = jiffies_to_msecs(jiffies - start_time)/1000;