From patchwork Sun Apr 15 14:53:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10341565 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 1B9D9603EE for ; Sun, 15 Apr 2018 14:53:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09E0827DCD for ; Sun, 15 Apr 2018 14:53:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F135528449; Sun, 15 Apr 2018 14:53:37 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 6405728445 for ; Sun, 15 Apr 2018 14:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752522AbeDOOxe (ORCPT ); Sun, 15 Apr 2018 10:53:34 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57722 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752457AbeDOOxd (ORCPT ); Sun, 15 Apr 2018 10:53:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=TOmINfBqAdCyfYu0Ct1P5dwVc4G9EYyTq9NYc0NeUSM=; b=akpLzxCaiznyA6vphJzuNtMZT Ojld+dKyoPC365BttcWzt4KMAvtC8U8H4U9oiIeOfBX89xQt4xdu8koJKS8SX+o3BMR+ukF5k+KPN KQ3wkoxonwe/azOsrt0M582hM8Lye/kYe5rrTBmyr8qMZfnTlfMJzzA8hF7SXbSI8R7331J17MOxh 3JkXI4GdU9z9qpUZpHZa1Nl1aV8inQZ6PPwkHwW8szA0fpjdDu9QwFHSUBQmpTUk+DBEjcaRqLsv7 AskG+qfEIgitBFkPqH1Qk2UHHs9J0VCJsqFMlY0jBnci3Pxz7s99wdvO/Eb6npvZYfDP9njx0BI39 5cxqLYeqg==; Received: from 089144200254.atnat0009.highway.a1.net ([89.144.200.254] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f7j23-0003zK-Tx; Sun, 15 Apr 2018 14:53:32 +0000 From: Christoph Hellwig To: stern@rowland.harvard.edu Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net, linux-scsi@vger.kernel.org Subject: [PATCH] usb-storage: stop using block layer bounce buffers Date: Sun, 15 Apr 2018 16:53:29 +0200 Message-Id: <20180415145329.855-1-hch@lst.de> X-Mailer: git-send-email 2.17.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP USB host controllers now must handle highmem, so we can get rid of bounce buffering highmem pages in the block layer. Signed-off-by: Christoph Hellwig --- drivers/usb/storage/scsiglue.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index c267f2812a04..4e453d9d45d5 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -130,15 +130,6 @@ static int slave_configure(struct scsi_device *sdev) blk_queue_max_hw_sectors(sdev->request_queue, 2048); } - /* - * Some USB host controllers can't do DMA; they have to use PIO. - * They indicate this by setting their dma_mask to NULL. For - * such controllers we need to make sure the block layer sets - * up bounce buffers in addressable memory. - */ - if (!us->pusb_dev->bus->controller->dma_mask) - blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); - /* * We can't put these settings in slave_alloc() because that gets * called before the device type is known. Consequently these