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.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2E55BC433E0 for ; Fri, 5 Feb 2021 13:46:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D6E6D64FBF for ; Fri, 5 Feb 2021 13:46:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbhBENpx (ORCPT ); Fri, 5 Feb 2021 08:45:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:47362 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231261AbhBENnF (ORCPT ); Fri, 5 Feb 2021 08:43:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BCC0CACAC; Fri, 5 Feb 2021 13:42:23 +0000 (UTC) Date: Fri, 05 Feb 2021 14:42:23 +0100 Message-ID: From: Takashi Iwai To: Andrew Lunn Cc: Hans Verkuil , 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 In-Reply-To: References: <20210121202855.17400-1-tiwai@suse.de> <7afd0612-de36-60b1-6650-6f8de24a7145@xs4all.nl> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 05 Feb 2021 14:13:02 +0100, Andrew Lunn wrote: > > Hi Takashi > > > Indeed, looks so. In most cases, this doesn't matter since both point > > to the same device object. In some cases like xhci-plat HCD, they > > differ. And sysdev might be a better choice from the consistency > > POV. > > > > But this brought an interesting question, too. eg. USB chipidea > > HCD uses platform devices for both controller and sysdev, and I > > couldn't find any DMA mask setup. So, no matter what to use, the uwc > > driver would be broken on this... Maybe it's just not covered. > > Did you do a git bisect to see what actually broke it? "1161db6776bd: > media: usb: pwc: Don't use coherent DMA buffers for ISO transfer" > introduced the code, not the regression. If we understand the > regression, that might give us the answer about chipidea. It's the recent DMA core change, the commit f959dcd6ddfd ("dma-direct: Fix potential NULL pointer dereference"). But basically it's a right fix, and the driver hitting this "regression" has been already broken but casually worked without setting a proper DMA mask. Takashi