Re: [PATCH 05/18] xhci: Stop kicking khubd until roothub is registered.

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

 



On Tue, 21 Jul 2009, Sarah Sharp wrote:

> There is a FIXME note in usb_kick_khubd() that it may have problems if the hub
> isn't bound to the hub driver yet.  Since the xHCI hardware can send a port
> status change event as soon as the interrupts are turned on, there is a race
> condition between registering khubd and the xHCI host controller driver.

It should be obvious that this same reasoning applies to other host
controller drivers too, not just xHCI.  How do they solve it?

Answer: They don't.  The race condition is already resolved for you by
usbcore, in the very first line of usb_hcd_poll_rh_status.

Besides, why do you think that usb_kick_khubd() is relevant here?  It 
doesn't get used anywhere on the pathway changed by the patch.

> Solve this by ignoring port status change events until after khubd polls the
> port status bits for the first time.  khubd should notice any changes from
> previous events at that time.

This change isn't needed.

Alan Stern

--
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