From patchwork Thu Oct 15 03:27:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269789 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15AD2C433DF for ; Thu, 15 Oct 2020 10:21:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A639922249 for ; Thu, 15 Oct 2020 10:21:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="P1GksUGm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729057AbgJOKVK (ORCPT ); Thu, 15 Oct 2020 06:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbgJOKVJ (ORCPT ); Thu, 15 Oct 2020 06:21:09 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4BBFC061755 for ; Thu, 15 Oct 2020 03:21:09 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id j7so1627587pgk.5 for ; Thu, 15 Oct 2020 03:21:09 -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=RAuF4aghLCCHMupup6qBfmRcjICpJqbj4Rdy6W3SkdY=; b=P1GksUGmHrv7XrYY8s65/5QTMKXbdxr6b4GsgX1wC1b2vp8k/tQl9nmgYfPjBiTpNv L7ZCF27uil+MKTMFG90v2pmch1dwIzdwgdsRikuE8EWIqaet3UUHFNH65Iw0Sj8MxO2b 4mAlENQSgTUwrOBJztoqSjfklfLlTNpxpBkxI= 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=RAuF4aghLCCHMupup6qBfmRcjICpJqbj4Rdy6W3SkdY=; b=sWecDojWgzBY1usHteAoKetkA3XylIAM9K8ezO+7HOpJaeY6ocNnOakuaebVEZJIH1 TavI7NrO0q7trdaEdd/CsEN0NTcQVyY0jF2fQA/c0nfx74togxTLEejZhO8DRl+axNt+ ls5B0PR/NI6MqSOydfR0j6QXB/Tcn5KmgFln+IF2Iv4JbrWkewbREe8eE8RDx9sNwxn7 xEJbsCmyZhagoyxxzB+iNkQOHR+p1Fz7NYEF4IWMzik7lkajW13a4y7BuF+ENRqVyssB GyPoSc3iR1f+Lh1HCSIJTUWCF7AdXuzDUPfvrybU61QqD0AzcHRC4Vif0A5pmUyi+DcK AN8w== X-Gm-Message-State: AOAM53328lMA0mkPqwMzJc26NfkvswT4Mg5gcf6d/HOxrYp3IEah/GUO 6oiMor9Rnq9CJaa7YIEZ5Oul0AHUr/clQM4S6uF4Boq4RxnKKzU8rjuFtgxDGCCme5wxqyi32o2 bv8bYyadO/DozknESMlYoQ3FEHQmtwti3Kbqx/8+3+k6AIUZm5QNdwBC7um1LTy50ndhzwn+CW8 gb1+z+YpQZUmU= X-Google-Smtp-Source: ABdhPJydv7rqEFXYRjHKjyLTYFwwa6yZO4KLFTLPBsz78IB7Jc4ummhmd96M79OlGx4592CUMtIkCg== X-Received: by 2002:aa7:9009:0:b029:154:f822:27c9 with SMTP id m9-20020aa790090000b0290154f82227c9mr3516177pfo.48.1602757268972; Thu, 15 Oct 2020 03:21:08 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:08 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 01/17] scsi: Added a new definition in scsi_cmnd.h Date: Thu, 15 Oct 2020 08:57:26 +0530 Message-Id: <1602732462-10443-2-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added a new definition SCMD_NORETRIES_ABORT in scsi_cmnd.h The SCMD_NORETRIES_ABORT defines the third bit postion in scmd->state Signed-off-by: Muneendra --- v3: No change v2: Modified the commit log --- include/scsi/scsi_cmnd.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 69ade4fb71aa..8dec4ec6bd5f 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h @@ -64,6 +64,9 @@ struct scsi_pointer { /* for scmd->state */ #define SCMD_STATE_COMPLETE 0 #define SCMD_STATE_INFLIGHT 1 +#define SCMD_NORETRIES_ABORT 2 /* If this bit is set then there won't be any + * retries of scmd on abort success + */ struct scsi_cmnd { struct scsi_request req; From patchwork Thu Oct 15 03:27:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A88AFC433DF for ; Thu, 15 Oct 2020 10:21:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4863C2224A for ; Thu, 15 Oct 2020 10:21:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="PKvq21cB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730629AbgJOKVQ (ORCPT ); Thu, 15 Oct 2020 06:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbgJOKVP (ORCPT ); Thu, 15 Oct 2020 06:21:15 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91268C061755 for ; Thu, 15 Oct 2020 03:21:15 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id a1so1738279pjd.1 for ; Thu, 15 Oct 2020 03:21:15 -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=GU7MKdzHFZFkuzGoIm+K4K01Py2CI1GrQCHU3Ka/wCo=; b=PKvq21cB5Jx8SjlkavHFPl0Y3uEOkC6vT3NQn0pMgYS4qsodtOC4h4QDPV6qLz1e3l 3DAIFC8nCn2Fe1gac7zHSgFNKg5LhQl+Zy4GWTihZZzzdvCBgUCiorfY3AoX8X9wajN1 xQYbbwCRtHCykk3XcMT8FeM1M0IQNsLY/8Wwg= 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=GU7MKdzHFZFkuzGoIm+K4K01Py2CI1GrQCHU3Ka/wCo=; b=S8NbP/ZgLlh6KmP7LlBkx1yiP5ryzY0g1E39H5npQVSJ615Qkc1ZDaCpUUwZkvpExD iZrEeM7DzmvZtJ212KH4z+0lcG3zYFZdUqfP+xggUYJcmWKwMqpfRpIm4uZU5PwedaJZ npgaa6iqeChe/TPQWpDsmrlen0fKfYVBrVHpB8qXAZBAyN0qYx9gSCWtUVpJ/ju4IMca Zw23rFYg6DybKNCTis3zY9g+NkgMViUc9DWV7wFZGfiVYx3v+K08RA+8DOL+Pn/i94ew 9oMEnFOt9wHdQkaYCflrDFWEIwxxq9HGpxXqTDNWPIJmOZ3gry9kjL1fr1zgSJPwuUaa FeZg== X-Gm-Message-State: AOAM530CrfHiiyU+NXRELBc8tWGbJe3kPFA0CQigKUcU/bPmgJ070hwt HpViQKIxrk9wJn3ohE41k+zKiasTAh4QRW9Ch4vrm/QfHa4PSjMvylRos3nrJMVo82s7LFj5xMU 1DLtmVoZDS3zYZsoNWhs2QpQSQEUwprCtZiJA9y7RNuq+eRGDzs/eDpIhMsEf70GDU15lrxpy9C BkxyMO1CDcCho= X-Google-Smtp-Source: ABdhPJxnfPLoKBiLbnhNxUY6qPdzEGqa0eiZYNUvADUcEqSCkix2aC/FQxUuzHFZmLrLqNz+MPlWhQ== X-Received: by 2002:a17:90a:a60e:: with SMTP id c14mr3764516pjq.31.1602757274747; Thu, 15 Oct 2020 03:21:14 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:14 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 03/17] scsi: No retries on abort success Date: Thu, 15 Oct 2020 08:57:28 +0530 Message-Id: <1602732462-10443-4-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Made an additional check in scsi_noretry_cmd to verify whether user has decided not to do retries on abort success by setting the SCMD_NORETRIES_ABORT bit If SCMD_NORETRIES_ABORT bit is set we are making sure there won't be any retries done on the same path and also setting the host byte as DID_TRANSPORT_MARGINAL so that the error can be propogated as recoverable transport error to the blk layers. Added a code in scsi_result_to_blk_status to translate a new error DID_TRANSPORT_MARGINAL to the corresponding blk_status_t i.e BLK_STS_TRANSPORT Signed-off-by: Muneendra --- v3: Merged first part of the previous patch(v2 patch3) with this patch. v2: set the hostbyte as DID_TRANSPORT_MARGINAL instead of DID_TRANSPORT_FAILFAST. --- drivers/scsi/scsi_error.c | 10 ++++++++++ drivers/scsi/scsi_lib.c | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ae80daa5d831..aa30c1c9e9db 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -1763,6 +1763,16 @@ int scsi_noretry_cmd(struct scsi_cmnd *scmd) return 0; check_type: + /* + * Check whether caller has decided not to do retries on + * abort success by setting the SCMD_NORETRIES_ABORT bit + */ + if ((test_bit(SCMD_NORETRIES_ABORT, &scmd->state)) && + (scmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) { + set_host_byte(scmd, DID_TRANSPORT_MARGINAL); + return 1; + } + /* * assume caller has checked sense and determined * the check condition was retryable. diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 2b5dea07498e..9606bad1542f 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -629,6 +629,7 @@ static blk_status_t scsi_result_to_blk_status(struct scsi_cmnd *cmd, int result) return BLK_STS_OK; return BLK_STS_IOERR; case DID_TRANSPORT_FAILFAST: + case DID_TRANSPORT_MARGINAL: return BLK_STS_TRANSPORT; case DID_TARGET_FAILURE: set_host_byte(cmd, DID_OK); From patchwork Thu Oct 15 03:27:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269787 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS, UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49BE8C43457 for ; Thu, 15 Oct 2020 10:21:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B830C22249 for ; Thu, 15 Oct 2020 10:21:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="dgNT7NT/" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388994AbgJOKVW (ORCPT ); Thu, 15 Oct 2020 06:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbgJOKVW (ORCPT ); Thu, 15 Oct 2020 06:21:22 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE14DC061755 for ; Thu, 15 Oct 2020 03:21:21 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id n9so1614422pgf.9 for ; Thu, 15 Oct 2020 03:21:21 -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=5oGfbT65mhwBN2T4MdY/LRKmR4m5XMOeEnacApuYHsI=; b=dgNT7NT/ruCZ1zCkcen8vJNG9fOurambaPQxp4ep3QagAPtZ3Zjzoq/fcH/EAMK8Nk XGLtt2vqbZ9YvxPME3Xt6mNqdBDtP/6QVIsdn54M/Q9nrkjwm5yz1g8m1WoSnm/ia845 w2Dq9WwDUfkcGNJD55q1iPEpv89/HtbtmOKVE= 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=5oGfbT65mhwBN2T4MdY/LRKmR4m5XMOeEnacApuYHsI=; b=gzsFrjQAEX2DB112BAB/8waEiaNUOQjW1CtL/mi0erlc5OABiqDgRxIiNysFdv/Pwn +ktRPbBxcUmUFNBxT1ONR2qCEr7fLu+EshIHG7QarODuUiAdFVjv3cVVzRUn2BdjTVJj 4lDHU0wxsGS5oer3K5NkF/tS4yLXG69/uUby14sqeT/Fb3A/36yYp6iRMy62kl/wASMW 077l05ZF9AufnNxEs9ZEcVcTQAWfsq7PucZG3wQMV/CztaXdaADxuFkb+RFqQdrK7OG9 4MO9RgNfzXcbJrcB5RMuaDuZzcF9uQvqRL8+uAJxm/m1NG7U3c6L/95EumxlO7I5qQut 9XoQ== X-Gm-Message-State: AOAM5307WZORt058+Eg66UZ7P3AGnLK32CRI4nD2jIELT10Juw+Jxmt8 Y1vHtJr0Expf+n+5Ykl7owbA2+wnx/meFLuM40ciiB8AXvAeDGhkxTEw7dGPdYqcGwAuPNRapRJ chj+UWKqYChie4rVUHRXYgPyGFXezv09WHSKPJBM3FHygqRso2D4n4IKMcFChppLZJb+cDG293e fQTyYGAYJ26Q0= X-Google-Smtp-Source: ABdhPJxMxxFvtmWPbDKgAl0FcuKeOu7E8k7MiuA5Xq1WMYmjPlkIcGz5w8bwAI84APHynbqwTn2L2A== X-Received: by 2002:a63:f744:: with SMTP id f4mr2807547pgk.34.1602757280870; Thu, 15 Oct 2020 03:21:20 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:20 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 05/17] scsi_transport_fc: Added a new rport state FC_PORTSTATE_MARGINAL Date: Thu, 15 Oct 2020 08:57:30 +0530 Message-Id: <1602732462-10443-6-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added a new rport state FC_PORTSTATE_MARGINAL. Added a new inline function fc_rport_chkmarginal_set_noretries which will set the SCMD_NORETRIES_ABORT bit in cmd->state if rport state is marginal. Added a new argumet scsi_cmnd to the function fc_remote_port_chkready. Made changes in fc_remote_port_chkready function to treat marginal and online as same.If scsi_cmd is passed fc_rport_chkmarginal_set_noretries will be called. Also made changes in fc_remote_port_delete,fc_user_scan_tgt, fc_timeout_deleted_rport functions to handle the new rport state FC_PORTSTATE_MARGINAL. Signed-off-by: Muneendra --- v3: Rearranged the patch so that all the changes with respect to new rport state is part of this patch. Added a new argument to scsi_cmd to fc_remote_port_chkready v2: New patch --- drivers/scsi/scsi_transport_fc.c | 40 +++++++++++++++++++------------- include/scsi/scsi_transport_fc.h | 26 ++++++++++++++++++++- 2 files changed, 49 insertions(+), 17 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 2ff7f06203da..df66a51d62e6 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -142,20 +142,23 @@ fc_enum_name_search(host_event_code, fc_host_event_code, static struct { enum fc_port_state value; char *name; + int matchlen; } fc_port_state_names[] = { - { FC_PORTSTATE_UNKNOWN, "Unknown" }, - { FC_PORTSTATE_NOTPRESENT, "Not Present" }, - { FC_PORTSTATE_ONLINE, "Online" }, - { FC_PORTSTATE_OFFLINE, "Offline" }, - { FC_PORTSTATE_BLOCKED, "Blocked" }, - { FC_PORTSTATE_BYPASSED, "Bypassed" }, - { FC_PORTSTATE_DIAGNOSTICS, "Diagnostics" }, - { FC_PORTSTATE_LINKDOWN, "Linkdown" }, - { FC_PORTSTATE_ERROR, "Error" }, - { FC_PORTSTATE_LOOPBACK, "Loopback" }, - { FC_PORTSTATE_DELETED, "Deleted" }, + { FC_PORTSTATE_UNKNOWN, "Unknown", 7}, + { FC_PORTSTATE_NOTPRESENT, "Not Present", 11 }, + { FC_PORTSTATE_ONLINE, "Online", 6 }, + { FC_PORTSTATE_OFFLINE, "Offline", 7 }, + { FC_PORTSTATE_BLOCKED, "Blocked", 7 }, + { FC_PORTSTATE_BYPASSED, "Bypassed", 8 }, + { FC_PORTSTATE_DIAGNOSTICS, "Diagnostics", 11 }, + { FC_PORTSTATE_LINKDOWN, "Linkdown", 8 }, + { FC_PORTSTATE_ERROR, "Error", 5 }, + { FC_PORTSTATE_LOOPBACK, "Loopback", 8 }, + { FC_PORTSTATE_DELETED, "Deleted", 7 }, + { FC_PORTSTATE_MARGINAL, "Marginal", 8 }, }; fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) +fc_enum_name_match(port_state, fc_port_state, fc_port_state_names) #define FC_PORTSTATE_MAX_NAMELEN 20 @@ -2095,7 +2098,8 @@ fc_user_scan_tgt(struct Scsi_Host *shost, uint channel, uint id, u64 lun) if (rport->scsi_target_id == -1) continue; - if (rport->port_state != FC_PORTSTATE_ONLINE) + if ((rport->port_state != FC_PORTSTATE_ONLINE) && + (rport->port_state != FC_PORTSTATE_MARGINAL)) continue; if ((channel == rport->channel) && @@ -2958,7 +2962,8 @@ fc_remote_port_delete(struct fc_rport *rport) spin_lock_irqsave(shost->host_lock, flags); - if (rport->port_state != FC_PORTSTATE_ONLINE) { + if ((rport->port_state != FC_PORTSTATE_ONLINE) && + (rport->port_state != FC_PORTSTATE_MARGINAL)) { spin_unlock_irqrestore(shost->host_lock, flags); return; } @@ -3100,7 +3105,8 @@ fc_timeout_deleted_rport(struct work_struct *work) * target, validate it still is. If not, tear down the * scsi_target on it. */ - if ((rport->port_state == FC_PORTSTATE_ONLINE) && + if (((rport->port_state == FC_PORTSTATE_ONLINE) || + (rport->port_state == FC_PORTSTATE_MARGINAL)) && (rport->scsi_target_id != -1) && !(rport->roles & FC_PORT_ROLE_FCP_TARGET)) { dev_printk(KERN_ERR, &rport->dev, @@ -3243,7 +3249,8 @@ fc_scsi_scan_rport(struct work_struct *work) struct fc_internal *i = to_fc_internal(shost->transportt); unsigned long flags; - if ((rport->port_state == FC_PORTSTATE_ONLINE) && + if (((rport->port_state == FC_PORTSTATE_ONLINE) || + (rport->port_state == FC_PORTSTATE_ONLINE)) && (rport->roles & FC_PORT_ROLE_FCP_TARGET) && !(i->f->disable_target_scan)) { scsi_scan_target(&rport->dev, rport->channel, @@ -3747,7 +3754,8 @@ static blk_status_t fc_bsg_rport_prep(struct fc_rport *rport) !(rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT)) return BLK_STS_RESOURCE; - if (rport->port_state != FC_PORTSTATE_ONLINE) + if ((rport->port_state != FC_PORTSTATE_ONLINE) && + (rport->port_state != FC_PORTSTATE_MARGINAL)) return BLK_STS_IOERR; return BLK_STS_OK; diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 1c7dd35cb7a0..7d010324c1e3 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,7 @@ enum fc_port_state { FC_PORTSTATE_ERROR, FC_PORTSTATE_LOOPBACK, FC_PORTSTATE_DELETED, + FC_PORTSTATE_MARGINAL, }; @@ -707,6 +709,23 @@ struct fc_function_template { unsigned long disable_target_scan:1; }; +/** + * fc_rport_chkmarginal_set_noretries - Set the SCMD_NORETRIES_ABORT bit + * in cmd->state if port state is marginal prior to initiating + * io to the port. + * @rport: remote port to be checked + * @scmd: scsi_cmd to set/clear the SCMD_NORETRIES_ABORT bit on Marginal state + **/ +static inline void +fc_rport_chkmarginal_set_noretries(struct fc_rport *rport, struct scsi_cmnd *cmd) +{ + if ((rport->port_state == FC_PORTSTATE_MARGINAL) && + (cmd->request->cmd_flags & REQ_FAILFAST_TRANSPORT)) + set_bit(SCMD_NORETRIES_ABORT, &cmd->state); + else + clear_bit(SCMD_NORETRIES_ABORT, &cmd->state); + +} /** * fc_remote_port_chkready - called to validate the remote port state @@ -715,20 +734,25 @@ struct fc_function_template { * Returns a scsi result code that can be returned by the LLDD. * * @rport: remote port to be checked + * @cmd: scsi_cmd to set/clear the SCMD_NORETRIES_ABORT bit on Marginal state **/ static inline int -fc_remote_port_chkready(struct fc_rport *rport) +fc_remote_port_chkready(struct fc_rport *rport, struct scsi_cmnd *cmd) { int result; switch (rport->port_state) { case FC_PORTSTATE_ONLINE: + case FC_PORTSTATE_MARGINAL: if (rport->roles & FC_PORT_ROLE_FCP_TARGET) result = 0; else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) result = DID_IMM_RETRY << 16; else result = DID_NO_CONNECT << 16; + + if (cmd) + fc_rport_chkmarginal_set_noretries(rport, cmd); break; case FC_PORTSTATE_BLOCKED: if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) From patchwork Thu Oct 15 03:27:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269786 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BAF9C433E7 for ; Thu, 15 Oct 2020 10:21:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEFFC22249 for ; Thu, 15 Oct 2020 10:21:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="hyIwpOXz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389220AbgJOKV2 (ORCPT ); Thu, 15 Oct 2020 06:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389099AbgJOKV1 (ORCPT ); Thu, 15 Oct 2020 06:21:27 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3103C061755 for ; Thu, 15 Oct 2020 03:21:27 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id b26so1756270pff.3 for ; Thu, 15 Oct 2020 03:21: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=7O0SfMi6GwI6PmzflUQvkrCIYczvFtIHH9lUhbDQhGA=; b=hyIwpOXza3q0ySoGLBrTPCpuHakPESbIderD7muVdUx1dBaPZ+se4fuLZmzwxbscuX p7yZiZTR1zcaPe0eOsQEHXYuj6AMYCcoI3boWc3uSU664Gve3NKdqajrW8tIR/r9pAQY AXos9o2xgP4sW8tkNGpEOVfsEyOSC9rTAXpIU= 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=7O0SfMi6GwI6PmzflUQvkrCIYczvFtIHH9lUhbDQhGA=; b=S9NKZbEKw6mVHdhihngqb8iyTwkQFTfvfJIulkdGAoSkf6gSE8rqPASG8CF+rA7+IW DxFluYH9AzHqiP5q9usOfb9ig9K84rj0WY4Vun2xnH84yWz/Zb9SFhaScY7UOOKD+lMF /9db4nteSfhjgoLCyUbki6dBl53lZ55gs9m9qI03norJnzQYHrVq8MwTCR9dxShk+tcw IWNNrnIcVOxeRSrKVcQV59COA5nwWjIZreS3Kcuo8jVdmv0rZVv1kuTs7mJ42NDKzJlS CmpFkrhulXFfHJHg82tyOzmpfrUZXCPQSmShFgIMZW+l8nZfM5D2WESlc37REi9J/kfR PhPw== X-Gm-Message-State: AOAM532J1BX2Ed4iEjxcuKWX+gl+UA/wgjbh4oNdO84dl2/ZEbECb3yn oAOrMPLkc6LfmXIIHi+OYTkq/138a0YobXsjHg2fkWiVP9e1iTjDGRiHaJqz/xIbHojtkaqa78e u5uIy0bQwK+CDIH8vfFEhSSChk7vbV6bCAH7QEZXoG4T5B462sOFJx1jOGhGFqS+qZFPBpJ7Q8E wF4AE7MigLdUY= X-Google-Smtp-Source: ABdhPJwYhrkzqApZS+IO15mTogfM11jApk9KSbap5tRzjt3IkeKhGByrgoOhVpgyz2hjt/uPaMz8Ig== X-Received: by 2002:aa7:9f88:0:b029:152:80df:4c52 with SMTP id z8-20020aa79f880000b029015280df4c52mr3493491pfr.54.1602757286780; Thu, 15 Oct 2020 03:21:26 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:26 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 07/17] scsi:lpfc: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:32 +0530 Message-Id: <1602732462-10443-8-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: Removed calling fc_rport_chkmarginal_set_noretries to set the SCMD_NORETRIES_ABORT bit. Modified the fc_remote_port_chkready fucntion by passing new argument scsi_cmd which internally checks and sets the same. v2: New Patch --- drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 5e802c8b22a9..35231dc30a99 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -4521,7 +4521,7 @@ lpfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd) if (unlikely(!rdata) || unlikely(!rport)) goto out_fail_command; - err = fc_remote_port_chkready(rport); + err = fc_remote_port_chkready(rport, cmnd); if (err) { cmnd->result = err; goto out_fail_command; @@ -5519,7 +5519,7 @@ lpfc_slave_alloc(struct scsi_device *sdev) unsigned long flags; struct lpfc_name target_wwpn; - if (!rport || fc_remote_port_chkready(rport)) + if (!rport || fc_remote_port_chkready(rport, NULL)) return -ENXIO; if (phba->cfg_fof) { From patchwork Thu Oct 15 03:27:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BC5BC433DF for ; Thu, 15 Oct 2020 10:21:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1E4C322249 for ; Thu, 15 Oct 2020 10:21:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="WwPf0GMF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389227AbgJOKVd (ORCPT ); Thu, 15 Oct 2020 06:21:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389099AbgJOKVd (ORCPT ); Thu, 15 Oct 2020 06:21:33 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A79C061755 for ; Thu, 15 Oct 2020 03:21:33 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id f5so1638712pgb.1 for ; Thu, 15 Oct 2020 03:21: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=TYmvj6yiWGXfqVJr1c+9931Oj6DWNDChph4J0sZEIl4=; b=WwPf0GMFpe5o5jezNZnDv8YRLykXoCxrOR+ZFY6N7uCundi+LTdjJe/x2tWOi1Ua2s yvfKkzjm/7J4+D0bgWgmCFi+50nBxzJZ4ukypi0h83TFA+NlYK2QytBvoo8KScK9nr8s cV0cwkUhFyLEg+S/AZPNBl3RQAEqnE1rMbIec= 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=TYmvj6yiWGXfqVJr1c+9931Oj6DWNDChph4J0sZEIl4=; b=Run1zNX3ZWG86ZVqRSDwze+nFH/3mzRSu636cXwbI7+sjYEq6xl7/Mn7Zy7cStg4ek xbk48EGktnC7uCHay+QRBbKiAuvW/drS8VB6/rPdZJEjxTWkqJxZjAlsZnU+No5HfjHP nF1FA5Hq6XBarUnT+VHAe2YvBuXwNrR3mtIjrjHlBWxGJ5LxCtbjpl9YSBGJu60GZsEV /+mdesos3q9Ahb1ts/R+gFPcRDnsbtp6tCrma+rA+HQABnzTdAzqJ39SHFgAkv8+ala7 zWr9GQlBEamiTf11CbRWAbcGm0uVJS3j4AkLsU4Udh05bnHQcRS1w/J5Z3tGNhutVmSB COag== X-Gm-Message-State: AOAM533j5tZYzN6+NP0vgAkkRjk51B+55k63xhWVj7Hs2p45IPFcN6c7 8KAH8iMQA8o+wnY7w1rC/OPBqxNuvIYRisCKh0BV+HeZJrVGRcXk/JR7BkpgtOFZE1HTkjMZe9i OOppLs0dwQjuFO+ypQVgR1IXFvW6SYmRO4xTDiE9Cp5623k7F3szqRGECmIAlfO0sENIerumOwn g+3sis0E1FPk8= X-Google-Smtp-Source: ABdhPJz6SvMiobtuOeP7pitZEZi/RuJ4AyG2FKYT3KzgIGAYtwcNg+hwsVcSiJbZMxqaYaebiZi0fg== X-Received: by 2002:a63:ef4f:: with SMTP id c15mr2813787pgk.140.1602757292508; Thu, 15 Oct 2020 03:21:32 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:31 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 09/17] scsi:qedf: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:34 +0530 Message-Id: <1602732462-10443-10-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: New Patch --- drivers/scsi/qedf/qedf_els.c | 2 +- drivers/scsi/qedf/qedf_io.c | 4 ++-- drivers/scsi/qedf/qedf_main.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qedf/qedf_els.c b/drivers/scsi/qedf/qedf_els.c index 625e58ccb8c8..278921555def 100644 --- a/drivers/scsi/qedf/qedf_els.c +++ b/drivers/scsi/qedf/qedf_els.c @@ -35,7 +35,7 @@ static int qedf_initiate_els(struct qedf_rport *fcport, unsigned int op, QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_ELS, "Sending ELS\n"); - rc = fc_remote_port_chkready(fcport->rport); + rc = fc_remote_port_chkready(fcport->rport, NULL); if (rc) { QEDF_ERR(&(qedf->dbg_ctx), "els 0x%x: rport not ready\n", op); rc = -EAGAIN; diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index 4869ef813dc4..0673b28ede2b 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -975,7 +975,7 @@ qedf_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc_cmd) return 0; } - rval = fc_remote_port_chkready(rport); + rval = fc_remote_port_chkready(rport, sc_cmd); if (rval) { QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_IO, "fc_remote_port_chkready failed=0x%x for port_id=0x%06x.\n", @@ -2438,7 +2438,7 @@ int qedf_initiate_tmf(struct scsi_cmnd *sc_cmd, u8 tm_flags) io_req, io_req->xid, ref_cnt); } - rval = fc_remote_port_chkready(rport); + rval = fc_remote_port_chkready(rport, sc_cmd); if (rval) { QEDF_ERR(NULL, "device_reset rport not ready\n"); rc = FAILED; diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 46d185cb9ea8..59990400be08 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -761,7 +761,7 @@ static int qedf_eh_abort(struct scsi_cmnd *sc_cmd) goto drop_rdata_kref; } - if (fc_remote_port_chkready(rport)) { + if (fc_remote_port_chkready(rport, sc_cmd)) { refcount = kref_read(&io_req->refcount); QEDF_ERR(&qedf->dbg_ctx, "rport not ready, io_req=%p, xid=0x%x sc_cmd=%p op=0x%02x, refcount=%d, port_id=%06x\n", From patchwork Thu Oct 15 03:27:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269784 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38C3FC433E7 for ; Thu, 15 Oct 2020 10:21:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C9BAD2224A for ; Thu, 15 Oct 2020 10:21:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="abtyiINV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389241AbgJOKVj (ORCPT ); Thu, 15 Oct 2020 06:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389099AbgJOKVj (ORCPT ); Thu, 15 Oct 2020 06:21:39 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32F3BC061755 for ; Thu, 15 Oct 2020 03:21:39 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id y1so1374349plp.6 for ; Thu, 15 Oct 2020 03:21:39 -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=A5jzPrDZZ/cQ4kZ35qy+EheUut8LKE/CA7w1dJ+05AU=; b=abtyiINVVzyCmJhDiygtqLm+915Yt/qsRVpYbL+MpguBYVsI0s1JYXK2f/yW5vcK8e zo9ekznqKrhPoOsYt0l453fZVVjvHszU+EisHOygxCh7CHsznR+zzlK3EUrJ9dqz0VFd tv2f1tYkBXDNBZH5/tLI07+ZGkfBeKm68x7Gw= 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=A5jzPrDZZ/cQ4kZ35qy+EheUut8LKE/CA7w1dJ+05AU=; b=fKGbw4fMCq6+F9fu6l1U0dHFUg25jE+uACDZNEuwApqVABB6D0kldNJFTgApD/Zenr c+Sm2eCEZMnyGgI6ToVRv46RYmqU6Bozcwda7vcsbpK49PFaB+9Jg1WJWyoPE1kbJ0YR FA2J6+2UcJzXYZdTfOLFRpdDDVDqPJ0ZAFVWRA/Rx3q6xM3VMdKfDLr7ck9SnxeOzCGz XskZ+WehB7aCvg3+Gc59NDH7hj7/XSpUxzvVHg71B8LxDlM0pYkiccs/xBHeNZ/I+zfm ti4G3uEBP+gKqo0EmhlwI35bATs4yEGehjpm2Abd95u4HBE0I+/Ee2ub7HStp1JQwANH KHxA== X-Gm-Message-State: AOAM532FgfQ0OU5aDfVPfO2Z21kJRaSW/vmWxhUJ5CSvzI/C4i3zCJtr fCtVeJrkO4MYBYuoNKMkNYObA+5iM61RRApS76bgfg0y2yRwy+QVdy6AvJS0nvCuZI5BH0bBjEc tyvmTrovxmPAob6GHEWL20qU2cSYGIDWIqs5yJs4EMl0qLjny2ij4Rn5xyjdeXPcLQHihTL79f0 lCk3XCXy8PTP8= X-Google-Smtp-Source: ABdhPJzFiXX09lyP2KhzG6eV4q9T26gFqONnpjELmApHUIdAQEkUiIBT0yoZUceG6gtKkWgw3mPhag== X-Received: by 2002:a17:90a:c28a:: with SMTP id f10mr3673144pjt.30.1602757298256; Thu, 15 Oct 2020 03:21:38 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:37 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 11/17] scsi:ibmvfc: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:36 +0530 Message-Id: <1602732462-10443-12-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Also fixed the checkpatch error "do not use assignment in if condition" Signed-off-by: Muneendra --- v3: New Patch --- drivers/scsi/ibmvscsi/ibmvfc.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index e09e0310b4c8..0c9334e8f036 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c @@ -1663,8 +1663,15 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd, struct ibmvfc_event *evt; int rc; - if (unlikely((rc = fc_remote_port_chkready(rport))) || - unlikely((rc = ibmvfc_host_chkready(vhost)))) { + rc = fc_remote_port_chkready(rport, cmnd); + if (unlikely(rc)) { + cmnd->result = rc; + done(cmnd); + return 0; + } + + rc = ibmvfc_host_chkready(vhost); + if (unlikely(rc)) { cmnd->result = rc; done(cmnd); return 0; @@ -1934,8 +1941,19 @@ static int ibmvfc_bsg_request(struct bsg_job *job) spin_lock_irqsave(vhost->host->host_lock, flags); - if (unlikely(rc || (rport && (rc = fc_remote_port_chkready(rport)))) || - unlikely((rc = ibmvfc_host_chkready(vhost)))) { + if (unlikely(rc)) { + spin_unlock_irqrestore(vhost->host->host_lock, flags); + goto out; + } + + rc = fc_remote_port_chkready(rport, NULL); + if (rport && rc) { + spin_unlock_irqrestore(vhost->host->host_lock, flags); + goto out; + } + + rc = ibmvfc_host_chkready(vhost); + if (unlikely(rc)) { spin_unlock_irqrestore(vhost->host->host_lock, flags); goto out; } @@ -2910,7 +2928,7 @@ static int ibmvfc_slave_alloc(struct scsi_device *sdev) struct ibmvfc_host *vhost = shost_priv(shost); unsigned long flags = 0; - if (!rport || fc_remote_port_chkready(rport)) + if (!rport || fc_remote_port_chkready(rport, NULL)) return -ENXIO; spin_lock_irqsave(shost->host_lock, flags); From patchwork Thu Oct 15 03:27:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74F35C433DF for ; Thu, 15 Oct 2020 10:21:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E07B2224A for ; Thu, 15 Oct 2020 10:21:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="a11SvQYU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389250AbgJOKVp (ORCPT ); Thu, 15 Oct 2020 06:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389099AbgJOKVp (ORCPT ); Thu, 15 Oct 2020 06:21:45 -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 59851C061755 for ; Thu, 15 Oct 2020 03:21:45 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id y14so1604732pgf.12 for ; Thu, 15 Oct 2020 03:21:45 -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=42i1EVubyEeOXdRAb010a7Lx2ZRwVe+fs9iNXngBgEY=; b=a11SvQYUdhSJl8uIdI8mF17bf6vf/4Mqu0+yXGtm/C1CWchUaXviqx4TpM3f/AJ9c3 EIXOGrpfGw8G3WP+qD+nE5RaVI3djWK8OM+zanVGaABCsgB44tJOemeVjcACyoCEbo31 F3j/xAUXRjw2/dzGZr3g+rwYAmo12nC5YOCd4= 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=42i1EVubyEeOXdRAb010a7Lx2ZRwVe+fs9iNXngBgEY=; b=IUiW9H+SpLnR6JlaX9qT7SwAyLB1UohjMSnlkDDJAOY7+BtC7ffvHRdl4o+CbZ8doS qAxN9gJezcgmJOiMrQF/aG40ORr6hEDi6FASveORJFQMMc9ul7/4+Ew4JrBNicAO9pFv kPZK7YExokhxm0PMB8pPKn/qfkJPp+5Z4ow6YvUk6ZWWuz5/j2ZsE0OGWmMSKJHVB6XF KjGxQ8pKNS00/7Yvnvh2mWdfiHTQ7tEoBzidpunnlEDZyYKTym42wkhuw48Dzr592Lt+ oOg17QkD4pOlLTV1KJWWBPaxOA6ukkZ5GS2KpD0gXwKhz0cf3RDPpShNaBmMGZ8CRdYS ehTw== X-Gm-Message-State: AOAM530mbCXLxQv2Xm8gXTDHG5aN6ezHAN+nzhhkHhUNYY2Ex5T0uWxi kOXfZISZ/v/Kok082V5IGep0zS8bOlAvtQ1fzjgyV08CxZdik3sXwVdlDLi86FGk9AVvo6PNBSe uv2lle7QNzkWcJxo8m0px/tessqsKglpR5ZErgUDxcxAusU/zUl+BEpcIVUqpfwP97UaCt4kq6t ohMiOJ53VsjEQ= X-Google-Smtp-Source: ABdhPJzZ/eTN2aV3RuhpbZma3t8yID6o1FbB+9YBHl1N5IA7u2DfWkUiRCXHb7RAn9Heq/mfL++PMA== X-Received: by 2002:a65:620e:: with SMTP id d14mr2731109pgv.363.1602757304495; Thu, 15 Oct 2020 03:21:44 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:43 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 13/17] scsi:bnx2fc: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:38 +0530 Message-Id: <1602732462-10443-14-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: New Patch --- drivers/scsi/bnx2fc/bnx2fc_els.c | 2 +- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bnx2fc/bnx2fc_els.c b/drivers/scsi/bnx2fc/bnx2fc_els.c index 754f2e82d955..aea0e2e6c8b4 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_els.c +++ b/drivers/scsi/bnx2fc/bnx2fc_els.c @@ -686,7 +686,7 @@ static int bnx2fc_initiate_els(struct bnx2fc_rport *tgt, unsigned int op, u32 did, sid; u16 xid; - rc = fc_remote_port_chkready(rport); + rc = fc_remote_port_chkready(rport, NULL); if (rc) { printk(KERN_ERR PFX "els 0x%x: rport not ready\n", op); rc = -EINVAL; diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c index 1a0dc18d6915..bed00287f8f1 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_io.c +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c @@ -1849,7 +1849,7 @@ int bnx2fc_queuecommand(struct Scsi_Host *host, int rc = 0; int rval; - rval = fc_remote_port_chkready(rport); + rval = fc_remote_port_chkready(rport, sc_cmd); if (rval) { sc_cmd->result = rval; sc_cmd->scsi_done(sc_cmd); From patchwork Thu Oct 15 03:27:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269782 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75243C433E7 for ; Thu, 15 Oct 2020 10:21:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14C7522249 for ; Thu, 15 Oct 2020 10:21:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="QA2NYLcj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389257AbgJOKVv (ORCPT ); Thu, 15 Oct 2020 06:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389099AbgJOKVv (ORCPT ); Thu, 15 Oct 2020 06:21:51 -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 3B9A8C061755 for ; Thu, 15 Oct 2020 03:21:51 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id e10so1767681pfj.1 for ; Thu, 15 Oct 2020 03:21:51 -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=ZpxT8338r2d2t8w/r7yQoJ8T+dt0cI+iYrUYzx7SyQ4=; b=QA2NYLcj1VXLOluGtxiUWsL7RaVSzttPFnuHiUVNf4KToog9+J8TCxjIEZAvUqShDr wfjQGl1Inj5Wl9rGlA/YgeHiqJkicYsD2Qg4MVTuCR8GOdzkJvl7SVwvIo2YC9GJJkqk Ls83hiHelIiJzid3TI6ZjxZs8/iSbvXFmu1Ns= 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=ZpxT8338r2d2t8w/r7yQoJ8T+dt0cI+iYrUYzx7SyQ4=; b=suggv6xpIu9PCE/ecw7qAQsDqmX8apUVARiwJDQrKsY0rqh4KAKvBtcIvYsnsFzuTR otgplnSfx/Hp8xhfRruuRDDK8apOlxKVDWPfXohmcizMdilfSm9CttZUNLj8wDPxfDhR 9jXtwb/MORdPo0vAzmUsWVMBTWE/YrYZJFTD4SQaSG4kC4kQH3gmJbhFvdSntTAX1O/l RsXY19cXsT6SIfqBvFCA/1qvVlT/M8QPrQcyeKyFjeXF1/CdEZsa8pj8rEe1LGdgWL86 cXUivobEMT4ZUHi3Nye913A0DY7DPSTs25iaSNApbG4SUOabLD9AAKEOKiqAPu4X5b7H /5aA== X-Gm-Message-State: AOAM5302U9nrHKYX87xwjOvNg0mvjhuPLJfeqVquVGmpO49QVQuvhj4u QD70mpxyr2QCewLvHjBuWAF4TivmVlxH8x6/i5vYUwUhb17iHBtp+jvo90BWwXSLOF8G/0QEM4l Uczfgv7FGnucistdtzINCMW+HF7POu0BpNavhbDk7Kd5TqWnans5j7rjUbIFyfW44V3e4pr7CDx ncgAEwjYioGLI= X-Google-Smtp-Source: ABdhPJyKj5vooWcoc0Xi8ZfLkI+zzhVyVFBk0MZw3YMUxXn3pH43RNGfOUC1fqBYOvt2MdU2RU5MXw== X-Received: by 2002:a63:ba49:: with SMTP id l9mr2891509pgu.246.1602757310373; Thu, 15 Oct 2020 03:21:50 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:49 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 15/17] scsi:bfa: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:40 +0530 Message-Id: <1602732462-10443-16-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: New Patch --- drivers/scsi/bfa/bfad_im.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfad_im.c b/drivers/scsi/bfa/bfad_im.c index 22f06be2606f..550ce8cdbce2 100644 --- a/drivers/scsi/bfa/bfad_im.c +++ b/drivers/scsi/bfa/bfad_im.c @@ -956,7 +956,7 @@ bfad_im_slave_alloc(struct scsi_device *sdev) struct bfad_itnim_data_s *itnim_data; struct bfa_s *bfa; - if (!rport || fc_remote_port_chkready(rport)) + if (!rport || fc_remote_port_chkready(rport, NULL)) return -ENXIO; itnim_data = (struct bfad_itnim_data_s *) rport->dd_data; @@ -1213,7 +1213,7 @@ bfad_im_queuecommand_lck(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd int sg_cnt = 0; struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); - rc = fc_remote_port_chkready(rport); + rc = fc_remote_port_chkready(rport, cmnd); if (rc) { cmnd->result = rc; done(cmnd); From patchwork Thu Oct 15 03:27:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muneendra Kumar X-Patchwork-Id: 269781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, T_TVD_MIME_NO_HEADERS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 570A6C433DF for ; Thu, 15 Oct 2020 10:21:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E975522249 for ; Thu, 15 Oct 2020 10:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="I4Cf3uDj" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389261AbgJOKV5 (ORCPT ); Thu, 15 Oct 2020 06:21:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389258AbgJOKV5 (ORCPT ); Thu, 15 Oct 2020 06:21:57 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14916C061755 for ; Thu, 15 Oct 2020 03:21:57 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id n9so1617771pgt.8 for ; Thu, 15 Oct 2020 03:21:57 -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=7QFVfyHO4AIyGbvZ7y0VU0rKvXYixIV0W1gR8F9fOrU=; b=I4Cf3uDjIDBii45GFub9btzd+CQr/fd2tTofzmuTNLQ/uOLP9ZkScGCD0xvQnEtS2w K/jcFuKwopkJvw1y0Odtn4y/DaV0Qw9euBKjqpzXStzYsWLqqJ8agLl1DPGJ+3iiAYBJ UhZPC4ttD/ExTGiLxp5DbAMpyDOj+SpB7Wb2s= 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=7QFVfyHO4AIyGbvZ7y0VU0rKvXYixIV0W1gR8F9fOrU=; b=ulPi3Av6KtV3921M/C9CWreIjxfE42B6K+4EQjNKdjMU0QB6VRF5mXL1Q9zfvZAdwG lD6gf5x/LSYyp3WSJpWLa+2Myr3wxt+8RV8IAiPBkrOjyK/m9C+8BGCS77NMfHbMWaND kPJ81Xvt+sGjz7bddXDSI1054ddZWJlBl8y6Om4aT5rgcZaComC+RmNP6dohmgNB5d45 nFldDJZtO2iOZMgy8XwJUKy4yvO530zl9OJRj6+0Ue3KYGP67NMunkJIMRf+KfPlpCyl oGmV0iYxE5eoLNgp7dFT5Jog6+UL34LFke3JhcUJT9ctym0dcpKstCGUbtWw3GmNWax3 sArA== X-Gm-Message-State: AOAM53095lEKcvcoi2ZPvr73wDk5nQWRY+ALpn+/c0UlQrkLpDs1tXiF RIRZoWN4reCINnfTbykBArwHKS2uARw5kENTch7V0z/p3p/Ll5bcXHJ9AYKZAMdxEr9/XylYw6g tZ6HesKRwNrprkmvjOoxydytOp+dAs3wHP7VUATHQ7XdodGEdE45hW6wUEmjsFhQSSsMa02cl7U ymeN65bRdMnHQ= X-Google-Smtp-Source: ABdhPJx3aGiJGiE6gvfvxHXA9fcAVe8gFmeUhpTme0ntZ9V0LTiIDjh6n8E+QaDvGPdeipOOx7E+4w== X-Received: by 2002:aa7:875a:0:b029:155:7c08:f2ed with SMTP id g26-20020aa7875a0000b02901557c08f2edmr3663691pfo.52.1602757316208; Thu, 15 Oct 2020 03:21:56 -0700 (PDT) Received: from localhost.localdomain ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 194sm2802258pfz.182.2020.10.15.03.21.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2020 03:21:55 -0700 (PDT) From: Muneendra To: linux-scsi@vger.kernel.org, hare@suse.de Cc: jsmart2021@gmail.com, emilne@redhat.com, mkumar@redhat.com, Muneendra Subject: [PATCH v3 17/17] scsi:mpt: Added changes to fc_remote_port_chkready Date: Thu, 15 Oct 2020 08:57:42 +0530 Message-Id: <1602732462-10443-18-git-send-email-muneendra.kumar@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> References: <1602732462-10443-1-git-send-email-muneendra.kumar@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Added changes to pass a new argument to fc_remote_port_chkready Signed-off-by: Muneendra --- v3: New Patch --- drivers/message/fusion/mptfc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index f92b0433f599..e6f7fa891455 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c @@ -199,7 +199,7 @@ mptfc_block_error_handler(struct scsi_cmnd *SCpnt, hd = shost_priv(SCpnt->device->host); ioc = hd->ioc; spin_lock_irqsave(shost->host_lock, flags); - while ((ready = fc_remote_port_chkready(rport) >> 16) == DID_IMM_RETRY + while ((ready = fc_remote_port_chkready(rport, SCpnt) >> 16) == DID_IMM_RETRY || (loops > 0 && ioc->active == 0)) { spin_unlock_irqrestore(shost->host_lock, flags); dfcprintk (ioc, printk(MYIOC_s_DEBUG_FMT @@ -606,7 +606,7 @@ mptfc_slave_alloc(struct scsi_device *sdev) starget = scsi_target(sdev); rport = starget_to_rport(starget); - if (!rport || fc_remote_port_chkready(rport)) + if (!rport || fc_remote_port_chkready(rport, NULL)) return -ENXIO; hd = shost_priv(sdev->host); @@ -653,7 +653,7 @@ mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt) return 0; } - err = fc_remote_port_chkready(rport); + err = fc_remote_port_chkready(rport, SCpnt); if (unlikely(err)) { SCpnt->result = err; SCpnt->scsi_done(SCpnt);