From patchwork Thu Jul 30 08:03:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BE6D722 for ; Thu, 30 Jul 2020 08:04:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 835242074B for ; Thu, 30 Jul 2020 08:04:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="JUHdqzup" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728815AbgG3IEY (ORCPT ); Thu, 30 Jul 2020 04:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbgG3IEU (ORCPT ); Thu, 30 Jul 2020 04:04:20 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 545A7C061794 for ; Thu, 30 Jul 2020 01:04:20 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id q17so13313268pls.9 for ; Thu, 30 Jul 2020 01:04:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nJ7WevjVgZ7eT7LoDOQ8U5gkrK3MCM2WTYob4apNT5A=; b=JUHdqzup2VR+qQgPso+mqunO2Z/WLI7mQ4dN3DP6rWUdqW6n/OkleAekdt3KK6EPuD IDdtXqYCVC8qG4x5T+f3CErejBR8aoHz+kLrh/XIOnmf1P2JVLYnTAYF/nmKcPeNEkwv VrF+mE//26HtgsK/HfnMg/OHjHqODzuMWjeRc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nJ7WevjVgZ7eT7LoDOQ8U5gkrK3MCM2WTYob4apNT5A=; b=nySjEilMtXKJdESo4O+aDyeu3qBrv0BkCy42aXmbMOzZNSnopX4Vsqj6+5F1tnzDI0 CXYHh1uqc0phvcK6Gf6i7eYct+QnqW1S0HJ/yXOtIiTYyKy+P2WYBq9sPDF6sZOdb1y1 Zk2L+tnILb77dF1SURVzhdQKU6+LPVjDsj+vl+/PRwYPUT1Zly9RqZU53jIJwEAUreZd 0zDkcGtyXQSUBDmZ8FknaKPnlc5MK4UvJDKTjoyzLj5Y4BdnJiJjHHaDu3x9GPGSKOU4 aBbSPSwzmjcPoKoAgczn48gz5h54Ga5EglAwXk+0FALR+Bk/7dyKxqH1aZIx/GwxQu3W x5Bg== X-Gm-Message-State: AOAM532QDG6XA06OC90AbB3/U2cVf3Ogi/0zJXtZqumbMH2WS1PrkAd+ jKt/I89X49jAyoLmm4r5HPq7uP8YQn8Urw== X-Google-Smtp-Source: ABdhPJy1V2rKswbLeSpJAgBWZjIEd3Lupf7WTinsPYpfXwRDJdT3tevFKRdvBxpK9B7drOtYFKXLFw== X-Received: by 2002:a17:902:bb94:: with SMTP id m20mr20079715pls.190.1596096259795; Thu, 30 Jul 2020 01:04:19 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:19 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 1/7] mpt3sas: Memset config_cmds.reply buffer with zeros Date: Thu, 30 Jul 2020 13:33:43 +0530 Message-Id: <1596096229-3341-2-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Currently config_cmds.reply buffer is not memset to zero before posting config page request message. In some cases, for the current config request, the previous config reply is getting processed and we will observe PageType mismatch between request to reply buffer. It will be difficult to debug this type of issue and it confuses by thinking that HBA Firmware itself posted the wrong config reply. So it is better to memset the config_cmds.reply buffer with zeros before issuing the config request. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c index 62ddf53..17c7abf 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_config.c +++ b/drivers/scsi/mpt3sas/mpt3sas_config.c @@ -372,7 +372,7 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t } r = 0; - memset(mpi_reply, 0, sizeof(Mpi2ConfigReply_t)); + memset(ioc->config_cmds.reply, 0, sizeof(Mpi2ConfigReply_t)); ioc->config_cmds.status = MPT3_CMD_PENDING; config_request = mpt3sas_base_get_msg_frame(ioc, smid); ioc->config_cmds.smid = smid; From patchwork Thu Jul 30 08:03:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692443 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EF0E722 for ; Thu, 30 Jul 2020 08:04:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB3132074B for ; Thu, 30 Jul 2020 08:04:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="bHa20HIk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728826AbgG3IEZ (ORCPT ); Thu, 30 Jul 2020 04:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IEY (ORCPT ); Thu, 30 Jul 2020 04:04:24 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3702C0619D2 for ; Thu, 30 Jul 2020 01:04:23 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id w2so16079539pgg.10 for ; Thu, 30 Jul 2020 01:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1iVr+h4AIu5NlHCv7r2GRJVy1ku5y/jnGZ7EiMbfWE4=; b=bHa20HIkre/3sTEOqo6JjVErINioH6XDLuwu/vhigcX7wXwrJ9HsaswnzOy68d5pvL niQuYVD4qLcyNWwGkFPzYd7INkDRQO9uswq0L3Lrht27hxIgvYAc+dize/0uDnZ3JE5q 9kxkj6F0VzO5j4D6kG43nEuQr6QXcuaDo/zWQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1iVr+h4AIu5NlHCv7r2GRJVy1ku5y/jnGZ7EiMbfWE4=; b=HaWRb/vglIhGV0fmroY3qpgSSh1qW/yQ89bA79yeZicRPp1gkp8pYkjAKeUaBv2HHm Iwh56bjFQlFfdIuwD9xBIoL2J4H4K0Gmr+FR3J5Aw2pqGYHejSXFNWzNCUn4xX2p5yOP Zd5AwgMum+dOYy7Bf1QW9s+3Fvzknkm51LNCW7bBxdg08Zy6CfCxPjbXU1hmmPEhI/6a bXA+CaE+paYPt0gyPMGaxR1tfyWP8n+f223B3USEgPVDxv+SSK261svflNFlPAlqBPIX gswEkdQtb7qn9h1+wyuPqzQaXTVSvMgrcqRixI6sFHKFXh0XGAvX8qevQX/8a/qpMbHF BUfQ== X-Gm-Message-State: AOAM5322q7tC/tUsJ75f2cSVEdfzhcvIUK4kS1BU0Ujtm79APiTHGsCT yaykQItxJ1Yy5or+ED711uo+dg== X-Google-Smtp-Source: ABdhPJxdlgH8/gUOaYsIyB2NoZer3yPo0PDDMvrdswRGmnVUvbLZl0N8MmO8mLyb5tqx6FPNTYfq1Q== X-Received: by 2002:a65:620e:: with SMTP id d14mr32843436pgv.360.1596096263235; Thu, 30 Jul 2020 01:04:23 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:22 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 2/7] mpt3sas: Dump system registers for debugging. Date: Thu, 30 Jul 2020 13:33:44 +0530 Message-Id: <1596096229-3341-3-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org When controller fails to transition to READY state during driver probe, dump the system interface register set. This will give snapshot of the firmware status for debugging driver load issues. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 96b78fd..b9d8f08 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -5617,6 +5617,23 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, u32 ioc_state, int timeout) return current_state; } +/** + * _base_dump_reg_set - This function will print hexdump of register set. + * @ioc: per adapter object + * + * Returns nothing. + */ +static inline void +_base_dump_reg_set(struct MPT3SAS_ADAPTER *ioc) +{ + unsigned int i, sz = 256; + u32 __iomem *reg = (u32 __iomem *)ioc->chip; + + ioc_info(ioc, "System Register set:\n"); + for (i = 0; i < (sz / sizeof(u32)); i++) + pr_info("%08x: %08x\n", (i * 4), readl(®[i])); +} + /** * _base_wait_for_doorbell_int - waiting for controller interrupt(generated by * a write to the doorbell) @@ -6795,6 +6812,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc) if (count++ > 20) { ioc_info(ioc, "Stop writing magic sequence after 20 retries\n"); + _base_dump_reg_set(ioc); goto out; } @@ -6823,6 +6841,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc) if (host_diagnostic == 0xFFFFFFFF) { ioc_info(ioc, "Invalid host diagnostic register value\n"); + _base_dump_reg_set(ioc); goto out; } if (!(host_diagnostic & MPI2_DIAG_RESET_ADAPTER)) @@ -6857,6 +6876,7 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc) if (ioc_state) { ioc_err(ioc, "%s: failed going to ready state (ioc_state=0x%x)\n", __func__, ioc_state); + _base_dump_reg_set(ioc); goto out; } From patchwork Thu Jul 30 08:03:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DEAFA138A for ; Thu, 30 Jul 2020 08:04:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2E1720809 for ; Thu, 30 Jul 2020 08:04:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Hv8GypTt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728883AbgG3IEa (ORCPT ); Thu, 30 Jul 2020 04:04:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IE1 (ORCPT ); Thu, 30 Jul 2020 04:04:27 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25135C061794 for ; Thu, 30 Jul 2020 01:04:27 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id p3so16093083pgh.3 for ; Thu, 30 Jul 2020 01:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HFqgcgpCP70hjCa2Bm/0W74s9wd8zwUqXfHJo02G2Dw=; b=Hv8GypTtPguzphI+ZM4SHyF2xhZZmn6CaRsOL5EEB5EN+dGfMHhHeWsHox99+pB768 tXsxWpaI44mziuMQKt5bWYMrsQ2V27gxVpT151TZOSS9eXW9omohVqBlzY8jJcS05V5v mGsJA9zBIbz6Kmf/rds7pPhoYGWp8l/dylhEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HFqgcgpCP70hjCa2Bm/0W74s9wd8zwUqXfHJo02G2Dw=; b=UnXaAAX31LQjpO/nLFT9rNW61wcAQnHssj+ijN9y4/2YMijIyt2ao0XKL3aaxpc1mf hJD4AYMM4H5bbLnhNL6LM1t6xovt0chHG+AD/WLBdYsI3CeuTiYbtTT6s0S5Rc7fnk/m JfKTZT95ulOQo+7icxyFqx23KFPbNG/Z4JWFBBfF46EP+DvjLdfm5tDpoSSboUtNDX6b OGIUcBNTGsfEnqm8I2qm2CutbSvSd0JczfoJrI7zey8i6oRXEEu7ZXGwmxE2yexVl4Rr bPFj1BZmrneXjdHUMJWhplaSb6O8o+YrriBj1nhePM/o8FlWVx9AqOWCGbzsytOrVrrd Gsug== X-Gm-Message-State: AOAM532npRU1VnGmo3pMA8WvoR3cfnCBoKGxS1AAbB+bM+ZTZVhIMzeI 8SLDWPKm+9/MAtJZxQtofttFTg== X-Google-Smtp-Source: ABdhPJztdNkLl/pbeLee7JUY+VRAg4bgQObQy02pkx9a9UpVicCJC38z8miRjZwmUwmfbjifIA5A7g== X-Received: by 2002:a63:4f05:: with SMTP id d5mr31555890pgb.298.1596096266533; Thu, 30 Jul 2020 01:04:26 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:25 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 3/7] mpt3sas: Cancel the running work during host reset. Date: Thu, 30 Jul 2020 13:33:45 +0530 Message-Id: <1596096229-3341-4-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Currently during host reset time driver is cancelling only those Firmware event works which are pending in Firmware event workqueue. It is not cancelling the work which is running. With this patch driver cancels the running work also. Issue Description: Even though it is not recommended to issue back to back host reset without any delay, but if someone issues back to back host reset then we observe that target devices gets unregistered and re-register with SML. And if OS drive is behind the HBA then when it get unregistered, than file-system goes into read-only mode. Normally during host reset driver marks the target device as responding (if they are accessible) and add the event 'MPT3SAS_REMOVE_UNRESPONDING_DEVICES' to remove the non-responding devices through FW worker thread. while processing this event driver unregistered the non-responding devices and clears the responding flag for all the devices. The reason why target devices are getting unregistered during successive host resets is that during the host reset driver has to cleanup all the outstanding FW event work (both queued one and the currently processing one) but actually driver is cleaning only the queued events. So if MPT3SAS_REMOVE_UNRESPONDING_DEVICES event is currently under process then this event is not getting cleaned up, so at end of all successive host reset this same event is getting processed more than once. And after the event got processed for the first time, all the target devices responding flag is cleared, so when the same is processed for the second time it see that responding flag is zero, so driver unregistered all the target drives even-though drives are responding. If driver cleanups the current running work along with pending work, this type of behavior won't be observed. Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 4fca393..4ed704c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1036,6 +1036,8 @@ typedef void (*MPT3SAS_FLUSH_RUNNING_CMDS)(struct MPT3SAS_ADAPTER *ioc); * @firmware_event_thread: "" * @fw_event_lock: * @fw_event_list: list of fw events + * @current_evet: current processing firmware event + * @fw_event_cleanup: set to one while cleaning up the fw events * @aen_event_read_flag: event log was read * @broadcast_aen_busy: broadcast aen waiting to be serviced * @shost_recovery: host reset in progress @@ -1217,6 +1219,8 @@ struct MPT3SAS_ADAPTER { struct workqueue_struct *firmware_event_thread; spinlock_t fw_event_lock; struct list_head fw_event_list; + struct fw_event_work *current_event; + u8 fw_events_cleanup; /* misc flags */ int aen_event_read_flag; diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 08fc4b3..66b29d4 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -3323,11 +3323,13 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc) { struct fw_event_work *fw_event; - if (list_empty(&ioc->fw_event_list) || + if ((list_empty(&ioc->fw_event_list) && !ioc->current_event) || !ioc->firmware_event_thread || in_interrupt()) return; - while ((fw_event = dequeue_next_fw_event(ioc))) { + ioc->fw_events_cleanup = 1; + while ((fw_event = dequeue_next_fw_event(ioc)) || + (fw_event = ioc->current_event)) { /* * Wait on the fw_event to complete. If this returns 1, then * the event was never executed, and we need a put for the @@ -3341,6 +3343,7 @@ _scsih_fw_event_cleanup_queue(struct MPT3SAS_ADAPTER *ioc) fw_event_work_put(fw_event); } + ioc->fw_events_cleanup = 0; } /** @@ -9421,11 +9424,13 @@ mpt3sas_scsih_reset_done_handler(struct MPT3SAS_ADAPTER *ioc) static void _mpt3sas_fw_work(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) { + ioc->current_event = fw_event; _scsih_fw_event_del_from_list(ioc, fw_event); /* the queue is being flushed so ignore this event */ if (ioc->remove_host || ioc->pci_error_recovery) { fw_event_work_put(fw_event); + ioc->current_event = NULL; return; } @@ -9439,10 +9444,10 @@ _mpt3sas_fw_work(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) while (scsi_host_in_recovery(ioc->shost) || ioc->shost_recovery) { /* - * If we're unloading, bail. Otherwise, this can become - * an infinite loop. + * If we're unloading or cancelling the work, bail. + * Otherwise, this can become an infinite loop. */ - if (ioc->remove_host) + if (ioc->remove_host || ioc->fw_events_cleanup) goto out; ssleep(1); } @@ -9503,11 +9508,13 @@ _mpt3sas_fw_work(struct MPT3SAS_ADAPTER *ioc, struct fw_event_work *fw_event) break; case MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST: _scsih_pcie_topology_change_event(ioc, fw_event); + ioc->current_event = NULL; return; break; } out: fw_event_work_put(fw_event); + ioc->current_event = NULL; } /** From patchwork Thu Jul 30 08:03:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EBFE722 for ; Thu, 30 Jul 2020 08:04:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16B392074B for ; Thu, 30 Jul 2020 08:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="ZWxw9GLb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728903AbgG3IEb (ORCPT ); Thu, 30 Jul 2020 04:04:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IEa (ORCPT ); Thu, 30 Jul 2020 04:04:30 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78FC2C061794 for ; Thu, 30 Jul 2020 01:04:30 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id m8so7708912pfh.3 for ; Thu, 30 Jul 2020 01:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H3KkPz6MdgQnnbTmO8PnKM2NIt+6lkDcy+gwm+RtcPY=; b=ZWxw9GLbbyuZIgcATp9xfWVsD8QzbcWwYJwr//CIyGvTZluRr3PUEv/Z36jCARt0Tv sHnsIfHUV2KAGyGDY5LGnzU/zFk7PEVlWIDzR+r6p0uhHy8ASk+FkK/gJMaN1MHBNnZV vtBTdFUcIZdztrMWhy2XSdNIaisvIp/1vL8jM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H3KkPz6MdgQnnbTmO8PnKM2NIt+6lkDcy+gwm+RtcPY=; b=MxlqF39CZDTJczdxAeTym7n59crVjDDjQkaHe0NJ1isE3MdMPzzKOccduUnVfiolFc d2+vbe261bo8zl36WDR473XnGqAS3k0x+nXm7wFFAAF3xvbnwxTDCtAwcyo6KugCGhnH 2KxmWeZTAhl37K4An1a8aQCSrObx7LkhdZAlpnvw8Cam6hfly9Ep0s6fAuqrHAhSDRk9 4Lk95XnYZ2lTdFAh4ZCdT/C84pJNqF+TgDKFAkRvdRQelrK0dK8gHpZa8e9sgsf3R+EO mOoGnHQKzA02BtT6H0ro0CBunrsKBXWXHUcHsCrX6/pxpBIBfpLHXjsaTZrlYK+2b2Cn /7xQ== X-Gm-Message-State: AOAM533qj2xzzOnLs5lvORP09J1OneOfU/9TLT35CinkKCZKSR+sPPQK 3TznTXVbdOS42pw6pLnRZzXcyQ== X-Google-Smtp-Source: ABdhPJxw9jNHEralfGp2qCXonE+sgzSjQBKIGtYcZnzNPefOv5Y/M9/K8DDZCOVl6b6UQTt9duIQeQ== X-Received: by 2002:a63:3005:: with SMTP id w5mr32777443pgw.441.1596096269900; Thu, 30 Jul 2020 01:04:29 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:29 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 4/7] mpt3sas: Rename and export interrupt mask/unmask fn's. Date: Thu, 30 Jul 2020 13:33:46 +0530 Message-Id: <1596096229-3341-5-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Rename Function _base_unmask_interrupts() to mpt3sas_base_unmask_interrupts() and _base_mask_interrupts() to mpt3sas_base_mask_interrupts() Also added function declarion to mpt3sas_base.h Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 24 +++++++++++------------- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 ++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index b9d8f08..2ffdbbb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -129,8 +129,6 @@ _base_wait_on_iocstate(struct MPT3SAS_ADAPTER *ioc, static int _base_get_ioc_facts(struct MPT3SAS_ADAPTER *ioc); static void -_base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc); -static void _base_clear_outstanding_commands(struct MPT3SAS_ADAPTER *ioc); /** @@ -680,7 +678,7 @@ _base_fault_reset_work(struct work_struct *work) ioc->shost_recovery = 1; spin_unlock_irqrestore( &ioc->ioc_reset_in_progress_lock, flags); - _base_mask_interrupts(ioc); + mpt3sas_base_mask_interrupts(ioc); _base_clear_outstanding_commands(ioc); } @@ -1465,13 +1463,13 @@ _base_get_cb_idx(struct MPT3SAS_ADAPTER *ioc, u16 smid) } /** - * _base_mask_interrupts - disable interrupts + * mpt3sas_base_mask_interrupts - disable interrupts * @ioc: per adapter object * * Disabling ResetIRQ, Reply and Doorbell Interrupts */ -static void -_base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc) +void +mpt3sas_base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc) { u32 him_register; @@ -1483,13 +1481,13 @@ _base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc) } /** - * _base_unmask_interrupts - enable interrupts + * mpt3sas_base_unmask_interrupts - enable interrupts * @ioc: per adapter object * * Enabling only Reply Interrupts */ -static void -_base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc) +void +mpt3sas_base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc) { u32 him_register; @@ -3371,7 +3369,7 @@ mpt3sas_base_map_resources(struct MPT3SAS_ADAPTER *ioc) goto out_fail; } - _base_mask_interrupts(ioc); + mpt3sas_base_mask_interrupts(ioc); r = _base_get_ioc_facts(ioc); if (r) { @@ -7119,7 +7117,7 @@ _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc) skip_init_reply_post_host_index: - _base_unmask_interrupts(ioc); + mpt3sas_base_unmask_interrupts(ioc); if (ioc->hba_mpi_version_belonged != MPI2_VERSION) { r = _base_display_fwpkg_version(ioc); @@ -7168,7 +7166,7 @@ mpt3sas_base_free_resources(struct MPT3SAS_ADAPTER *ioc) /* synchronizing freeing resource with pci_access_mutex lock */ mutex_lock(&ioc->pci_access_mutex); if (ioc->chip_phys && ioc->chip) { - _base_mask_interrupts(ioc); + mpt3sas_base_mask_interrupts(ioc); ioc->shost_recovery = 1; _base_make_ioc_ready(ioc, SOFT_RESET); ioc->shost_recovery = 0; @@ -7734,7 +7732,7 @@ mpt3sas_base_hard_reset_handler(struct MPT3SAS_ADAPTER *ioc, } _base_pre_reset_handler(ioc); mpt3sas_wait_for_commands_to_complete(ioc); - _base_mask_interrupts(ioc); + mpt3sas_base_mask_interrupts(ioc); r = _base_make_ioc_ready(ioc, type); if (r) goto out; diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 4ed704c..9da7265 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1529,6 +1529,8 @@ __le32 mpt3sas_base_get_sense_buffer_dma(struct MPT3SAS_ADAPTER *ioc, void *mpt3sas_base_get_pcie_sgl(struct MPT3SAS_ADAPTER *ioc, u16 smid); dma_addr_t mpt3sas_base_get_pcie_sgl_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid); void mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc); +void mpt3sas_base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc); +void mpt3sas_base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc); void mpt3sas_base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 smid, u16 handle); From patchwork Thu Jul 30 08:03:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692449 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7770722 for ; Thu, 30 Jul 2020 08:04:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B5292074B for ; Thu, 30 Jul 2020 08:04:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Rb+7lX/6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728980AbgG3IEf (ORCPT ); Thu, 30 Jul 2020 04:04:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IEe (ORCPT ); Thu, 30 Jul 2020 04:04:34 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC37CC061794 for ; Thu, 30 Jul 2020 01:04:33 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id q17so13313517pls.9 for ; Thu, 30 Jul 2020 01:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4n7bJyoN6kqIWp0KEEEyHDEQfGv8rWiSooGpu41nJNQ=; b=Rb+7lX/6FvzlDu+07rsC+f2i7qkcRcn2rsJMRzXC+DbLRxWTgjAw/jZSOrYrrAxEL6 CJuPdFGJqGXXlxh4gsZSDZTWePDN8B+jPAoKeDbEre4ynSQI5GFZVYJBWUtdDde9Hh4H pJ8VtdPeEd0fi3lSwnc5uadie6/T2b3tJCFNs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4n7bJyoN6kqIWp0KEEEyHDEQfGv8rWiSooGpu41nJNQ=; b=eUEEYSrOH6uNf1X/z5BOAVQS8JDQi5L3gMEEeSWYYE2cFjlOhBnfuean1lExY5d9T5 RaONcmHAx7R2oB8wC4ImcX7SKCDuaX35+NhetN57epQYJbXQhb5nydHmFkvSiRgNj+gz UCzsJOtzQTfkS2lAELb0vRBdigidGTsWdRY5qjfiB1vgScMOm6w1P+GQt0PXm4H4X6yt +zOtdNyQFw0S72aCHcOmOEJZKGCSxlYxgCKUNzuRb5DlLGPqtWkOXQYU2U5ZiWdNZEZt R6M2kf2L1zWk1FZZ+B+drIqvJY/1RfQOAuuZ5xEcF6lmbAIvaTT4MA03Pa+Q/37uODQ5 c+Ng== X-Gm-Message-State: AOAM532XACsKofoHTpJEjP52IyC+VEEhMzCsMNHwHDtoTGWhaS1kONTZ UdlNvm5M5OmsOeN/KdhzW81EFYVRK4y1EQ== X-Google-Smtp-Source: ABdhPJzIttO4BL8RRusG2ZoZrmpc9hnTrq1YLjsPo550SuRDLkiQEGujV10kK3rkgkqsvBSdRU7Hug== X-Received: by 2002:a17:90a:2e85:: with SMTP id r5mr1965212pjd.232.1596096273317; Thu, 30 Jul 2020 01:04:33 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:32 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 5/7] mpt3sas: Added helper functions to check any cmd is outstanding on Target and LUN. Date: Thu, 30 Jul 2020 13:33:47 +0530 Message-Id: <1596096229-3341-6-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org * Added helper functions to check whether any SCSI command is outstanding on particular Target, LUN device, * Added addition function parameters 'channel', 'id' to function mpt3sas_scsih_issue_tm(). Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 9 +-- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 6 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 92 ++++++++++++++++++++++++---- 3 files changed, 88 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 9da7265..fd61deb 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1610,11 +1610,12 @@ void mpt3sas_scsih_clear_outstanding_scsi_tm_commands( struct MPT3SAS_ADAPTER *ioc); void mpt3sas_scsih_reset_done_handler(struct MPT3SAS_ADAPTER *ioc); -int mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun, - u8 type, u16 smid_task, u16 msix_task, u8 timeout, u8 tr_method); +int mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, + uint channel, uint id, u64 lun, u8 type, u16 smid_task, + u16 msix_task, u8 timeout, u8 tr_method); int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, - u64 lun, u8 type, u16 smid_task, u16 msix_task, - u8 timeout, u8 tr_method); + uint channel, uint id, u64 lun, u8 type, u16 smid_task, + u16 msix_task, u8 timeout, u8 tr_method); void mpt3sas_scsih_set_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle); void mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle); diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c index 62e5528..98d6b9c 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c @@ -1109,13 +1109,15 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg, pcie_device->device_info)))) mpt3sas_scsih_issue_locked_tm(ioc, le16_to_cpu(mpi_request->FunctionDependent1), - 0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, + 0, 0, 0, + MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, 0, pcie_device->reset_timeout, MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE); else mpt3sas_scsih_issue_locked_tm(ioc, le16_to_cpu(mpi_request->FunctionDependent1), - 0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, + 0, 0, 0, + MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, 0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET); } else mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER); diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 66b29d4..ce12253 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -1512,6 +1512,66 @@ _scsih_is_nvme_pciescsi_device(u32 device_info) return 0; } +/** + * _scsih_scsi_lookup_find_by_target - search for matching channel:id + * @ioc: per adapter object + * @id: target id + * @channel: channel + * Context: This function will acquire ioc->scsi_lookup_lock. + * + * This will search for a matching channel:id in the scsi_lookup array, + * returning 1 if found. + */ +static u8 +_scsih_scsi_lookup_find_by_target(struct MPT3SAS_ADAPTER *ioc, int id, + int channel) +{ + int smid; + struct scsi_cmnd *scmd; + + for (smid = 1; + smid <= ioc->shost->can_queue; smid++) { + scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); + if (!scmd) + continue; + if (scmd->device->id == id && + scmd->device->channel == channel) + return 1; + } + return 0; +} + +/** + * _scsih_scsi_lookup_find_by_lun - search for matching channel:id:lun + * @ioc: per adapter object + * @id: target id + * @lun: lun number + * @channel: channel + * Context: This function will acquire ioc->scsi_lookup_lock. + * + * This will search for a matching channel:id:lun in the scsi_lookup array, + * returning 1 if found. + */ +static u8 +_scsih_scsi_lookup_find_by_lun(struct MPT3SAS_ADAPTER *ioc, int id, + unsigned int lun, int channel) +{ + int smid; + struct scsi_cmnd *scmd; + + for (smid = 1; smid <= ioc->shost->can_queue; smid++) { + + scmd = mpt3sas_scsih_scsi_lookup_get(ioc, smid); + if (!scmd) + continue; + if (scmd->device->id == id && + scmd->device->channel == channel && + scmd->device->lun == lun) + return 1; + } + return 0; +} + /** * mpt3sas_scsih_scsi_lookup_get - returns scmd entry * @ioc: per adapter object @@ -2704,6 +2764,8 @@ mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) * mpt3sas_scsih_issue_tm - main routine for sending tm requests * @ioc: per adapter struct * @handle: device handle + * @channel: the channel assigned by the OS + * @id: the id assigned by the OS * @lun: lun number * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in mpi2_init.h) * @smid_task: smid assigned to the task @@ -2720,8 +2782,9 @@ mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) * Return: SUCCESS or FAILED. */ int -mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, u64 lun, - u8 type, u16 smid_task, u16 msix_task, u8 timeout, u8 tr_method) +mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, + uint id, u64 lun, u8 type, u16 smid_task, u16 msix_task, + u8 timeout, u8 tr_method) { Mpi2SCSITaskManagementRequest_t *mpi_request; Mpi2SCSITaskManagementReply_t *mpi_reply; @@ -2826,14 +2889,14 @@ out: } int mpt3sas_scsih_issue_locked_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, - u64 lun, u8 type, u16 smid_task, u16 msix_task, - u8 timeout, u8 tr_method) + uint channel, uint id, u64 lun, u8 type, u16 smid_task, + u16 msix_task, u8 timeout, u8 tr_method) { int ret; mutex_lock(&ioc->tm_cmds.mutex); - ret = mpt3sas_scsih_issue_tm(ioc, handle, lun, type, smid_task, - msix_task, timeout, tr_method); + ret = mpt3sas_scsih_issue_tm(ioc, handle, channel, id, lun, type, + smid_task, msix_task, timeout, tr_method); mutex_unlock(&ioc->tm_cmds.mutex); return ret; @@ -2980,7 +3043,8 @@ scsih_abort(struct scsi_cmnd *scmd) if (pcie_device && (!ioc->tm_custom_handling) && (!(mpt3sas_scsih_is_pcie_scsi_device(pcie_device->device_info)))) timeout = ioc->nvme_abort_timeout; - r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->lun, + r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, + scmd->device->id, scmd->device->lun, MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, st->smid, st->msix_io, timeout, 0); /* Command must be cleared after abort */ @@ -3056,7 +3120,8 @@ scsih_dev_reset(struct scsi_cmnd *scmd) } else tr_method = MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET; - r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->lun, + r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, + scmd->device->id, scmd->device->lun, MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET, 0, 0, tr_timeout, tr_method); /* Check for busy commands after reset */ @@ -3134,7 +3199,8 @@ scsih_target_reset(struct scsi_cmnd *scmd) tr_method = MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE; } else tr_method = MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET; - r = mpt3sas_scsih_issue_locked_tm(ioc, handle, 0, + r = mpt3sas_scsih_issue_locked_tm(ioc, handle, scmd->device->channel, + scmd->device->id, 0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0, 0, tr_timeout, tr_method); /* Check for busy commands after reset */ @@ -7530,7 +7596,7 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc, goto out; spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); - r = mpt3sas_scsih_issue_tm(ioc, handle, lun, + r = mpt3sas_scsih_issue_tm(ioc, handle, 0, 0, lun, MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK, st->smid, st->msix_io, 30, 0); if (r == FAILED) { @@ -7571,9 +7637,9 @@ _scsih_sas_broadcast_primitive_event(struct MPT3SAS_ADAPTER *ioc, if (ioc->shost_recovery) goto out_no_lock; - r = mpt3sas_scsih_issue_tm(ioc, handle, sdev->lun, - MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, st->smid, - st->msix_io, 30, 0); + r = mpt3sas_scsih_issue_tm(ioc, handle, sdev->channel, sdev->id, + sdev->lun, MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, + st->smid, st->msix_io, 30, 0); if (r == FAILED || st->cb_idx != 0xFF) { sdev_printk(KERN_WARNING, sdev, "mpt3sas_scsih_issue_tm: ABORT_TASK: FAILED : " From patchwork Thu Jul 30 08:03:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692451 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86F62722 for ; Thu, 30 Jul 2020 08:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6AC062074B for ; Thu, 30 Jul 2020 08:04:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="IC6Clc4x" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729000AbgG3IEj (ORCPT ); Thu, 30 Jul 2020 04:04:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IEh (ORCPT ); Thu, 30 Jul 2020 04:04:37 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D15C061794 for ; Thu, 30 Jul 2020 01:04:37 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id c6so3465541pje.1 for ; Thu, 30 Jul 2020 01:04:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J2vxRaLJbYjx/WNOq6int4KscmiEZcRt7XXwFnk3Mks=; b=IC6Clc4xyccSKV+LpJY7v/+PK45i+uhp0VR4mj9u14VbY3MSecZsgVUt6yNmPp33Tr 2IkLmd0dmFnriydNpPWc4QxMcr83o9sLMrdTWRvmth+/4JHTGtfATwCSBKPExwU9UAP7 wTTFymb/ZcQLBH+VWMPT2uqaKRvATYvnfouYk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J2vxRaLJbYjx/WNOq6int4KscmiEZcRt7XXwFnk3Mks=; b=fI0zaHYjUus2IGVcJErnnm9R/YNTBKTTlvSpjr6bigK9w/xB39eqTwFuhmG5fembS0 LLiqNGI1En667BNfci/9RdjcFwHlii4KMcrzL2VQojlUK7vY6XGATjlk1Y/uYhwLXHVv KizTCsqyj6X/XbcQlombtU7TAWgIhCAbd2Se/NdCrWMJI6n7JZxnsDWxPkus5f046nFR IICqIs1nKowY2EpP8R/JruVjRQF2nrbzERAYZZEOlt1aHmpYhf9eQGBtpkKR+6ZlFCS9 1oW7iDb8xY76cGgiD23n1szlXwoT2kEOXD9qEMf3SLQEtqSM41CbnpYRSRk4i2LvakL+ p27g== X-Gm-Message-State: AOAM530pHARx59xG86Rrkm1DIRdd6+E1yckPwwzBq5kS04XpyuTy3fIN m77uCvhGVrHkmYGbOFTAolrGFaCD6ErFEQ== X-Google-Smtp-Source: ABdhPJwTjyxFCIspYNXfle/828JsRphDudS9wgDq0JsOn5iNww7XRD5XSV5jOUWeNmnxTkANo8FykQ== X-Received: by 2002:a17:90a:fd82:: with SMTP id cx2mr5585011pjb.67.1596096276844; Thu, 30 Jul 2020 01:04:36 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:36 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 6/7] mpt3sas: Postprocessing of target and LUN reset. Date: Thu, 30 Jul 2020 13:33:48 +0530 Message-Id: <1596096229-3341-7-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org If driver has not received the interrupt for the aborted SCSI command before processing the TM reply, Driver polls all the reply descriptor pools looking for the reply for the aborted SCSI command before marking TM as FAILED. If it finds the reply then mark the TM as SUCCESS otherwise mark as FAILED. scsih_tm_cmd_map_status() -> Checks whether TM has aborted the timed out SCSI command or not, if TM has aborted the IO then returns SUCCESS else returns FAILED. scsih_tm_post_processing() -> Post proceesing of target & LUN reset Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.c | 6 +- drivers/scsi/mpt3sas/mpt3sas_base.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 136 ++++++++++++++++++++++++++- 3 files changed, 139 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 2ffdbbb..3606676 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -1784,12 +1784,14 @@ _base_is_controller_msix_enabled(struct MPT3SAS_ADAPTER *ioc) /** * mpt3sas_base_sync_reply_irqs - flush pending MSIX interrupts * @ioc: per adapter object + * @poll: poll over reply descriptor pools incase interrupt for + * timed-out SCSI command got delayed * Context: non ISR conext * * Called when a Task Management request has completed. */ void -mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc) +mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc, u8 poll) { struct adapter_reply_queue *reply_q; @@ -1819,6 +1821,8 @@ mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc) } synchronize_irq(pci_irq_vector(ioc->pdev, reply_q->msix_index)); } + if (poll) + _base_process_reply_queue(reply_q); } /** diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index fd61deb..feb8328 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -1528,7 +1528,7 @@ __le32 mpt3sas_base_get_sense_buffer_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid); void *mpt3sas_base_get_pcie_sgl(struct MPT3SAS_ADAPTER *ioc, u16 smid); dma_addr_t mpt3sas_base_get_pcie_sgl_dma(struct MPT3SAS_ADAPTER *ioc, u16 smid); -void mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc); +void mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc, u8 poll); void mpt3sas_base_mask_interrupts(struct MPT3SAS_ADAPTER *ioc); void mpt3sas_base_unmask_interrupts(struct MPT3SAS_ADAPTER *ioc); diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index ce12253..67270e0 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c @@ -2760,6 +2760,96 @@ mpt3sas_scsih_clear_tm_flag(struct MPT3SAS_ADAPTER *ioc, u16 handle) } } +/** + * scsih_tm_cmd_map_status - map the target reset & LUN reset TM status + * @ioc - per adapter object + * @channel - the channel assigned by the OS + * @id: the id assigned by the OS + * @lun: lun number + * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in mpi2_init.h) + * @smid_task: smid assigned to the task + * + * Look whether TM has aborted the timed out SCSI command, if + * TM has aborted the IO then return SUCCESS else return FAILED. + */ +int +scsih_tm_cmd_map_status(struct MPT3SAS_ADAPTER *ioc, uint channel, + uint id, uint lun, u8 type, u16 smid_task) +{ + + if (smid_task <= ioc->shost->can_queue) { + switch (type) { + case MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET: + if (!(_scsih_scsi_lookup_find_by_target(ioc, + id, channel))) + return SUCCESS; + break; + case MPI2_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET: + case MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET: + if (!(_scsih_scsi_lookup_find_by_lun(ioc, id, + lun, channel))) + return SUCCESS; + break; + default: + return SUCCESS; + } + } else if (smid_task == ioc->scsih_cmds.smid) { + if ((ioc->scsih_cmds.status & MPT3_CMD_COMPLETE) || + (ioc->scsih_cmds.status & MPT3_CMD_NOT_USED)) + return SUCCESS; + } else if (smid_task == ioc->ctl_cmds.smid) { + if ((ioc->ctl_cmds.status & MPT3_CMD_COMPLETE) || + (ioc->ctl_cmds.status & MPT3_CMD_NOT_USED)) + return SUCCESS; + } + + return FAILED; +} + +/** + * scsih_tm_post_processing - post proceesing of target & LUN reset + * @ioc - per adapter object + * @handle: device handle + * @channel - the channel assigned by the OS + * @id: the id assigned by the OS + * @lun: lun number + * @type: MPI2_SCSITASKMGMT_TASKTYPE__XXX (defined in mpi2_init.h) + * @smid_task: smid assigned to the task + * + * Post processing of target & LUN reset. Due to interrupt latency + * issue it possible that interrupt for aborted IO might not + * received yet. So before returning failure status poll the + * reply descriptor pools for the reply of timed out SCSI command. + * Return FAILED status if reply for timed out is not received + * otherwise return SUCCESS. + */ +int +scsih_tm_post_processing(struct MPT3SAS_ADAPTER *ioc, u16 handle, + uint channel, uint id, uint lun, u8 type, u16 smid_task) +{ + int rc; + + rc = scsih_tm_cmd_map_status(ioc, channel, id, lun, type, smid_task); + if (rc == SUCCESS) + return rc; + + ioc_info(ioc, + "Poll ReplyDescriptor queues for completion of" + " smid(%d), task_type(0x%02x), handle(0x%04x)\n", + smid_task, type, handle); + + /* + * Due to interrupt latency issues, driver may receive interrupt for + * TM first and then for aborted SCSI IO command. So, poll all the + * ReplyDescriptor pools before returning the FAILED status to SML. + */ + mpt3sas_base_mask_interrupts(ioc); + mpt3sas_base_sync_reply_irqs(ioc, 1); + mpt3sas_base_unmask_interrupts(ioc); + + return scsih_tm_cmd_map_status(ioc, channel, id, lun, type, smid_task); +} + /** * mpt3sas_scsih_issue_tm - main routine for sending tm requests * @ioc: per adapter struct @@ -2788,6 +2878,7 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, { Mpi2SCSITaskManagementRequest_t *mpi_request; Mpi2SCSITaskManagementReply_t *mpi_reply; + Mpi25SCSIIORequest_t *request; u16 smid = 0; u32 ioc_state; int rc; @@ -2843,7 +2934,9 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, mpi_request->Function = MPI2_FUNCTION_SCSI_TASK_MGMT; mpi_request->DevHandle = cpu_to_le16(handle); mpi_request->TaskType = type; - mpi_request->MsgFlags = tr_method; + if (type == MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK || + type == MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK) + mpi_request->MsgFlags = tr_method; mpi_request->TaskMID = cpu_to_le16(smid_task); int_to_scsilun(lun, (struct scsi_lun *)mpi_request->LUN); mpt3sas_scsih_set_tm_flag(ioc, handle); @@ -2863,7 +2956,7 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, } /* sync IRQs in case those were busy during flush. */ - mpt3sas_base_sync_reply_irqs(ioc); + mpt3sas_base_sync_reply_irqs(ioc, 0); if (ioc->tm_cmds.status & MPT3_CMD_REPLY_VALID) { mpt3sas_trigger_master(ioc, MASTER_TRIGGER_TASK_MANAGMENT); @@ -2880,7 +2973,44 @@ mpt3sas_scsih_issue_tm(struct MPT3SAS_ADAPTER *ioc, u16 handle, uint channel, sizeof(Mpi2SCSITaskManagementRequest_t)/4); } } - rc = SUCCESS; + + switch (type) { + case MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK: + rc = SUCCESS; + /* + * If DevHandle filed in smid_task's entry of request pool + * doesn't matches with device handle on which this task abort + * TM is received then it means that TM has successfully + * aborted the timed out command. Since smid_task's entry in + * request pool will be memset to zero once the timed out + * command is returned to the SML. If the command is not + * aborted then smid_task’s entry won’t be cleared and it + * will have same DevHandle value on which this task abort TM + * is received and driver will return the TM status as FAILED. + */ + request = mpt3sas_base_get_msg_frame(ioc, smid_task); + if (le16_to_cpu(request->DevHandle) != handle) + break; + + ioc_info(ioc, "Task abort tm failed: handle(0x%04x)," + "timeout(%d) tr_method(0x%x) smid(%d) msix_index(%d)\n", + handle, timeout, tr_method, smid_task, msix_task); + rc = FAILED; + break; + + case MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET: + case MPI2_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET: + case MPI2_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET: + rc = scsih_tm_post_processing(ioc, handle, channel, id, lun, + type, smid_task); + break; + case MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK: + rc = SUCCESS; + break; + default: + rc = FAILED; + break; + } out: mpt3sas_scsih_clear_tm_flag(ioc, handle); From patchwork Thu Jul 30 08:03:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suganath Prabu S X-Patchwork-Id: 11692483 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C96B313B1 for ; Thu, 30 Jul 2020 08:21:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B146B20838 for ; Thu, 30 Jul 2020 08:21:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Dd+KkYA3" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729008AbgG3IEo (ORCPT ); Thu, 30 Jul 2020 04:04:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbgG3IEk (ORCPT ); Thu, 30 Jul 2020 04:04:40 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3A21C061794 for ; Thu, 30 Jul 2020 01:04:40 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id f9so3742662pju.4 for ; Thu, 30 Jul 2020 01:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a5nmJMsF4AiFmiopuj7CUgXTZG7wxT7g+bAIWIJ8I7E=; b=Dd+KkYA3GBIV34ktpiCLByQhY4MjmSoHQWPsUpkE0BtrJepy+GdRER/QjtnMSJITXh ZtCbAHqgdG8cS1rD4z7prq37R+1djXpDgYNQjLdbsOszZ0f4E+QJYszdG5aYDtyf8B51 VLpgLI8MdkNeI9cyyWlE1TDmXhp/vHCUjgPas= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=a5nmJMsF4AiFmiopuj7CUgXTZG7wxT7g+bAIWIJ8I7E=; b=C+cu30i4AZEcXF1mVNTShz+3OQVkp7LEmu+E9HRdphmQ1YrB+z8Mq76DhCb9o3o9Am 90UlWNVce4kvBRZ00TPyy/pGbzFUuwMcre8KR9w5bn34FJTeCUBnHEewa37oqipiYLBp glb3xuRve/OOoOigBoZWkDsQnx8wdmFBVOPKCNaNCvP9QyrjzNh1a7BcdJSUtkoVo7wJ ZhH7eZ3Ck64RuIRzZCDB1qXmYJCowskDLpohDqV97rewBttTAoAI41ayfgAjfZeJGvzs Erh3865wcTXx18GKKF1hafMUq1s2KPIU+97NGZK9XsVUm+gU8xAxwpLchuS/fNeqpz+/ VxKg== X-Gm-Message-State: AOAM530JlTuJ1rCEhP0avtBhUE+zT3d1J+V76SnpL8a3PoYTsqUe7pYQ jEtPSOSiThldQUBp0edAlrh/3sK0Xpw8Jg== X-Google-Smtp-Source: ABdhPJw+uypwZ3BUW/yYnIr4Y5zRYvs+pLpa4pjkqVx9WSR4ZIzvHFYyl+peW2T3iqL4fWqWLcvQXw== X-Received: by 2002:a17:90a:230d:: with SMTP id f13mr10137906pje.116.1596096280154; Thu, 30 Jul 2020 01:04:40 -0700 (PDT) Received: from localhost.localdomain ([192.19.212.250]) by smtp.gmail.com with ESMTPSA id d13sm5051412pfq.118.2020.07.30.01.04.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jul 2020 01:04:39 -0700 (PDT) From: Suganath Prabu S To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, sreekanth.reddy@broadcom.com, sathya.prakash@broadcom.com, Suganath Prabu S Subject: [PATCH 7/7] mpt3sas: Update driver version to 35.100.00.00 Date: Thu, 30 Jul 2020 13:33:49 +0530 Message-Id: <1596096229-3341-8-git-send-email-suganath-prabu.subramani@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> References: <1596096229-3341-1-git-send-email-suganath-prabu.subramani@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Updated driver version to 35.100.00.00 Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/compile.sh | 6 +++--- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/mpt3sas/compile.sh b/drivers/scsi/mpt3sas/compile.sh index f0bcf6b..d8ac38f 100755 --- a/drivers/scsi/mpt3sas/compile.sh +++ b/drivers/scsi/mpt3sas/compile.sh @@ -48,9 +48,9 @@ fi # Set SPARSE to non-zero value to enable sparse checking # kernel="2.6.18-8.el5" # kernel="2.6.18-53.el5" -# kernel="2.6.27.15-2-default" - kernel=`uname -r` -SPARSE=0 + kernel="5.8.0-rc1+" +# kernel=`uname -r` +SPARSE=1 blacklist_enclosure rm -fr output.log diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index feb8328..b11459a 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.h +++ b/drivers/scsi/mpt3sas/mpt3sas_base.h @@ -76,8 +76,8 @@ #define MPT3SAS_DRIVER_NAME "mpt3sas" #define MPT3SAS_AUTHOR "Avago Technologies " #define MPT3SAS_DESCRIPTION "LSI MPT Fusion SAS 3.0 Device Driver" -#define MPT3SAS_DRIVER_VERSION "34.100.00.00" -#define MPT3SAS_MAJOR_VERSION 34 +#define MPT3SAS_DRIVER_VERSION "35.100.00.00" +#define MPT3SAS_MAJOR_VERSION 35 #define MPT3SAS_MINOR_VERSION 100 #define MPT3SAS_BUILD_VERSION 0 #define MPT3SAS_RELEASE_VERSION 00