From patchwork Sat Dec 9 01:18:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10103491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7C6D460223 for ; Sat, 9 Dec 2017 01:18:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7028528FFE for ; Sat, 9 Dec 2017 01:18:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6530E2900D; Sat, 9 Dec 2017 01:18:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0857928FFE for ; Sat, 9 Dec 2017 01:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753774AbdLIBSe (ORCPT ); Fri, 8 Dec 2017 20:18:34 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:46814 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752240AbdLIBS3 (ORCPT ); Fri, 8 Dec 2017 20:18:29 -0500 Received: by mail-qk0-f195.google.com with SMTP id b184so1024065qkc.13 for ; Fri, 08 Dec 2017 17:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tE8yfeeTMY0a0MeH5wd3usLcWW+P01goVGMNfJuTIP4=; b=bS0F6gCKYQRQVz0lzqjPHkCbW23HHmV8N15PzGOnvJIRbGkVQ1LDTfQOuBil+e+O8X ehqDFPUEBni2p9h3/pfNrG2WDe29ap/3GnkmFOcSGVhXy0or3dEqowBdLyoX5FmAyF5l i2vbIR5whS2bTVRQq1vgDWTjpCb6xgogWZ8CW9RM8EFwbtUnWuX1DqyADUQ/2H5oYP9u 9SRWgzLY/6SUwd60D9ALUyjGbVAZlsi3TQAID8a7aZ9pbH7ml2VwVB31PBa6yux25D1N VFhgyhcbBglJL+UDo8bYyzHxn/V1gfUj6vOuEW27xa1+WVabJVYLLgEXSnIO3lHN0U9O Lm7w== 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=tE8yfeeTMY0a0MeH5wd3usLcWW+P01goVGMNfJuTIP4=; b=Ryq6ADRrGRTJzlnBpZj/XCPYimVZV9m4/Q5rTtB4q048I/P0uq5VRBvdiy+BlQMZAL AI9IkpMa8z/GK1rOGCsBk0AQwU+0k6o9PhkCtd9D6EcrIJPXifCAHVd79Yg9TpBRRS7w 9yylq7Q1X+gxsRWRfK1wxWFSfuihQNJYDgTLufpU3J9w8wP3SHAmWju4I8gSPVOzV5jV blhT91+VdiaacHeU8oNXlduEeFF3VlG+AYJc7A7e299O8iHcXkPSSfnxD5ZtRMyJ8pzH dr3lhne4o9Ua5h4SAJsKg3vOkoEXTK6EPbCJWNU3VvlOTe4t67VbbMkETKLqVr0keIYW 0doA== X-Gm-Message-State: AKGB3mIE60em9+HG84hsvfClTvOYFpWqWGpLo1eo5tOdPHonQM05Y0ib xn+l/1424yMRSr8P7vrsb3C9Gw== X-Google-Smtp-Source: AGs4zMa9Cj0XbGrkYa+wfZan28yZvYxauRqNsykZEgh92JWE3sfnrfiu9Cp9LlBVQC2YGeBl+eTLEg== X-Received: by 10.55.51.73 with SMTP id z70mr36073074qkz.338.1512782309010; Fri, 08 Dec 2017 17:18:29 -0800 (PST) Received: from pallmd1.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id k1sm922511qtf.11.2017.12.08.17.18.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 08 Dec 2017 17:18:28 -0800 (PST) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart , Dick Kennedy , James Smart Subject: [PATCH 6/9] lpfc: Fix issues connecting with nvme initiator Date: Fri, 8 Dec 2017 17:18:08 -0800 Message-Id: <20171209011811.23421-7-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20171209011811.23421-1-jsmart2021@gmail.com> References: <20171209011811.23421-1-jsmart2021@gmail.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the lpfc discovery engine, when as a nvme target, where the driver was performing mailbox io with the adapter for port login when a NVME PRLI is received from the host. Rather than queue and eventually get back to sending a response after the mailbox traffic, the driver rejected the io with an error response. Turns out this particular initiator didn't like the rejection values (unable to process command/command in progress) so it never attempted a retry of the PRLI. Thus the host never established nvme connectivity with the lpfc target. By changing the rejection values (to Logical Busy/nothing more), the initiator accepted the response and would retry the PRLI, resulting in nvme connectivity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_nportdisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 283382ac0456..d841aa42f607 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c @@ -1603,8 +1603,8 @@ lpfc_rcv_prli_reglogin_issue(struct lpfc_vport *vport, * rpi registration does complete. */ memset(&stat, 0, sizeof(struct ls_rjt)); - stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; - stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; + stat.un.b.lsRjtRsnCode = LSRJT_LOGICAL_BSY; + stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; lpfc_els_rsp_reject(vport, stat.un.lsRjtError, cmdiocb, ndlp, NULL); return ndlp->nlp_state;