mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.15 1/5] scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
@ 2024-03-11 15:14 Sasha Levin
  2024-03-11 15:14 ` [PATCH AUTOSEL 5.15 2/5] ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port Sasha Levin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sasha Levin @ 2024-03-11 15:14 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Ranjan Kumar, Martin K . Petersen, Sasha Levin, sathya.prakash,
	sreekanth.reddy, suganath-prabu.subramani, jejb,
	MPT-FusionLinux.pdl, linux-scsi

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 e524e1fc53fa3..8325875bfc4ed 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7238,7 +7238,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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-14  3:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 15:14 [PATCH AUTOSEL 5.15 1/5] scsi: mpt3sas: Prevent sending diag_reset when the controller is ready Sasha Levin
2024-03-11 15:14 ` [PATCH AUTOSEL 5.15 2/5] ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port Sasha Levin
2024-03-11 15:14 ` [PATCH AUTOSEL 5.15 3/5] drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series Sasha Levin
2024-03-13 20:03   ` Felix Kuehling
2024-03-13 20:46     ` Alex Deucher
2024-03-14  3:00       ` Liang, Prike
2024-03-11 15:14 ` [PATCH AUTOSEL 5.15 4/5] Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security Sasha Levin
2024-03-11 15:14 ` [PATCH AUTOSEL 5.15 5/5] firewire: core: use long bus reset on gap count error Sasha Levin

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®