From patchwork Fri Sep 22 06:17:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 9965239 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 50675602D8 for ; Fri, 22 Sep 2017 06:18:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EC0029707 for ; Fri, 22 Sep 2017 06:18:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 239602970B; Fri, 22 Sep 2017 06:18:22 +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 B890229707 for ; Fri, 22 Sep 2017 06:18:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751891AbdIVGSN (ORCPT ); Fri, 22 Sep 2017 02:18:13 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36740 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbdIVGSI (ORCPT ); Fri, 22 Sep 2017 02:18:08 -0400 Received: by mail-pg0-f65.google.com with SMTP id d8so120650pgt.3 for ; Thu, 21 Sep 2017 23:18:08 -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=8/kNJV08vZQhY1+fSbSajRkfFSpkKuM0GPOA3EOGLP8=; b=Z8dgHO2dklF2CIBSFmCDcWXZeoxM3RBygIoVwbH0qPZ4ypt5spJxZBKbDm15Vt7Ro0 hKiWWfcxRR+Ruo+TzC1C4ZvCDixFT4m/bkpMx0mzWQ7UYny6FLmOpFhjr6jRevCCPtv/ nU3sPw/GxZ40+g2So+DonlqBC8C16cauli2mEL3gUZ5teeRDinAg4H1JvFMsEG/ZjVDg vQ6y7aviLA4fc56GlVWa6LHor3gWnXg116LupJsZ7DCCO+y2tMsGo3i6FGYw7Gui+eqT TESIhvpHfggrFjHnh1d2QwoOtTeSzsG9A9j0hSTRCmmvv2fG30jA9am+mXZjkqLkqcj8 To5w== 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=8/kNJV08vZQhY1+fSbSajRkfFSpkKuM0GPOA3EOGLP8=; b=rTUTeNG/eXv3eDxAeYnKG0Uqn/6vWYyOIGYcXKEeOn4m4PWaPV3yd2QWLc24R0/p+q JI7+EG2VmW/lQ5D6e/cOUXAGm14GO5yoA7gR+baWbEt0xL+x07rvXVTylwIwY2WSb6DX VpBtAef00LeGk8EjZl+3L7BCjfA7uVuHN5uJus2cZ5x/ZteI9dqvTgIvBGGe1WA83qoN whAfAHfH9eSAdG375RCDefsgTKqlf4GWf+c0xS9C/j2C9Xyr5drlZ0rg8fZhZ0IXDV9b l4Siy2O+KA4kb6Wt3kChr+2QTvVYzL8//VsIbH4KL9R6er6Ps9aj98rm1ls2lJ+y8P5f vFwQ== X-Gm-Message-State: AHPjjUhP67o486jiJP8g0v20xBk5VSLHZFZIFK+cMRIA5X7mUX5lmyjE Zw+bpFTuDgDtWHjfEIiXktSCTg== X-Google-Smtp-Source: AOwi7QCgNGPMXvxdS91at/XZidHU9fhshMk6RH9miqZ8ipRWqUKTsaqYqpYP1D6Xka93e1k+xk4/pA== X-Received: by 10.98.59.193 with SMTP id w62mr8291993pfj.5.1506061088317; Thu, 21 Sep 2017 23:18:08 -0700 (PDT) Received: from os42.localdomain (ip68-4-115-207.oc.oc.cox.net. [68.4.115.207]) by smtp.gmail.com with ESMTPSA id e87sm5911355pfl.46.2017.09.21.23.18.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 23:18:07 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: Dick Kennedy , James Smart Subject: [PATCH 13/19] lpfc: Disable NPIV support if NVME is enabled Date: Thu, 21 Sep 2017 23:17:35 -0700 Message-Id: <20170922061741.12347-14-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170922061741.12347-1-jsmart2021@gmail.com> References: <20170922061741.12347-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,