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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30BD2EE0207 for ; Wed, 13 Sep 2023 19:19:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232329AbjIMTTO (ORCPT ); Wed, 13 Sep 2023 15:19:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232321AbjIMTTJ (ORCPT ); Wed, 13 Sep 2023 15:19:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C075D170F; Wed, 13 Sep 2023 12:19:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7B82C433C7; Wed, 13 Sep 2023 19:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694632745; bh=STPt0r2LX8P4oMatOWW2VAU1UKNgpuQ1Zb3/5nSIrxQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fPr+ZS+S7Wz04A/8ZRdxf68wdQxR2LqO/5h0YNHATF+yC43xUr3o2rpXxNuPn0cQV 5AmxTvVSp8gIrjbF+SRguYy+EXqcaUSYXZRZfy4trnat+Uj2A+Wi2EEhWaPW4H8JpU BWzGrTAXUje7B83uAS+0hVOuFIWm0GG2l0rCLR8E= Date: Wed, 13 Sep 2023 21:19:01 +0200 From: Greg KH To: Randy Li Cc: linux-usb@vger.kernel.org, Linux Media Mailing List , linux-kernel@vger.kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org Subject: Re: USB: DMA: mapping existing buffer is not supported? Message-ID: <2023091323-trombone-storeroom-cbd3@gregkh> References: <1e783efe-8659-8be1-82b7-15186302e88c@soulik.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1e783efe-8659-8be1-82b7-15186302e88c@soulik.info> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Thu, Sep 14, 2023 at 03:06:58AM +0800, Randy Li wrote: > Hello > > I was trying to understand why USB webcams (UVC) have to copy video data > through the CPU (uvc_video_complete() schedules uvc_video_copy_data_work() > for this purpose). During my investigation, I noticed that functions > like|usb_sg_*() and |usb_buffer_*() are not available since kernel version > 2.6.12. What do you mean by "not available"? I see them in the tree today, why do you think they are not present? > I can comprehend that USB host controllers such as xHCI, commonly found in > embedded implementations like dwc3, do not support IOMMU. However, this > should not prevent them from operating on a contiguous buffer. Are you sure that the protocol for these devices allow this? > If the USB subsystem can no longer work with existing buffers, I propose > that we consider removing the remaining documentation in the "Working with > existing buffers" section of Documentation/driver-api/usb/dma.rst. I don't understand, what is wrong with the information there exactly? Have you tried following the suggestions there? thanks, greg k-h