Re: [RFC v2] USB: Fix handoff when BIOS disables host PCI device.

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

 



On Thu, Feb 16, 2012 at 11:15:48AM +0100, Oliver Neukum wrote:
> Am Mittwoch, 15. Februar 2012, 17:38:07 schrieb Sarah Sharp:
> > On Wed, Feb 15, 2012 at 09:48:07AM +0100, Oliver Neukum wrote:
> > > Am Dienstag, 14. Februar 2012, 21:33:11 schrieb Sarah Sharp:
> > > > Hi Oliver,
> > > > 
> > > > Have you gotten a chance to test this patch on your test system?  I'd
> > > > like to get it out, but I want to make sure it fixes your problem.
> > > 
> > > Did I forget to answer? Anyway, yes it works. However it seems a bad idea
> > > to me to unconditionally disable the device, on second thought.
> > 
> > Why?  The USB core will re-enable the device during the PCI probe, so I
> 
> Provided the device is probed. Typically of course it wii be, but
> we cannot assume that the xhci driver will always be loaded.

Sure.  That's why I want to balance the enable/disable calls in the PCI
quirks handler.  If we don't disable the PCI device, and the driver
never gets loaded, then the PCI device will remain enabled.  I'm not
sure if that's a terrible thing, but it does mean the ref count never
goes to zero.

Jesse?

> > don't see the harm in it.  What else might be accessing the PCI device?
> > Obviously the PCI core didn't care if the device was enabled or not
> > pre-probe, or it would have enabled the PCI device itself.
> 
> The BIOS might touch it. Are you really willing to say that there won't
> be BIOSes that assume that what they enabled must stay enabled?

Once the xHCI PCI quirk handler runs, we've taken the host controller
away from the BIOS with the BIOS/OS semaphore handshake.  (If the BIOS
is smart enough to actually handle that.)  Any BIOS that touches the
xHCI host controller after that point is just broken.  There is only so
much we can do about the BIOS breakage. :)

Sarah Sharp
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux