Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3298161ybk; Tue, 19 May 2020 00:46:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI85k5R2Vp5c2ECX4ZyV4MJ6QIGqS7k46ZSqLGsQlQie81TSJwyKzb0PRzO8bzmjiUIoFl X-Received: by 2002:a05:6402:30b4:: with SMTP id df20mr17093661edb.158.1589874385454; Tue, 19 May 2020 00:46:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589874385; cv=none; d=google.com; s=arc-20160816; b=bRwQFjXeDBi4ThCGTvWAEsXstq5GuN4griPzODiiGLcHWSXSdj0pL82BEj+YsxS2i3 yCBAGgD/UVj3pFXicBF3cqf6BaFBgJAx0e+YCV+CKuiIge7KuZRexSfg4nThKMRbqKNI io/n86av3LzhbAVbD/k7mpvjrIhFGURmoJM/eK0PReH7XlSV9ZrrZMjgHsVzTyiA6ooF NxVnshbrcksJJEcYslsFEAuu0PijGwqSO0RmZG8FXAsslNNWyZfqlVyIKgMvafeQnQ/p tDXcfdLneTskiqZVIrSzDcnxkCwv9JMcU9AlD8X7Sa28t2BT7KH2FvFfh+wdP1e0VBCl vP9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=kJJjkIuv8x+41eY4+FcF+yki+nDC+q/edCCOk3lrDyI=; b=YLt+klbat2KZsgNrS1hi1Qq3kRDQ/VSgefxngGBBT7aP3bVW6e3Xxi9/LSPHZcqCmY mpw6yDQMMmr17nJkzZ6zSEly9G/9t6t7yXaa9S2xmzF3l2OVkmxSA/k4obhji8XIEyjZ ISe/Nj/V6fil0JzpJTX9roznNfCinljuSifQiQ5j2pbKAXsoXyGIj42WW/OV6pqlrcGz 8ncl4s+Rh8d117mHv9vW9ICxw7HUHFGnXW126T8qHOsrS+6SfbMAOtN0eHHAvoZleKRU 7WkK1uOUfP2dmrTB5rMCBoJzaAFE3spPLAd2EHwzyQ9mEALl3xByvJ4JV3gAVd835PYu zcbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cz23si5765672edb.102.2020.05.19.00.46.02; Tue, 19 May 2020 00:46:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728475AbgESHog (ORCPT + 99 others); Tue, 19 May 2020 03:44:36 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:59159 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725996AbgESHof (ORCPT ); Tue, 19 May 2020 03:44:35 -0400 Received: from mail-qv1-f49.google.com ([209.85.219.49]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MxUfn-1iqQ1I28BV-00xpvI; Tue, 19 May 2020 09:44:33 +0200 Received: by mail-qv1-f49.google.com with SMTP id ee19so6026496qvb.11; Tue, 19 May 2020 00:44:33 -0700 (PDT) X-Gm-Message-State: AOAM5305roy0Im1kbKAcS3unXyHZyJjp2IEZtTDOA+JJId05teJPiZMH 8FCzBJLnkMeimGWzbpT+fnMiwvFqPzXygRa+QE8= X-Received: by 2002:a05:6214:905:: with SMTP id dj5mr19849870qvb.222.1589874272193; Tue, 19 May 2020 00:44:32 -0700 (PDT) MIME-Version: 1.0 References: <20200506060025.1535960-1-vkoul@kernel.org> <20200506060025.1535960-4-vkoul@kernel.org> <20200518195719.GG374218@vkoul-mobl.Dlink> <20200519045336.GH374218@vkoul-mobl.Dlink> In-Reply-To: <20200519045336.GH374218@vkoul-mobl.Dlink> From: Arnd Bergmann Date: Tue, 19 May 2020 09:44:15 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v13 3/5] usb: xhci: Add support for Renesas controller with memory To: Vinod Koul Cc: Anders Roxell , Mathias Nyman , Greg Kroah-Hartman , linux-arm-msm , Bjorn Andersson , Yoshihiro Shimoda , Christian Lamparter , John Stultz , Alan Stern , =?UTF-8?Q?Andreas_B=C3=B6hler?= , USB list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:zg0WXCVgxaVauGkuk7NHqfGuaMZjVr8VtN21yfQvU6wlcgxAYoU IrDb3X/O+40U3VdeTv3sh7aqhR/5eWFkq2zhVJ4NSQubgHOU76OW+J5SV/CNu/YozRYh5/y 3XFgY019wLB8saSTq91MFpaaFcdUvm6658zHcNkJ9MxNszyv9yQj8EKm2xmUlc5ZOO1Ul33 f+/FGSLwOZPT1ikA50j3g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gGlDoxcaACU=:hlVk4p4DmAe196w/U7j8KH yks9CwDyLD9LbQpwylQYN3/whOLiuI5lvXI1DphTcuSFrxYcRVxcdOpnFUCxT/6sgxVazQiI+ YraDuYxXyc8Dsd0dsp3SBNsOkGM/tjpuvRsNjbRCQZHyfo5snf+P5Jp/6lcJsu5+jQy9/9v9x DX4c5UV/YIN1SgoymEid8FT9SZ62ibc9jfeaBh9LguqXhgeUVToxxGH6dXMwnAm7OwtwcS7Wf GitnTL9yNlluAlDCUktIUbIyEQfYO2sggqj6YOhtDUpK0/I1F06BO6piSn7IJXm+NCxrSegmE oOmebHMlLpJ0anf8vflLehi8zriBTrcpzchxUjItULzZeeRcIVZb/BV/m3VQmpX8CmQ2TfNxN Z8GS30iCbwk5c3VjMKZlPSH1nSaHug7Vk+X88ce3UL1A7jKNZJJFWDQJwc6atvxf6W5SUN0Ee EiBTriOYGWPhJN1lLCt6qJRR3DXxoANu2r/WUVwjIp887GcKyBHAVLkk2V75CDfofFC/OTUgS cUGgRTkpGXdiX6yeN83nu1lRsNGQLyQRihDFjglaes3Fw159feulBWO77+xDTQqmEKlZTvNw+ 5lJ/FA4bhQT/hJ1gS5/sy+W1KCnOTJU/kweEDGvmdsmrWxkT901R7D1+rxLs9KB5yBD3MGY3h QTMWjg4+6q/nxD0cbP0N9RL5ZQ80CZ3YXITeuoWDr+IVpQnIw/fVimagkfw93xEpsUL/V3MKV 5yTt2k/qZwAfVNwVR37u1fiP2Dv49hI7DfHuOLUZUrt/L/3nAsYV7rHnysHTmX8I0/8tVm9zq ahxGreNWNEmY13jCSA5V5KSy001DCw4xx23EAQKnF1C6PuZSwU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 6:53 AM Vinod Koul wrote: > On 19-05-20, 00:37, Anders Roxell wrote: > > On Mon, 18 May 2020 at 21:57, Vinod Koul wrote: > > > On 18-05-20, 19:53, Anders Roxell wrote: > > > > On Wed, 6 May 2020 at 08:01, Vinod Koul wrote: > > > > > > > > > > Some rensas controller like uPD720201 and uPD720202 need firmware to be > > > > > loaded. Add these devices in pci table and invoke renesas firmware loader > > > > > functions to check and load the firmware into device memory when > > > > > required. > > > > > > > > > > Signed-off-by: Vinod Koul > > > > > > > > Hi, I got a build error when I built an arm64 allmodconfig kernel. > > > > > > Thanks for this. This is happening as we have default y for USB_XHCI_PCI > > > and then we make USB_XHCI_PCI_RENESAS=m. That should be not allowed as > > > we export as symbol so both can be inbuilt or modules but USB_XHCI_PCI=y > > > and USB_XHCI_PCI_RENESAS=m cant. While it is valid that USB_XHCI_PCI=y|m > > > and USB_XHCI_PCI_RENESAS=n > > > > > > So this seems to get fixed by below for me. I have tested with > > > - both y and m (easy) > > > - make USB_XHCI_PCI_RENESAS=n, USB_XHCI_PCI=y|m works > > > - try making USB_XHCI_PCI=y and USB_XHCI_PCI_RENESAS=m, then > > > USB_XHCI_PCI=m by kbuild :) > > > - try making USB_XHCI_PCI=m and USB_XHCI_PCI_RENESAS=y, kbuild gives > > > error prompt that it will be m due to depends > > > > > > Thanks to all the fixes done by Arnd which pointed me to this. Pls > > > verify > > > > I was able to build an arm64 allmodconfig kernel with this change. > > I will send the formal patch and add your name in reported and > tested. Thanks for the quick verification I just checked the patch and I think this will work correctly in all cases, but it still seems a bit backwards: > > > diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig > > > index b5c542d6a1c5..92783d175b3f 100644 > > > --- a/drivers/usb/host/Kconfig > > > +++ b/drivers/usb/host/Kconfig > > > @@ -40,11 +40,11 @@ config USB_XHCI_DBGCAP > > > config USB_XHCI_PCI > > > tristate > > > depends on USB_PCI > > > + depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS > > > default y > > > > > > config USB_XHCI_PCI_RENESAS > > > tristate "Support for additional Renesas xHCI controller with firwmare" > > > - depends on USB_XHCI_PCI > > > ---help--- > > > Say 'Y' to enable the support for the Renesas xHCI controller with > > > firwmare. Make sure you have the firwmare for the device and > > > I think it would have been better to follow the normal driver abstraction here and make the renesas xhci a specialized version of the xhci driver with its own platform_driver instance that calls into the generic xhci_pci module, rather than having the generic code treat it as a quirk. That would be more like how we handle all the ehci and ohci variants, though I'm not sure how exactly it would work with two drivers having pci_device_id tables with non-exclusive members. Presumably the generic driver would still have to know that it needs to fail its probe() function on devices that need the firmware. Arnd