Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2555880lqp; Mon, 25 Mar 2024 02:27:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmlbNe5tDdnTcStxTusPUqIGtlqayifGjVp+t7H4aE5CeuGwLRD/X1oj16+P0nufoTg0oWyS8h35eeyKnYRvw5lYBpEhn2iod8D+vL5w== X-Google-Smtp-Source: AGHT+IEYGW5PZymjZm4vn1NrYISZvo5UYAg3yDW8QS7/UGE5Mq3w67mcUbjnUlU8jbltUme2n79w X-Received: by 2002:a17:906:c00f:b0:a47:20a1:5a4a with SMTP id e15-20020a170906c00f00b00a4720a15a4amr3871468ejz.23.1711358862581; Mon, 25 Mar 2024 02:27:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711358862; cv=pass; d=google.com; s=arc-20160816; b=VAdi+SdlbiwCdBCAUwxlN/5uoU0Wj6Eonu5JsCYeI+rpA8Nn9he/p7vXa9KnBaLc5Z oL3cc92OhRf9CavaMrz9PcSWkGz1PZPpbzZdI/QIl1mBsb2jVuhjGUww++ZmZhZ4u3Iz Otucs/+epqwnNzay5LKK1vm66VXMaNt5ZIBospheUbuNB29OKBjBO2cbUisNkP0mF6Ke nQno4rwQxDliu5xHA5XVJ+y2AyYe3pewI/Qv1XoqFmZcrLX3PvKOn+PilCo0Zgj/TOPH oYNrRLhWZK72x5OhcMZ8y9ocxLo+E1Z6svJCOqXwaGB3CZyWhisPBjSY3f29aCtrNT7+ Mdzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=bXznOUgaRa3edlZ5u8I4ggDeElk7rrdUfpt+ni/wtfs=; fh=9YnEKPh4RmmW1GRWFucdSyO7vJlEb5ZkGpKg1K2SATc=; b=u1nQalM/Bw9n8wb9iuLpAazzMWANQ/bbxvJu/gQ5QH6hz0wY2SPVIGe/aEQRYRo3JU i9ZiAseEtyALIreqR1Uthci756dtjs5QtQryPSyHClFG0YHdjuuH/6zKVpUQe3YY3pup Jzok7dHN3lJKLexJm7iIQ3FS0o5aXOcDKEKVmf5Ab1zSy0m71zR6KgsnQNolh50sJ3hw WAd4pjgo4/vkSwKsnd9QCwJMZR3DTEJMuPKAoc+CFaegfrA0ixrzdrWqann8wGKXMomb 7mXrr+0LtQLzxEDPywwN/TrDarzcB10/Q4QfbWx/V/1thOb1okEO5GqHgRGOpjM4x5Cv n8dw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dRIbn3pv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l23-20020a1709062a9700b00a4315f2eb12si2314664eje.167.2024.03.25.02.27.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dRIbn3pv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115777-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115777-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 77F4A1F2F983 for ; Mon, 25 Mar 2024 09:20:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C82B1158DB2; Mon, 25 Mar 2024 03:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dRIbn3pv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 533D4145330; Sun, 24 Mar 2024 23:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321974; cv=none; b=R49+OBlXu1DkelOzy8XBzXiiviMO1GZGzeyJa4EFi363BX/J8oEx5i+VPJC++HTNhZfSpg+KhkgWPgSgrLCqnSHUe8qo1mGipVgZS6XlWe4xomWpk0wzZnvLmNWzse7ZcV6L3J+KNozlKYaBPeUO/4TGciiZvzFU3tjEbLbWjFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321974; c=relaxed/simple; bh=vko/+J46uPjjVxQ7eGm2PmvehHWRDiGajfhump5oooI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=apk+dRUfSdzTNfSbd7ZRRV9UapbIvgA2qOoBnylyXLrtOU0Ivnej6bRD3eXC3mAkYmtwmtjPCiolHE3X8+wRKv876KqLmpzEmntmIJS7qTTZldE/FwwV9buERx9EqNTf3LT0/M1PtGillDp5bZiLK3/i/Nieknglgg8GN+/O6Tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dRIbn3pv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93CD9C433F1; Sun, 24 Mar 2024 23:12:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321973; bh=vko/+J46uPjjVxQ7eGm2PmvehHWRDiGajfhump5oooI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dRIbn3pvzprtefFl93j9Nxeoofnyb+muYHmLMo1v2LmkUoqSZxPQTjyU1B5qDastA oPVtNJ8Ts2aw60o76o+9K3xxLzuW+bocpCCPmGL2rxHANU4BWVSsisRTjIRFCmqleD JBgr1LTVDKEVIvDToeBFGfwDN0CBrHehp8hIsbuo4bC3CTCvRukd/VXdBqOq5rIlea lnZpd7bDKNxLx2b7mVOBHw+YbgK/2t//kYdg7arZxqpBthONyQbA5kdGYynU1vz8OD LEi1XklTFA26Ah+SSGYxar85gyFgWrLgOMOEkBtVPyNYJ/vP9ahTBf08Czlob3R1XS O2MU9u0MrFlWg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ranjan Kumar , "Martin K . Petersen" , Sasha Levin Subject: [PATCH 6.1 045/451] scsi: mpt3sas: Prevent sending diag_reset when the controller is ready Date: Sun, 24 Mar 2024 19:05:21 -0400 Message-ID: <20240324231207.1351418-46-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Ranjan Kumar [ 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 Link: https://lore.kernel.org/r/20240221071724.14986-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- 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