From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 102A7C43461 for ; Mon, 14 Sep 2020 07:53:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E6A520829 for ; Mon, 14 Sep 2020 07:52:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uD/cQUVP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="MUh+xMZ+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E6A520829 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cUuGS5HfbMp6eUQpCeEk5yrtMgPm7OlGDZw7dJezZvw=; b=uD/cQUVPDpYcyBWDzOW4sR53h +dxRjd/U0WkMu4lSl1MWEVk7xj3ElN9r9jjowIK1ebv2d0CK0Z4lpn+EVnv4PvGiF6FtI6maP1x7e Y5QVT0JVaBFSU/iKv0yERnCIcwCcWKDqEJl1bCPRXuNg3aoZt0C5bDZDLAyJuLplw5NYXtu2WaoVc 0WQAa3vdqOy83V/Nb+CIMDdQnXAQCfWQSppdOH5WPHBWVFLp6cq8s+Rf6KPuOpEoUjLVOa4iafEH2 1APE2PuEEUywUqicNjg78MQaOD/EfOmp1JUFEW5ae15qb6CaD6G0b5l1u4kNJhFBB6lsPd+RqgSWx I41D+lZXQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHjH8-0004aM-8H; Mon, 14 Sep 2020 07:51:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kHjH5-0004Ys-6s for linux-arm-kernel@lists.infradead.org; Mon, 14 Sep 2020 07:51:44 +0000 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CC8C720829; Mon, 14 Sep 2020 07:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600069900; bh=sLEmFEgLgQ6VIFDmYtTYiby9H19HNBdE2pb0auPAfNs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MUh+xMZ+3cK9OUG8yLvWphyyGhj7Or4v1gE0rD6UnExgdRYqIRszoy75p+Ht77soV dBzl7yjyDdoIBZvIAv/a8hHLpP7ud29rOK5ermxXFAxrIPMqc1KVs5mSVKaY1fISmm jyLnRqaaow9iBmMY+4C7qFm71KH/+bqz89eLJRHQ= Date: Mon, 14 Sep 2020 09:51:40 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig Subject: Re: [PATCH 5/6] usb: don't inherity DMA properties for USB devices Message-ID: <20200914075140.GA1033580@kroah.com> References: <20200914073343.1579578-1-hch@lst.de> <20200914073343.1579578-6-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200914073343.1579578-6-hch@lst.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200914_035143_325874_CAE62034 X-CRM114-Status: GOOD ( 17.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben-Cohen , devicetree@vger.kernel.org, Florian Fainelli , linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, linux-pci@vger.kernel.org, Frank Rowand , linux-usb@vger.kernel.org, linux-remoteproc@vger.kernel.org, Russell King , Bjorn Andersson , linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , Jim Quinlan , Santosh Shilimkar , Nathan Chancellor , Robin Murphy , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 14, 2020 at 09:33:42AM +0200, Christoph Hellwig wrote: > As the comment in usb_alloc_dev correctly states, drivers can't use > the DMA API on usb device, and at least calling dma_set_mask on them > is highly dangerous. Unlike what the comment states upper level drivers > also can't really use the presence of a dma mask to check for DMA > support, as the dma_mask is set by default for most busses. > > Setting the dma_mask comes from "[PATCH] usbcore dma updates (and doc)" > in BitKeeper times, as it seems like it was primarily for setting the > NETIF_F_HIGHDMA flag in USB drivers, something that has long been > fixed up since. > > Setting the dma_pfn_offset comes from commit b44bbc46a8bb > ("usb: core: setup dma_pfn_offset for USB devices and, interfaces"), > which worked around the fact that the scsi_calculate_bounce_limits > functions wasn't going through the proper driver interface to query > DMA information, but that function was removed in commit 21e07dba9fb1 > ("scsi: reduce use of block bounce buffers") years ago. > > Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel