Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp480120lql; Mon, 11 Mar 2024 08:16:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVmzqP0MiuVvWKJven+SZVrJaiE9aRgekZACHROZ5gEydQfQmp/0HKZsnvx2STWalmLgZHA/5briXljD6L981qQVWE/b7t7YKPCYHBBUQ== X-Google-Smtp-Source: AGHT+IHqrs0g4Gr1i38Xc9E9NrjnbK3Yn6t+YKFnmHmQICTTCKpoQEQ8PQ2RmtW9H265Ar9SWW0/ X-Received: by 2002:a05:6602:1d7:b0:7c8:65af:20ce with SMTP id w23-20020a05660201d700b007c865af20cemr6730759iot.15.1710170174803; Mon, 11 Mar 2024 08:16:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710170174; cv=pass; d=google.com; s=arc-20160816; b=QmIt922CK54UHEl6yuPpIb8OyjLE0BhiuXCPR4rN/VlI2Fjz/6qKmm7m07aVLNA8p1 Yicq0DaFUUAsGlaewp1+qKDxAagO1Y3p5D3BOgjXUuOO9muRUUjGF8sykn8uybCw99go 45xmKZvlByCdASN1bg+XxRgTi7fwNyBTdLj8m/W9W2N3K2x0JDISEniiPAuMcHlxEe3i 3t5Fv/sDOqhm0N0myV0X+LHeSMwBBzqhS9J9a+wumpRDVOMrZfbae+gzRerqpSa03T7I 5zDGappLnCWOpecwsH81pFxy2RvuuKCPj/flY5JNiikABxuOw2++tun+SCOZujH96l/p bxSg== 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=ReP/aQrpt2XG0BlDJCS601p/l5sUIMyuvMq7vPgGGTc=; fh=ijGJOgpT8CXasYSuzaVI6pLUjTfB0JIHeaY5gg2NwSc=; b=EdFPWcE6Al8gZE0GcReF/oHw7n0fc0mXyzrxt9Tdv6YywZzmTylS4Kg6CG5C0PWkch wfNNdqfNY5wB9qjbwsAao7G36psxd+LWHCdWGXF2MzT9qZnpXurvGcRdWKoj5ZQ99jiq 1e+fiwSRhV/I9hMLJeblQ3ze2CuCMrUvFiM0KjhA60pqBraQSmDIPJ8/2TKBpygJttXo plEDRGhnAHKlvqBAz5gJYTNXxR/r48vr8r+agbmjq81m0oqrdhFUX+qivoxGKwBj2dqt RzG1g9Omi0y7mPuABeYLf+RCK11GN/4/+A46eMqXPsIuA/BF9uy3/1e/MONMZYNqwPlM wPTw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nH1hc/bm"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a29-20020a631a1d000000b005e4ceab6dbesi5072673pga.880.2024.03.11.08.16.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 08:16:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="nH1hc/bm"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-99061-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99061-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 76B9A2812CC for ; Mon, 11 Mar 2024 15:16:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBD3C53E00; Mon, 11 Mar 2024 15:12:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nH1hc/bm" 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 EF5BE535A8; Mon, 11 Mar 2024 15:12:45 +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=1710169966; cv=none; b=I6/wJBf61qesBTobQgi18VQY/w4hKv1x8z62IULf+8KBHDGYfmOa3ZkjktdkDqvQRxQ/UoTv0zeYXfmAltLA8N5WsE9TQysSA3nla8EQu9I5WRCU09Ntth1A1AeQgK/51O+OgbR5aaNCrMnRcsRa9reyGEcDBh/gUY28h65rT4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710169966; c=relaxed/simple; bh=fcYzSLOFq5sMLBWQn8a4zJLsYwI3TPCX+aV1ze6z2EI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZPGjpQjMHlp9Pl1oKk0ZEBOZnj/5cdMEF6XxzkxLzJnXKKx5aIOqJerpR4w2AKGYZQZuKyakB5xJQVcTcc0tpfZ3Dks9SSOZ90+CYc+MiCcFHR/lqAua+e1RQ96d+yqQZia677SJiBjBvj80R9gOIJk5aqwBjEXXSoNLTLabCfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nH1hc/bm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD7BC433F1; Mon, 11 Mar 2024 15:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710169965; bh=fcYzSLOFq5sMLBWQn8a4zJLsYwI3TPCX+aV1ze6z2EI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nH1hc/bmJYpavXfpK/sJBy5a5aNWd3uTyz9WtvV9t3iu3vtb2S1RWlzsGkeLQHX0q jslO2QS2rDBef+FZbKn9caVU0OMpwJtwSJFQf2eAV3HaRas52lZ+kQEgt1TQhkAMOa gPcqNqEeErmGthRupZ0eBOAoXlTMftEjci7towvDgOWRD6EIAkXfwMusLHvm5I7u54 IJEm6j6UeYL8mIV8VSrFV40C1ilnrPtm7xp5cXC0Rfx2WgxfyoS5bBcgJd3lslsMvp 7wjxSdUJcBxNdp1D3EZqerFcoJXeXx1nJyE//ZH2ihoOV9rXv5Gn4mA5Y67lB+9k2H REnbj1amZ1iaQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ranjan Kumar , "Martin K . Petersen" , Sasha Levin , 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.7 13/23] scsi: mpt3sas: Prevent sending diag_reset when the controller is ready Date: Mon, 11 Mar 2024 11:11:53 -0400 Message-ID: <20240311151217.317068-13-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240311151217.317068-1-sashal@kernel.org> References: <20240311151217.317068-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 X-stable-base: Linux 6.7.9 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 a75f670bf5519..aa29e250cf15f 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -7387,7 +7387,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