Re: [PATCH] Usbcore: Do not disable USB3 protocol ports in hub_activate

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

 



On Thu, 4 Mar 2010, Andiry Xu wrote:

> Thanks for the comments. I don't know how external USB3.0 hub behaves
> since I don't have one, but the xHC root hub contains both USB2 and USB3
> protocol ports.

The behavior of external hubs is defined in the USB-3.0 spec.  They 
register as two separate devices, once on the SuperSpeed bus and once 
on the high-speed bus.

> I only need to apply to the USB3 ports in the root hub.
> In this case should I give a test for the hub rather than the port?
> 
> I didn't notice (1 << USB_PORT_FEAT_SUPERSPEED) is equal to
> USB_PORT_STAT_TEST, thanks for the remind. But I just need a flag here.

Making up your own flag often is not a good idea.  You could do it, but 
that just makes things more difficult for the hub driver -- it will 
have to treat USB-3.0 root hubs differently from USB-3.0 external hubs.

> Can we just use a workaround here? re-define USB_PORT_FEAT_SUPERSPEED to
> make no conflict and I'll refine the patch with FIXME and proper comment
> in code. When there is better solution we can remove it. We need this
> workaround because without the patch, if xHCI bus suspend/resume is
> implemented, even if you do nothing in them, the USB3.0 device will fail
> to be recognized. That sounds like a critical issue.

If you insist on a temporary workaround, then you'll have to do
something like this.  Define USB_PORT_STAT_SUPERSPEED somehow (don't
call it a feature -- it's a status, not a feature) and add:

	If this is a USB-3.0 hub then:
		If it's not a root hub or if USB_PORT_STAT_SUPERSPEED
		is set then skip the disable

Fair warning: I intend to submit a patch in the near future which will 
remove USB_PORT_FEAT_HIGHSPEED and USB_PORT_FEAT_SUPERSPEED.  There 
really shouldn't be a USB_PORT_FEAT_LOWSPEED either, but that one _is_ 
defined in the spec (although it's not mentioned anywhere except to say 
that host software shall never use it).

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