public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ranjan Kumar <ranjan.kumar@broadcom.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>,
	Sasha Levin <sashal@kernel.org>,
	sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com,
	suganath-prabu.subramani@broadcom.com, jejb@linux.ibm.com,
	MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 06/13] scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
Date: Mon, 11 Mar 2024 11:13:41 -0400	[thread overview]
Message-ID: <20240311151354.318293-6-sashal@kernel.org> (raw)
In-Reply-To: <20240311151354.318293-1-sashal@kernel.org>

From: Ranjan Kumar <ranjan.kumar@broadcom.com>

[ Upstream commit ee0017c3ed8a8abfa4d40e42f908fb38c31e7515 ]

If the driver detects that the controller is not ready before sending the
first IOC facts command, it will wait for a maximum of 10 seconds for it to
become ready. However, even if the controller becomes ready within 10
seconds, the driver will still issue a diagnostic reset.

Modify the driver to avoid sending a diag reset if the controller becomes
ready within the 10-second wait time.

Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Link: https://lore.kernel.org/r/20240221071724.14986-1-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 809be43f440dc..8e6ac08e553bb 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7398,7 +7398,9 @@ _base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout)
 		return -EFAULT;
 	}
 
- issue_diag_reset:
+	return 0;
+
+issue_diag_reset:
 	rc = _base_diag_reset(ioc);
 	return rc;
 }
-- 
2.43.0


  parent reply	other threads:[~2024-03-11 15:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-11 15:13 [PATCH AUTOSEL 6.1 01/13] btrfs: fix data races when accessing the reserved amount of block reserves Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 02/13] btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 03/13] net: smsc95xx: add support for SYS TEC USB-SPEmodule1 Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 04/13] wifi: mac80211: only call drv_sta_rc_update for uploaded stations Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 05/13] ASoC: amd: yc: Add Lenovo ThinkBook 21J0 into DMI quirk table Sasha Levin
2024-03-11 15:13 ` Sasha Levin [this message]
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 07/13] ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 08/13] drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 09/13] ASoC: amd: yc: add new YC platform variant (0x63) support Sasha Levin
2024-03-11 15:43   ` Mukunda,Vijendar
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 10/13] ASoC: amd: yc: Fix non-functional mic on Lenovo 21J2 Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 11/13] Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 12/13] Bluetooth: mgmt: Fix limited discoverable off timeout Sasha Levin
2024-03-11 15:13 ` [PATCH AUTOSEL 6.1 13/13] firewire: core: use long bus reset on gap count error Sasha Levin

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=20240311151354.318293-6-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=MPT-FusionLinux.pdl@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=ranjan.kumar@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=stable@vger.kernel.org \
    --cc=suganath-prabu.subramani@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