On Fri, 7 Dec 2012, Sarah Sharp wrote: > On Wed, Dec 05, 2012 at 12:14:07PM -0500, Alan Stern wrote: > > On Tue, 4 Dec 2012, Sarah Sharp wrote: > > > > > An empty port can transition to either Inactive or Compliance Mode if a > > > newly connected USB 3.0 device fails to link train. In that case, we > > > issue a warm reset. Some devices, such as John's Roseweil eusb3 > > > enclosure, slip back into Compliance Mode after the warm reset. > > > > > > The current warm reset code does not check for device connect status on > > > warm reset completion, and it incorrectly reports the warm reset > > > succeeded. This causes the USB core to attempt to send a Set Address > > > control transfer to a port in Compliance Mode, which will always fail. > > > > > > Make hub_port_wait_reset check the current connect status and link state > > > after the warm reset completes. Return a failure status if the device > > > is disconnected or the link state is Compliance Mode or SS.Inactive. > > > > > > Make hub_events disable the port if warm reset fails. This will disable > > > the port, and then bring it back into the RxDetect state. Make the USB > > > core ignore the connect change until the device reconnects. > > > > Is this really the right thing to do? It means that drivers will > > continue to submit URBs. > > This is just a bandaid patch until the patch that handles connected > device reset failures. That patch will do the right thing by calling > usb_reset_device and properly disconnecting drivers on failure. > Basically the only reason this patch is broken out is to break the > patchset into readable chucks. Oh, okay. When reading a bunch of patches in a series, it's not so easy to tell when a later patch overwrites code added in an earlier patch. > Or do you mean we'll have issues with drivers continuing to submit URBs > once the last patch is applied? No, that wasn't what I meant -- but I didn't check specifically whether it could happen. Assuming it can't, and as long as the end result works okay, I don't mind a little awkwardness in the middle. 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