Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2462130ybi; Mon, 17 Jun 2019 05:21:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwBbFoO5lpucsuCM+oDdAii+cJsRflaSV4R/ICqgmS6BA/8kHMFWfAuQagG5kAz+rSNipGy X-Received: by 2002:a63:e502:: with SMTP id r2mr20464189pgh.261.1560774067733; Mon, 17 Jun 2019 05:21:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560774067; cv=none; d=google.com; s=arc-20160816; b=d3fM0jq6F2vuMSzoJY/zr5aNg8srw4qSjmdbLZ9GZYydnVlOu3LrSzj3ucw2iV8yf9 DUqRapIH9ajkaCq78YQQOFmyNhd8t44jl9T+D+CBpUeJFf0wYrVXzbEniMeMCgy8lCsG eyGbrCX2Rdk8qPkQ4yef6yRZRkcVt3egP7i5xz8GCG3+TqSxPLtdGzkgG/HurE9L0zLj /XSejMXH2UzXmBPQ0z1Q5FZvX59NWZ7UUURdqlIjSl7MlkfRcEMoXKZ9f0A85gfIHqNs +9EtmFFIAwLhqsUfCNiltPH3ZBylfSGdeGQOQ5JHBb1KgplJCdkCMdBa/LmwQXmIkz8n OT5A== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tcdrMn143Ts78QpGHmQeJDKDdB3ysuM20BTYoXIK2ys=; b=g9DAMAZCe7kCUFNHuDQYkSuF+MrYAuXDSbeKCUjaTLcO3KYUyurpfnZFXtx2xdD0qZ q0XZk41eA+IzqTjQzu+pVuaRWxxnCn7cl+0i7jsYzGoxMVKQ6VO1h4qRmp/JpNvkJ57/ 2vCAG9sM3ZWPk8/u5IKu2xTWisagpabQ081RA9ox4U3uQ/fMPyijQ/vj7dEBO4abHAfH 211QGsi1h25GFvtMEaZPz0RpRlr6djDVJ2OWMBR6lYkJfu9uqEN2QybD+rrHiV94cHYt hTlI/fzzEWEdvmKQP0AeepWwzU2KoOpBPNiZo5D/XLsXvAO/mI1lTgs7zeiYDlpWbAao N1GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WbZMNH56; 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 u5si1506834pgi.218.2019.06.17.05.20.52; Mon, 17 Jun 2019 05:21:07 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=WbZMNH56; 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 S1727529AbfFQMUT (ORCPT + 99 others); Mon, 17 Jun 2019 08:20:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:59198 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727428AbfFQMUQ (ORCPT ); Mon, 17 Jun 2019 08:20:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tcdrMn143Ts78QpGHmQeJDKDdB3ysuM20BTYoXIK2ys=; b=WbZMNH56ewuVfs/dzNTmQLvHdi zfK3X8Cyjf8E7/DCsud9mKrqUTseRKQ8JgwzZ56tGuR+LwIbVBhrWgPE3QB3n/Ux9IKKDjhoGleOG bil9Fs7KWBtBNEMV6EaA8p91CTmUj0EcQPjLdNApAaYGfZXJ2HZYb8EkqsEDtrkS3ZSk4LrO3zvt0 iTw0b8Qx+8GG9pYGVAfHcRAagg1hy5DUVIFwo5d+01Jek6vJN6tV8x3OeNoBhIUQIwIEJjhwMlxi2 JoazszsoqQx//nwLhMvzSGkbyKx3/mag8wD9rAMv4sUFqv/cI2w+ro81ba1ll3Ef+n/PcI6SD7G+d k9uZsq4w==; Received: from clnet-p19-102.ikbnet.co.at ([83.175.77.102] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hcqcN-0004fd-4P; Mon, 17 Jun 2019 12:20:11 +0000 From: Christoph Hellwig To: "Martin K . Petersen" Cc: Sagi Grimberg , Max Gurtovoy , Bart Van Assche , 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 Subject: [PATCH 3/8] ufshcd: set max_segment_size in the scsi host template Date: Mon, 17 Jun 2019 14:19:55 +0200 Message-Id: <20190617122000.22181-4-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190617122000.22181-1-hch@lst.de> References: <20190617122000.22181-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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, -- 2.20.1