From: Ranjan Kumar <ranjan.kumar@broadcom.com>
To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com
Cc: rajsekhar.chundru@broadcom.com, sathya.prakash@broadcom.com,
sumit.saxena@broadcom.com, chandrakanth.patil@broadcom.com,
sreekanth.reddy@broadcom.com,
Ranjan Kumar <ranjan.kumar@broadcom.com>
Subject: [PATCH v1 1/6] mpi3mr: Invokes soft reset upon TSU or event ack time out
Date: Mon, 24 Jul 2023 18:52:58 +0530 [thread overview]
Message-ID: <20230724132303.19470-2-ranjan.kumar@broadcom.com> (raw)
In-Reply-To: <20230724132303.19470-1-ranjan.kumar@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 1877 bytes --]
When a timestamp update or an event acknowledgment command times out,
the driver invokes soft reset handler to recover the controller while
holding a mutex lock.The soft reset handler also tries to acquire the
same mutex to send initialization commands to the controller which
leads to a deadlock scenario .
To resolve the issue the driver will check the controller status and
if it is operational,the driver will issue a diagnostic fault reset
and exit out of the command processing function.If the controller
is already faulted or asynchronously reset, then the driver will
just exit the command processing function.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
---
drivers/scsi/mpi3mr/mpi3mr_fw.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 5fa07d6ee5b8..11b78d4a87a0 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -2343,8 +2343,8 @@ static int mpi3mr_sync_timestamp(struct mpi3mr_ioc *mrioc)
ioc_err(mrioc, "Issue IOUCTL time_stamp: command timed out\n");
mrioc->init_cmds.is_waiting = 0;
if (!(mrioc->init_cmds.state & MPI3MR_CMD_RESET))
- mpi3mr_soft_reset_handler(mrioc,
- MPI3MR_RESET_FROM_TSU_TIMEOUT, 1);
+ mpi3mr_check_rh_fault_ioc(mrioc,
+ MPI3MR_RESET_FROM_TSU_TIMEOUT);
retval = -1;
goto out_unlock;
}
@@ -3359,8 +3359,8 @@ int mpi3mr_process_event_ack(struct mpi3mr_ioc *mrioc, u8 event,
if (!(mrioc->init_cmds.state & MPI3MR_CMD_COMPLETE)) {
ioc_err(mrioc, "Issue EvtNotify: command timed out\n");
if (!(mrioc->init_cmds.state & MPI3MR_CMD_RESET))
- mpi3mr_soft_reset_handler(mrioc,
- MPI3MR_RESET_FROM_EVTACK_TIMEOUT, 1);
+ mpi3mr_check_rh_fault_ioc(mrioc,
+ MPI3MR_RESET_FROM_EVTACK_TIMEOUT);
retval = -1;
goto out_unlock;
}
--
2.31.1
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4209 bytes --]
next prev parent reply other threads:[~2023-07-24 13:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 13:22 [PATCH v1 0/6] mpi3mr: Few Enhancements and minor fixes Ranjan Kumar
2023-07-24 13:22 ` Ranjan Kumar [this message]
2023-07-24 13:22 ` [PATCH v1 2/6] mpi3mr: Update MPI Headers to version 3.00.28 Ranjan Kumar
2023-07-24 13:23 ` [PATCH v1 3/6] mpi3mr: Add support for more than 1MB I/O Ranjan Kumar
2023-07-24 13:23 ` [PATCH v1 4/6] mpi3mr: WriteSame implementation Ranjan Kumar
2023-07-26 1:24 ` Martin K. Petersen
2023-07-27 17:06 ` kernel test robot
2023-07-24 13:23 ` [PATCH v1 5/6] mpi3mr: Enhance handling of devices removed after controller reset Ranjan Kumar
2023-07-24 13:23 ` [PATCH v1 6/6] mpi3mr: Update driver version to 8.5.0.0.0 Ranjan Kumar
2023-07-26 1:04 ` [PATCH v1 0/6] mpi3mr: Few Enhancements and minor fixes Martin K. Petersen
2023-07-26 10:41 ` Ranjan kumar
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=20230724132303.19470-2-ranjan.kumar@broadcom.com \
--to=ranjan.kumar@broadcom.com \
--cc=chandrakanth.patil@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=rajsekhar.chundru@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