From patchwork Wed Feb 21 07:17:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ranjan Kumar X-Patchwork-Id: 774796 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE8AE3A8CF for ; Wed, 21 Feb 2024 07:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708499980; cv=none; b=AxlgXLEz/EfDSkBbLMKPXae7bfc4d3AHCx+b+Reg1CZCy3BMx3/l1gGqYZxv7wcxc5nSxB5nwLzfXnCX/914nBCDsy0Ju0yjZNs0TBd7lB/tuJrk6gdwPyNSO6Z1Cejyyb5HYuEr3fYdFDie0jiNv4ynrPYInB3vORqjUEkGMhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708499980; c=relaxed/simple; bh=s/buc127yX+rc5wMY7ko/AVofCM0jOLdlR0uhBsKz7o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=uQy2CqQfGFORtNhGFsWioqsVtXnEKdcBCADJgySMQ3nAlJguOdRFI5kwtsPKSIxQZnyV0gBBiYu0wlUcW5XV3DPvg9SJbOEPO/h8XpaRZ9iUaYBe04AS9HlDzotJcUbX9lO/jobZ4FnFa4o4tGGN3ADOh645NPREDBX/i35OWwk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=Bcy6Dat/; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Bcy6Dat/" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-5d8ddbac4fbso5214928a12.0 for ; Tue, 20 Feb 2024 23:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1708499977; x=1709104777; darn=vger.kernel.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=71IAKFUKBIaOdojQGtBrYlGnM7t7Jd2XvWkb6mOx1PA=; b=Bcy6Dat/Lu7OQhDTDaVGdSxl3l0ULT2eHHos+04CjaQ5XvGd4VjC2AunLEU366IkE+ mNae2tJ+rG70TCqQl0YRCJ4VCRzxnN6FZpm58BYY10D6osLrxvt9fKojcGMaX0It2lwA wyO7rLl8fDOqt4XV5IH6NYQeDTSoHS/vYEbb0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708499977; x=1709104777; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=71IAKFUKBIaOdojQGtBrYlGnM7t7Jd2XvWkb6mOx1PA=; b=uos/eo3pyaqlkwqVkO9ldrTH4cZnnohZb5gsG9q84HOZLCah9tUiK3PsmtO6CG1G9H MyX5VLg9eboEuhZHm7RuHtjhDd9+NJxXEKhETpvXSRaTJv9Mh4DEhQRcHVMTr+8USULE Ii3K9NvuYdj2+wVDSKmno7qqAfcpvpLWVjq9SBYveHCAy8ofYtc4AJc86vSFPdjSaMsf 9drRcxtnYlLn4hj3Mk/lFonQzz0vwQuntLcWcX8OiY8Ndr8MqLKRwnyMF91bOb6ErhZj UvPrxanPTbOmX6a0vUJq+/tdct+HVyd8hEtGSQd77fhtxRar6xknqzAzb5haMQRP4lEC D5eA== X-Gm-Message-State: AOJu0YxFuV2SbybOfQJ/AzYLNWo1vAk9FSzffCIv2EBFlN18Qsl70ekx rXDGGh1l5fSWvpd8KQX4mjVLydzLP6wRp3IxXNC8/Oh6PJXNtpuH5nbqyHD7z/O+I9hqh0DkD5U YdiySYnfN4J6WFYP+X4fUb6Hdqjh/uU/hBoTH7YYQXz4EfQVI49LODdntTTRfm3ctpWH/9V0Nj5 qNk6B/HmYrEjZuJib90uZ0ZOd6AqmN0y1kf6r/kI8EwVkxUA== X-Google-Smtp-Source: AGHT+IG7BWRycqvhCtEof2PcBBBJxs2T3gh/beVrC6TQrk+vt+HLZL3+EgGC7a4ejZTQ/iPzFUeoyA== X-Received: by 2002:a05:6a20:6f07:b0:1a0:a43b:cbe4 with SMTP id gt7-20020a056a206f0700b001a0a43bcbe4mr9142667pzb.22.1708499977278; Tue, 20 Feb 2024 23:19:37 -0800 (PST) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s8-20020a17090a948800b00299354e8828sm8643682pjo.51.2024.02.20.23.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 23:19:36 -0800 (PST) From: Ranjan Kumar To: linux-scsi@vger.kernel.org, martin.petersen@oracle.com Cc: sathya.prakash@broadcom.com, Ranjan Kumar Subject: [PATCH] mpt3sas: Driver issues diag_reset even the controller is in ready state in time frame Date: Wed, 21 Feb 2024 12:47:24 +0530 Message-Id: <20240221071724.14986-1-ranjan.kumar@broadcom.com> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-scsi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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 the controller to become ready.However, even if the controller becomes ready within 10 seconds, the driver still issue a diagnostic reset. To reslove the issue driver is modified not to send a diag reset if the controller becomes ready within the 10-second wait time. Signed-off-by: Ranjan Kumar --- 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 fc8c45e15235..1b492e9a3e55 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -7378,7 +7378,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; }