Re: Possible issue in hub.c

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

 



On Tue, Mar 22, 2011 at 06:26:42PM +0800, Xu, Andiry wrote:
> Hi,
> 
> I'm checking the latest usb-next with USB3.0 hub changes. Following code from hub_port_status() in hub.c:
> 
> 	if (*status & USB_SS_PORT_STAT_POWER)
> 		tmp |= USB_PORT_STAT_POWER;
> 
> Here the driver checks if portstatus reports USB_SS_PORT_STAT_POWER.
> 
> However, in GetPortStatus in xhci-hub.c, the driver does not report USB_SS_PORT_STAT_POWER, it reports USB_PORT_STAT_POWER instead. Note their definitions are different. So the judgment will never be true.
> 
> I think there is a legacy issue: USB3.0 spec has different wPortStatus and wPortChange definition from USB2.0 spec, but the xHCI driver uses the definitions in USB2.0 spec for a long time. Shouldn't we comply with USB3.0 specification?

Yes, the xHCI driver's hub emulation should comply with the USB 3.0
specification, but only for the USB 3.0 roothub portion.  The USB 2.0
roothub portion should still report port status like a USB 2.0 hub.
Please patch any behavior that doesn't comply with that.

> (By doing that xHCI driver can report port link state of USB3 protocol ports to the usbcore too... Currently I'm debugging an issue in which I need usbcore to know the port link state of the ports, but xHCI driver does not report it.)

Yes, the xHCI driver doesn't report link port states yet.  Patches
welcome. :)  Are you working on Link PM patches then?

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