Re: [PATCH 01/10] driver core: Do not continue searching for drivers if deferred probe is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 08, 2021 at 08:44:20AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Jun 07, 2021 at 09:55:43PM -0300, Jason Gunthorpe wrote:
> > Once a driver has been matched and probe() returns with -EPROBE_DEFER the
> > device is added to a deferred list and will be retried later.
> > 
> > At this point __device_attach_driver() should stop trying other drivers as
> > we have "matched" this driver and already scheduled another probe to
> > happen later.
> > 
> > Return the -EPROBE_DEFER from really_probe() instead of squashing it to
> > zero. This is similar to the code at the top of the function which
> > directly returns -EPROBE_DEFER.
> > 
> > It is not really a bug as, AFAIK, we don't actually have cases where
> > multiple drivers can bind.
> 
> We _do_ have devices that multiple drivers can bind to.  Are you sure
> you did not just break them?

I asked Cornelia Huck who added this code if she knew who was using it
and she said she added it but never ended up using it. Can you point
at where there are multiple drivers matching the same device?

If multiple drivers are matchable what creates determinism in which
will bind?

And yes, this would break devices with multiple drivers that are using
EPROBE_DEFER to set driver bind ordering. Do you know of any place
doing that?

> Why are you needing to change this?  What is it helping?  What problem
> is this solving?

This special flow works by returning 'success' when the driver bind
actually failed. This is OK in the one call site that continues to
scan but is not OK in the other callsites that don't keep scanning and
want to see error codes.

So after the later patches this becomes quite a bit more complicated
to keep implemented as-is. Better to delete it if it is safe to delete.

Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux