From patchwork Sat Sep 30 00:34:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 9978897 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 4FDB56037F for ; Sat, 30 Sep 2017 00:35:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41482298D1 for ; Sat, 30 Sep 2017 00:35:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 365A1298D5; Sat, 30 Sep 2017 00:35:27 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 BF6C2298D1 for ; Sat, 30 Sep 2017 00:35:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752621AbdI3AfY (ORCPT ); Fri, 29 Sep 2017 20:35:24 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:35960 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbdI3AfJ (ORCPT ); Fri, 29 Sep 2017 20:35:09 -0400 Received: by mail-qk0-f193.google.com with SMTP id z14so776434qkg.3 for ; Fri, 29 Sep 2017 17:35:09 -0700 (PDT) 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=/dHd+wwDucSeJNiXgJ1NRety2i4VOeQiP1EtdY5Q7Wk=; b=tnJwfwVhvHqbXlPWrKVxVvKFUQkjw7pYvCcRJIyh9ly0wrKH6TiRRH5YetAJYk8dXw esfQD7MXu27rjiEZIsz3lZ+ZU5ZCt+cugw6eMao5AFymmD7sJxBCImYhzap7HpWV+wlF nC2Go6FKrrF8cKNRls7Hyrkpy4ifu2fa2y4MiI5FW/u9Wb5UW5e+XgBQ5NKH3y8+fA0z s2vL+v9Wa3EdfZE3twRROHKLBW26BGX7avBE+G4NlNF1eLQMyxrRPk3qd6/PNNXZbMNE eRRKhPVIbdjDuDqZq2GHiu6W7wfbiCwUPF/8JAXcECfDrfNeLTy089lba5E1QcNx8Jwv /fVg== 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=/dHd+wwDucSeJNiXgJ1NRety2i4VOeQiP1EtdY5Q7Wk=; b=Cd7JfCUXIF2I4uht3UsIa9mmEh/CCTyqgormHIItTn0GShhU34NKw87k3wmDQglu+v M67KtcoIWX81T7GS5DGStgecYpb/JtcFG3II5+ChYWn8MEHWuzVtHSXzYVUcOgixkXjr OD/AO+Rah5/G1LsvMYOl4Sro1S11P/gSOXEGeyx6u9LWmdMkY7a8AM7OFLpp5m3/ArTH C7atUii9Fc4tvk0Xlhluvskzmajt6KG5oo8QXSW0y3AelV3tBTS1dGR/29LM0rKO2Sg5 y4tpqdLUV+ifPH2GfSdx+yZrHdZrIcKTOC3A5uFRHgQWSN6yZhhB1mAWSb7C6Lh0dSOC QBGA== X-Gm-Message-State: AMCzsaV2xpSn+LKGX/gAyLtKXTtb76r24QATh0nO1jNX6zgXL2wWU+Lx de/BBjJ5hICoyx+0aSsiy5bz8g== X-Google-Smtp-Source: AOwi7QD2lxQnqSk9aw7HO659ZE9LNMmaGqNdK1R36KjAO3Z6JCwXKad0slVriZTG54asztApeCTCyQ== X-Received: by 10.55.91.69 with SMTP id p66mr5849472qkb.167.1506731708541; Fri, 29 Sep 2017 17:35:08 -0700 (PDT) Received: from pallmd1.broadcom.com ([192.19.255.250]) by smtp.gmail.com with ESMTPSA id u32sm3596918qte.25.2017.09.29.17.35.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 29 Sep 2017 17:35:08 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: Dick Kennedy , James Smart Subject: [PATCH v2 14/21] lpfc: Disable NPIV support if NVME is enabled Date: Fri, 29 Sep 2017 17:34:40 -0700 Message-Id: <20170930003447.10747-15-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170930003447.10747-1-jsmart2021@gmail.com> References: <20170930003447.10747-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 From: Dick Kennedy The initial implementation of NVME didn't merge with NPIV support. As such, there are several issues if NPIV is used with NVME. For now, ensure that if NVME is enabled then NPIV is not enabled. Support for NPIV with NVME will be added in the near future. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_vport.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index c714482bf4c5..c9d33b1268cb 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c @@ -313,6 +313,15 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) goto error_out; } + /* NPIV is not supported if HBA has NVME enabled */ + if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) { + lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, + "3189 Create VPORT failed: " + "NPIV is not supported on NVME\n"); + rc = VPORT_INVAL; + goto error_out; + } + vpi = lpfc_alloc_vpi(phba); if (vpi == 0) { lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,