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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 99F54C433E0 for ; Fri, 5 Feb 2021 13:02:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F5E064FBC for ; Fri, 5 Feb 2021 13:02:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232452AbhBENBQ (ORCPT ); Fri, 5 Feb 2021 08:01:16 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:50262 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232401AbhBEMyM (ORCPT ); Fri, 5 Feb 2021 07:54:12 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1l80bx-004N5I-SV; Fri, 05 Feb 2021 13:53:21 +0100 Date: Fri, 5 Feb 2021 13:53:21 +0100 From: Andrew Lunn To: Hans Verkuil Cc: Takashi Iwai , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Matwey V. Kornilov" , Robert Foss Subject: Re: [PATCH] media: pwc: Fix the URB buffer allocation Message-ID: References: <20210121202855.17400-1-tiwai@suse.de> <7afd0612-de36-60b1-6650-6f8de24a7145@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7afd0612-de36-60b1-6650-6f8de24a7145@xs4all.nl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2021 at 01:36:43PM +0100, Hans Verkuil wrote: > Hi Takashi, > > Thank you for this patch, but it clashes with another patch trying to do the same thing > that has already been merged in our tree: > > https://patchwork.linuxtv.org/project/linux-media/patch/20210104170007.20625-1-matwey@sai.msu.ru/ > > I do prefer your patch over the one already merged since it is a bit simpler, but > shouldn't the calls to dma_sync_single_for_cpu() and dma_sync_single_for_device() > in pwc-if.c also use urb->dev->bus->controller? > > Also, Matwey's patch uses urb->dev->bus->sysdev instead of urb->dev->bus->controller. > How does 'sysdev' relate to 'controller'? I think 'controller' is the right device to > use, but either seems to work when I test it with my pwc webcam. Hi Hans A quick grep in driver/usb show that all but one dma mapping operation use sysdev. The one other case uses controller. So the numbers suggest controller is wrong, sysdev is correct. But maybe ask GregKH? Andrew