From patchwork Tue Apr 4 17:16:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dick Kennedy X-Patchwork-Id: 9662231 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 3DE1D602BA for ; Tue, 4 Apr 2017 17:26:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D1C728423 for ; Tue, 4 Apr 2017 17:26:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2208128491; Tue, 4 Apr 2017 17:26:56 +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.9 required=2.0 tests=BAYES_00,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 9CDFB28423 for ; Tue, 4 Apr 2017 17:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755024AbdDDRZk (ORCPT ); Tue, 4 Apr 2017 13:25:40 -0400 Received: from lpdvrndsmtp01.broadcom.com ([192.19.229.170]:38135 "EHLO rnd-relay.smtp.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754986AbdDDRZh (ORCPT ); Tue, 4 Apr 2017 13:25:37 -0400 Received: from pallmd1.broadcom.com (pallmd1.ash.broadcom.net [10.85.232.165]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 8E5B530C0A4 for ; Tue, 4 Apr 2017 10:17:24 -0700 (PDT) Received: from lvnvda1400.lvn.broadcom.net (lvnvda1400.lvn.broadcom.net [10.75.197.131]) by pallmd1.broadcom.com (Postfix) with ESMTP id DF8B836005C; Tue, 4 Apr 2017 13:17:23 -0400 (EDT) Received: from lvnvda1400.lvn.broadcom.net (localhost.localdomain [127.0.0.1]) by lvnvda1400.lvn.broadcom.net (8.14.4/8.14.4) with ESMTP id v34HHMFU011307; Tue, 4 Apr 2017 10:17:23 -0700 Received: (from rkennedy@localhost) by lvnvda1400.lvn.broadcom.net (8.14.4/8.14.4/Submit) id v34HHMgj011306; Tue, 4 Apr 2017 10:17:22 -0700 From: Dick Kennedy To: linux-scsi@vger.kernel.org Cc: Dick Kennedy , Dick Kennedy , James Smart Subject: [lpfc 01/19] Fix advertised max_sgl_segment count for NVMET Date: Tue, 4 Apr 2017 10:16:54 -0700 Message-Id: <1491326232-11255-2-git-send-email-rkennedy@broadcom.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1491326232-11255-1-git-send-email-rkennedy@broadcom.com> References: <1491326232-11255-1-git-send-email-rkennedy@broadcom.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 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_nvme.h | 4 +--- drivers/scsi/lpfc/lpfc_nvmet.c | 2 +- drivers/scsi/lpfc/lpfc_nvmet.h | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvme.h b/drivers/scsi/lpfc/lpfc_nvme.h index 1347deb..6277796 100644 --- a/drivers/scsi/lpfc/lpfc_nvme.h +++ b/drivers/scsi/lpfc/lpfc_nvme.h @@ -21,9 +21,7 @@ * included with this package. * ********************************************************************/ -#define LPFC_NVME_MIN_SEGS 16 -#define LPFC_NVME_DEFAULT_SEGS 66 /* 256K IOs - 64 + 2 */ -#define LPFC_NVME_MAX_SEGS 510 +#define LPFC_NVME_DEFAULT_SEGS (64 + 1) /* 256K IOs */ #define LPFC_NVMET_MIN_POSTBUF 16 #define LPFC_NVMET_DEFAULT_POSTBUF 1024 #define LPFC_NVMET_MAX_POSTBUF 4096 diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c index 7ca868f..86ab95c 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.c +++ b/drivers/scsi/lpfc/lpfc_nvmet.c @@ -667,7 +667,7 @@ lpfc_nvmet_create_targetport(struct lpfc_hba *phba) pinfo.port_id = vport->fc_myDID; lpfc_tgttemplate.max_hw_queues = phba->cfg_nvme_io_channel; - lpfc_tgttemplate.max_sgl_segments = phba->cfg_sg_seg_cnt; + lpfc_tgttemplate.max_sgl_segments = phba->cfg_sg_seg_cnt + 1; lpfc_tgttemplate.target_features = NVMET_FCTGTFEAT_READDATA_RSP | NVMET_FCTGTFEAT_NEEDS_CMD_CPUSCHED; diff --git a/drivers/scsi/lpfc/lpfc_nvmet.h b/drivers/scsi/lpfc/lpfc_nvmet.h index ca96f05..0aa202c 100644 --- a/drivers/scsi/lpfc/lpfc_nvmet.h +++ b/drivers/scsi/lpfc/lpfc_nvmet.h @@ -21,9 +21,7 @@ * included with this package. * ********************************************************************/ -#define LPFC_NVMET_MIN_SEGS 16 -#define LPFC_NVMET_DEFAULT_SEGS 64 /* 256K IOs */ -#define LPFC_NVMET_MAX_SEGS 510 +#define LPFC_NVMET_DEFAULT_SEGS (64 + 1) /* 256K IOs */ #define LPFC_NVMET_SUCCESS_LEN 12 /* Used for NVME Target */