Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3699024rdb; Wed, 13 Sep 2023 22:55:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEag7gAcu+rJbPoHqnA9CfsVlNiJZqlkmmGNzCLbP9qn20mYcQ3itklmBhyBEb8V1Wbui+A X-Received: by 2002:a17:902:e808:b0:1c3:e5bf:a9fe with SMTP id u8-20020a170902e80800b001c3e5bfa9femr1233779plg.30.1694670951003; Wed, 13 Sep 2023 22:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694670950; cv=none; d=google.com; s=arc-20160816; b=gu0oxO1uixju4rErCRL3ELMEd0ZHbSPRoVPk5vCGvxYJszOfzGvVE0gyqrTHtROsar LRa0tXkByuRwZL+6ybUpmjbIlPhv479aIJzGuMDmVXOg5cPKoF1nt5NtkVvBFGIg09I7 eLIPUUqU1K1pf8CRs6ZOPvdHRWPwVO+3KyQlpgMCrA13yiCGx7dwT/8KS/m7wJpq5WE2 xo58EUDuzOpFwjno43+Xt69OYyux6zHdJ6nTQrzggGH/JG1d8B4nh3Sh+VfPZM6BjzVI 4jC0qNJyLjEX6w/BN4J3rd7zae2JpiUXt8rLK4/B51f5hXelPjH12sSU7ndyNj4nh9Pv FQEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Cmzbby868Dxn3KJn4z+gv2nUqAFsBqRifrcyzWXZLCw=; fh=lUeqPragUclany5EIpoB88gC1uB0sQSmXi3mHUEuAMs=; b=kOzp7BGqkeP80w27g7gRgFMzN8ma7DqxNlQcUAVdMYjbONkfSmjY0s3z36oGF2Gb/k UFzegILTuS3qKb1TiCE/cHts+jIY9HTBqXAlyxMh3GKo/rx0jzC5s+RaN6PIXRTQLDcA N/Mtk1fbuqHYnmDMFtn2jMy1hwdXvYzk6G0V7x9kQy+wsECB95ZmtuwoFI0EwoGUndjb YoqLPltXbIyD6R79UG7alqUz18b8b4g0MjLZzA0v1lWq8yqssXg9L+EXrydjSpjeBIGU bBEs0kxxj6Jl7E9YzSGkGmfdMFvDItpMX2fMUgKtA8v2CR8TGSh+E+ManjLDQeEWarfO a1Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fPr+ZS+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id le13-20020a170902fb0d00b001c3323ff53asi943751plb.139.2023.09.13.22.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 22:55:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fPr+ZS+S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F11AD82513AC; Wed, 13 Sep 2023 12:19:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232256AbjIMTTO (ORCPT + 99 others); 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 12:19:16 -0700 (PDT) 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