]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
authorRanjan Kumar <ranjan.kumar@broadcom.com>
Wed, 21 Feb 2024 07:17:24 +0000 (12:47 +0530)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:14 +0000 (18:19 -0400)
commitc59d1a4e1277a7be1c41cf2207e713b83cf466d0
treefdf95a526767a12408041bbd8f0b55bb56225bdf
parentda7224eb17af44b53b5469c2dcf2c15881404936
scsi: mpt3sas: Prevent sending diag_reset when the controller is ready

[ 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