Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1586880ybi; Thu, 20 Jun 2019 00:00:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNO3bZ5qREbrEr3BdX3JIb3n2qvBAKB7bLC6kMEbaZmVXoxKbk2JrwJVNwvEYiGnor/AKZ X-Received: by 2002:a17:90a:d151:: with SMTP id t17mr1519798pjw.60.1561014029177; Thu, 20 Jun 2019 00:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561014029; cv=none; d=google.com; s=arc-20160816; b=Qmhiod+T7QYmAbEEVBUfnxuXeNikcGcK8gnhxVCXTJyqbRPbwjegeilcuky5cja0gq 47xvntgZ1jiGAcQ/FV+bpnPDyoF2fKYOsiOxAEf0vyK52RUwSbCldB5/kogKVrl2Mnkw RvDLl1SOrNKLVqMG5ahlmx6xtywY8rW8NS2KrnynxQCmjQZwnMNqUIm2agedUbbj3mqa jPQW7SsPKdObzjpfkwu8tfBUe6M5173oh6CEyONASUM+M/Roj39W0xjZe+9Hp4IAgZ1d LWm9ejtnu2E4VhDOWS40/tO2JRYEO6TZM0x5W2YsPOSAK5XkA/BqA+jC8LqYjzP/CTLF NNhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=LYwaJavZltkT0IqtHMYJOwkZx6rbcF+95m0pIfGAx5I=; b=xe3sH3VN9wTKF+SydvtI2s2UBg36fp549bVVqdL57s0NnIzza3kVFZJwnk4eetmuwO lUF0kpxDTPo+BKi46oHmCZFlbFqr7QUaChgUIrLm0RoZat9cOxDYF2KH66mJ2eE5IMyK HaG0aney0ZWMl5o1wUEennfPhRc6yBOe7j2d6VTsFq2Eocg9JX+aY18J5unxvUB+HdA3 UVsUGahRo/avFBk20ttKJOXrnVsGEFiL0U6/d4X/M9NS/5pV2cGN9HJjJ7g1o2parC10 qsN/VPRF3Ie9zN6FzcRBshRw7Y41NRpdkKATxrIkUIiZDPDLw/NwUEnGkwG8mPcWeyTA enxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=crG2lk2t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d92si18465467pld.262.2019.06.20.00.00.13; Thu, 20 Jun 2019 00:00:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=crG2lk2t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730660AbfFTG72 (ORCPT + 99 others); Thu, 20 Jun 2019 02:59:28 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:44758 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730564AbfFTG72 (ORCPT ); Thu, 20 Jun 2019 02:59:28 -0400 Received: by mail-qk1-f196.google.com with SMTP id p144so1198549qke.11 for ; Wed, 19 Jun 2019 23:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LYwaJavZltkT0IqtHMYJOwkZx6rbcF+95m0pIfGAx5I=; b=crG2lk2tlGqIP1PfPDUg8NRjFOniWeCFYI53co71jJQiK6ZCTHOFAsOC5PO3H96FzZ UnyK2Fm5vMBFlbgMVp5GvPoRdPCUEVJEjK/Oy2V/xG62FU5Dy3ro6wl2DwpVz1OaOQ36 j1afto59o+BBhHjV2YA2uyxqS1ee97MgDYlOM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LYwaJavZltkT0IqtHMYJOwkZx6rbcF+95m0pIfGAx5I=; b=kD1fFk+xQZPBykUZt0jLePpUICNeO/5SCIO0WK35IVZsqyTAxMmCO9qlWO8Q/3b2Hk 4/CjE1ApZeWUoE+gGr3F5RxXYu+aHFZRJUq1+d2twUQCd/8FS7x5SXBoQFbHyPQfs+6H Ll1vujbIlqqBYdHnmtaPg5vsZb5KyPqz/RulgXUGXit4+gepOMmBjFArksqv5Z90JqyP lz3EVxR8Br8RcvTCrUXxHgceNoE4kRY+PxJz9+110bPubH/5kb+/VEvrnXG4DYgLKGKZ YzbeJ6BhugwIaswjoB8YFGEMxoaENFLG6EXJki404Xj+lmJSDNi1u4HLmFnF+dqN9UTO K5Gg== X-Gm-Message-State: APjAAAUv46LuSdH05/zwcWuU4JgJTSqFNdyzGBh7P+Xvz0yUsusHn666 blJUxi48ujsZsr5sKDlS7elTYC/lW2sY6E2cEHbbAA== X-Received: by 2002:a37:9cc4:: with SMTP id f187mr84520479qke.23.1561013967454; Wed, 19 Jun 2019 23:59:27 -0700 (PDT) MIME-Version: 1.0 References: <20190617122000.22181-1-hch@lst.de> <20190617122000.22181-8-hch@lst.de> In-Reply-To: From: Suganath Prabu Subramani Date: Thu, 20 Jun 2019 12:34:05 +0530 Message-ID: Subject: Re: [PATCH 7/8] mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs To: Ming Lei Cc: Christoph Hellwig , "Martin K . Petersen" , Sagi Grimberg , Max Gurtovoy , Bart Van Assche , linux-rdma , Linux SCSI List , megaraidlinux.pdl@broadcom.com, PDL-MPT-FUSIONLINUX , linux-hyperv@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please consider this as Acked-by: Suganath Prabu On Tue, Jun 18, 2019 at 6:16 AM Ming Lei wrote: > > On Mon, Jun 17, 2019 at 8:21 PM Christoph Hellwig wrote: > > > > When using a virt_boundary_mask, as done for NVMe devices attached to > > mpt3sas controllers we require an unlimited max_segment_size, as the > > virt boundary merging code assumes that. But we also need to propagate > > that to the DMA mapping layer to make dma-debug happy. The SCSI layer > > takes care of that when using the per-host virt_boundary setting, but > > given that mpt3sas only wants to set the virt_boundary for actual > > NVMe devices we can't rely on that. The DMA layer maximum segment > > is global to the HBA however, so we have to set it explicitly. This > > patch assumes that mpt3sas does not have a segment size limitation, > > which seems true based on the SGL format, but will need to be verified. > > > > Signed-off-by: Christoph Hellwig > > --- > > drivers/scsi/mpt3sas/mpt3sas_scsih.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c > > index 1ccfbc7eebe0..c719b807f6d8 100644 > > --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c > > +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c > > @@ -10222,6 +10222,7 @@ static struct scsi_host_template mpt3sas_driver_template = { > > .this_id = -1, > > .sg_tablesize = MPT3SAS_SG_DEPTH, > > .max_sectors = 32767, > > + .max_segment_size = 0xffffffff, > > .max_segment_size should be aligned, either setting it here correctly or > forcing to make it aligned in scsi-core. > > Thanks, > Ming Lei