Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2979376ybi; Mon, 17 Jun 2019 13:58:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx79v8AvJkaOZQ54mCHr6EI/SqBuNcdAael1hbLv07oi4HW8wwhbWczbl+O7fAarkv3YLN9 X-Received: by 2002:a17:90a:3590:: with SMTP id r16mr1044706pjb.44.1560805129547; Mon, 17 Jun 2019 13:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560805129; cv=none; d=google.com; s=arc-20160816; b=eI/PY9MJpHNcH1biumgM08DU47rbL769O9mhV13TkI7Gxfr1fs6szM4nFSJVDRppVu X0yvnbh5k4IQBjsKo9tih+DWDgpCYxgul7nvIqOqHp48dLyTPzIo87klLhHowyzd//Ez 9WohBBQNE4N4YrDV6yJbrqa5yAM6yY88NkSRAccoexAYi49S1BYrzYkwRMB+LWE9txaJ A1D8rJpZSHps+3nSSeatbVwudN4i8jhgJ5+CCheoEq+O8CnAjlr3tsfPxjOmH+NYFmTT NX1VbC+HCkkCAy6gQ/gtuNyEgMzf+taCL+12ss7fODkRMxG5p1yLtCH/bxEGnN8d54sH M08g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=3asWb+msWGw1j4yltc/+ryybgDy37jdG08DZDWZ/paI=; b=d0JpLmDRTA00rEqSgoKjcVkqIylB1hlSkXHFQOkLoX4zU/jC9XHpUwloIjgnUnzWus dyNDeo8WTPPZcgucKccMFCys2yjgwo/20Is1ECLoVlME/ZMSy6/LnFSTXxKp9XIGoqy4 zwtyv0Jgkq1U0ho4doihY3rOR4VmaaOBrLnMiwAeAGb6VMO5h41lHj8T1prfW1Kl57D2 wc7mmBwuULc5MaEAmr0F41J30FBGYN2uT8FKaAScaCStVqm+44Gcn3DdpHREckdADvJm yFk0sMc1tJsOwqObtdzqR/N/oOnfpFgp0YCrTXSKjrBQIhbQ0wX1bTiAa2nK16AXKwN+ Wpsw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q7si11359983pgp.245.2019.06.17.13.58.33; Mon, 17 Jun 2019 13:58:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbfFQU6X (ORCPT + 99 others); Mon, 17 Jun 2019 16:58:23 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:42735 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfFQU6W (ORCPT ); Mon, 17 Jun 2019 16:58:22 -0400 Received: by mail-pl1-f193.google.com with SMTP id ay6so2424720plb.9; Mon, 17 Jun 2019 13:58:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=3asWb+msWGw1j4yltc/+ryybgDy37jdG08DZDWZ/paI=; b=GZKyD2ZHLy6Xi3PsfKL4Dr0a+N2l7TskzzR2voktGQc/sFCoNiwEdHUf1VndDNgEP6 g+DJ4Bn/UWM3hF5SyxQuc8Lfk9e6Yz7Mxu+9g1YTNqs646VupW0u9YjiV+waE3eh8fC8 VNE8gAV8721ZUt1S4oWGeXPuys/moeJXWGDbE2o/+5wz/oyA6DOTv3WGfM/vA+DaR50b dUqfMLJ/7A221vPuK4S7uIXvEVA85+vGwB9BUSh431xCXZvGajKU4ZJMzJF4h0lIM1cn CrdJYDS/sozRkYWzXfqU+40DKGIXl1+hcGvu8CmjoXtDDqxSgYOWrui9Qrr3z+xmkaDo zqKg== X-Gm-Message-State: APjAAAWxqQyi8c5KwYKSogZs3hHdFY40EWQt7UsCzc9XwkT7EELi/SPp 7Y5tBqxE/POHo4NC2jqjlXoA6WNv2zM= X-Received: by 2002:a17:902:b609:: with SMTP id b9mr30920714pls.8.1560805101145; Mon, 17 Jun 2019 13:58:21 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:202:4308:52a3:24b6:2c60]) by smtp.gmail.com with ESMTPSA id s66sm14614231pgs.87.2019.06.17.13.58.19 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 13:58:20 -0700 (PDT) Subject: Re: [PATCH 3/8] ufshcd: set max_segment_size in the scsi host template To: Christoph Hellwig , "Martin K . Petersen" Cc: Sagi Grimberg , Max Gurtovoy , linux-rdma@vger.kernel.org, linux-scsi@vger.kernel.org, megaraidlinux.pdl@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190617122000.22181-1-hch@lst.de> <20190617122000.22181-4-hch@lst.de> From: Bart Van Assche Message-ID: <9afbf4d9-3a15-bfb4-bf5c-64a1c224cc2c@acm.org> Date: Mon, 17 Jun 2019 13:58:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190617122000.22181-4-hch@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/17/19 5:19 AM, Christoph Hellwig wrote: > We need to also mirror the value to the device to ensure IOMMU merging > doesn't undo it, and the SCSI host level parameter will ensure that. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/ufs/ufshcd.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c > index 3fe3029617a8..505d625ed28d 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -4587,8 +4587,6 @@ static int ufshcd_slave_configure(struct scsi_device *sdev) > struct request_queue *q = sdev->request_queue; > > blk_queue_update_dma_pad(q, PRDT_DATA_BYTE_COUNT_PAD - 1); > - blk_queue_max_segment_size(q, PRDT_DATA_BYTE_COUNT_MAX); > - > return 0; > } > > @@ -6991,6 +6989,7 @@ static struct scsi_host_template ufshcd_driver_template = { > .sg_tablesize = SG_ALL, > .cmd_per_lun = UFSHCD_CMD_PER_LUN, > .can_queue = UFSHCD_CAN_QUEUE, > + .max_segment_size = PRDT_DATA_BYTE_COUNT_MAX, > .max_host_blocked = 1, > .track_queue_depth = 1, > .sdev_groups = ufshcd_driver_groups, Reviewed-by: Bart Van Assche