[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200312065636.GX4885@vkoul-mobl>
Date: Thu, 12 Mar 2020 12:26:36 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Mathias Nyman <mathias.nyman@...ux.intel.com>
Cc: Christian Lamparter <chunkeey@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
John Stultz <john.stultz@...aro.org>,
Mathias Nyman <mathias.nyman@...el.com>,
linux-arm-msm@...r.kernel.org,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
USB list <linux-usb@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alan Stern <stern@...land.harvard.edu>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Subject: Re: [PATCH v6 0/5] usb: xhci: Add support for Renesas USB controllers
On 04-02-20, 18:33, Mathias Nyman wrote:
> > >
> > > There are a few other opens regarding this series. Mostly because I'm not (yet)
> > > familiar with all the details, so I'll just just list them here.
> > >
> > > - Is it really enough to add the Renesas driver to Makefile before xhci-pci
> > > driver to make sure it gets matched and probed based on vendor/device id
> > > before xhci-pci driver is matched and probed based on pci class?
> > > What if the Renesas driver is a module and xhci-pci compiled in?
> >
> > The driver loading rules are based on level and makefile order. So
> > renesas will always be loaded before xhci driver. This is required since
> > xhci claims all devices, so we need to make sure it loads before.
> >
> > I think we should make it inbuilt driver rather than a module. xhci
> > driver is only inbuilt.
> >
> > If there is a better way to handle this, am all for it.
> >
> > > - Previously probe didn't return before hcd's were added and everything set up.
> > > Now with request_firmware_nowait() probe returns early successfully, and the
> > > old xhci_pci_probe() which sets up everything is called later by the request
> > > firmware callback. So there could be whole new set of races possible.
> > > For example pci remove can be called mid firmware loading, or when the old
> > > xhci_pci_probe is still setting up things.
> >
> > I think this is a valid concern. Let me think about how to solve this..
> > maybe add a flag in remove which ensure remove doesnt run untill the
> > probe/firmware callback is completed.
>
> How about initiating async firmware loading before probe is called by using
> DECLARE_PCI_FIXUP_*() hooks?
Well somehow that does not work :(
I tried using DECLARE_PCI_FIXUP_FINAL hook to request the firmware.
Doing so from probe works but from fixup fails always!
So expect this one, I have done the rest of the changes requested, will
send them over soon
Thanks
--
~Vinod
Powered by blists - more mailing lists