From patchwork Tue Oct 20 20:27:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 287100 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 08B9CC54FB2 for ; Tue, 20 Oct 2020 20:27:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F82C2225D for ; Tue, 20 Oct 2020 20:27:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="hhEsgYwx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438482AbgJTU1f (ORCPT ); Tue, 20 Oct 2020 16:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438446AbgJTU1f (ORCPT ); Tue, 20 Oct 2020 16:27:35 -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 2279FC0613CE for ; Tue, 20 Oct 2020 13:27:35 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id t14so58320pgg.1 for ; Tue, 20 Oct 2020 13:27:35 -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 :mime-version; bh=SWAoL3y/nIYTS+7Oz19qc+RqAeJctl7s60ElHegbSEU=; b=hhEsgYwxvbGJdQpVmhKSYzrtnc1D6rdneRroqSPUYCbrrIWVdTMxlbygt+PXyjLHIA PXicr0wQdUHf6Vuze4wdJ+itcY7dyARNErYSIQ8HM+LVn0pbgjkJDZzEHpL4kV00VYp4 1phlAnw9rQDV5shejkFL3iMs7wQ0lx9hsnxQE= 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:mime-version; bh=SWAoL3y/nIYTS+7Oz19qc+RqAeJctl7s60ElHegbSEU=; b=cBpvJyi/t+Yyy6AupHYiEhsPJa045wuOZVYLZIxIhdk1bUvx/l1gh/fZWMFp3uYydz RQFWTJtpFeIFcfKWOq9vvYmUbc2OPu6vbo6eUsvAjbS62xUfUD1vNwsefUahovvog6r5 WmYFhOFocTRKvfWA0j+iSVY2mX2D8lBeq6ZVbDEelw+Gs9nT1OepK2B1bLrlsIwy9zUP NdHDq+YKW5HHQOVjqe9kW6A/xTT7zj7ZOb4pcQsEMJPuBYMbGMVrMIiqCJCrqVkD5j11 sqt82Zei/U92BVXR9rJ7dzVOdiFt4pf9PB9kCAuEIUCV0SWxsCo+lZbgbMIzC7rUnZS8 kM8A== X-Gm-Message-State: AOAM533vQ897eYJSDvxhf743I+41Ncws4y0dPg76a7ygmgi1GavPbJiK 3m7fl5B7tZngvJalDnREs4tWYydsl/+ikDctESGlpjELJMyC9TahHU9kylAJDQdgHrLfepRfi9O IZY4qLxUO55sLbkwcvID0GNvMlT8vYrMlTTK+wQ5I/LzARdD6h1YIDC898JuN83AL2IwC35JD1b yCOiQ= X-Google-Smtp-Source: ABdhPJx0ao9sUjnsvKgquPJBgvoSpWRveiHmk14KTffelk4WMclEtK6IOwU20wUwm5FZji5yanI7xA== X-Received: by 2002:a63:c55:: with SMTP id 21mr77618pgm.392.1603225654082; Tue, 20 Oct 2020 13:27:34 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id b16sm2871404pfp.195.2020.10.20.13.27.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 13:27:33 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: James Smart Subject: [PATCH 6/9] lpfc: Enlarge max_sectors in scsi templates Date: Tue, 20 Oct 2020 13:27:16 -0700 Message-Id: <20201020202719.54726-7-james.smart@broadcom.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201020202719.54726-1-james.smart@broadcom.com> References: <20201020202719.54726-1-james.smart@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The driver supports arbitrarily large sgl lists and the current value for max_sectors is limiting. Change the max_sectors value to the largest value. This was actually done prior but it only corrected one template and that template was later removed. So change the remaining 2 templates. Other areas which hard-set the sectors value should be inheriting what is in the template. Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc_init.c | 5 +---- drivers/scsi/lpfc/lpfc_scsi.c | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 40fe889033d4..d2c172348065 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4343,16 +4343,13 @@ lpfc_create_port(struct lpfc_hba *phba, int instance, struct device *dev) /* Seed physical port template */ memcpy(template, &lpfc_template, sizeof(*template)); - if (use_no_reset_hba) { + if (use_no_reset_hba) /* template is for a no reset SCSI Host */ - template->max_sectors = 0xffff; template->eh_host_reset_handler = NULL; - } /* Template for all vports this physical port creates */ memcpy(&phba->vport_template, &lpfc_template, sizeof(*template)); - phba->vport_template.max_sectors = 0xffff; phba->vport_template.shost_attrs = lpfc_vport_attrs; phba->vport_template.eh_bus_reset_handler = NULL; phba->vport_template.eh_host_reset_handler = NULL; diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 5e802c8b22a9..87f481b14d83 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c @@ -6029,7 +6029,7 @@ struct scsi_host_template lpfc_template_nvme = { .sg_tablesize = 1, .cmd_per_lun = 1, .shost_attrs = lpfc_hba_attrs, - .max_sectors = 0xFFFF, + .max_sectors = 0xFFFFFFFF, .vendor_id = LPFC_NL_VENDOR_ID, .track_queue_depth = 0, }; @@ -6054,7 +6054,7 @@ struct scsi_host_template lpfc_template = { .sg_tablesize = LPFC_DEFAULT_SG_SEG_CNT, .cmd_per_lun = LPFC_CMD_PER_LUN, .shost_attrs = lpfc_hba_attrs, - .max_sectors = 0xFFFF, + .max_sectors = 0xFFFFFFFF, .vendor_id = LPFC_NL_VENDOR_ID, .change_queue_depth = scsi_change_queue_depth, .track_queue_depth = 1,