On Sat, 4 Jun 2016, Marco Chiappero wrote: > On 31/05/2016 16:34, Alan Stern wrote: > > On Tue, 31 May 2016, Mathias Nyman wrote: > > > >> > >> xhci specs say that port will move from Disconnected (PLS = RX_DETECT) to > >> Polling if "SuperSpeed far-end receiver terminations are detected" > >> > >> From power-off state (PP=0) the connect status changes are only reported > >> if OCA is set so it seems that is not an option. > >> > >> I'm looking at the capture log and if I understand it correcty, in frame > >> 49 SET FEATURE, PLS = ss.disabled (xhci will write PORT_PED bit) > >> 59 SET FEATURE, PLS = RxDetect (xhci will set pls=RxDetect) > >> .. get_port_status, nothing set, no changes reported (several of these) > >> 73 SET FEATURE -> Port remote wake mask > >> .. get_port status reports Connected, enabled and port status change event > >> > >> Could it be that setting the port remote wake mask somehow triggers the > >> connect status change event? It's the first time we write to PORTSC for > >> this port after setting link state to rx.detect > > > > It's possible, but I doubt it. More likely it just takes a few hundred > > ms for the RxDetect link training to realize there is a connection. > > > > Marco, you can check whether this is true by doing (as root): > > > > echo on >/sys/bus/usb/devices/usb4/power/control > > > > before starting your test. > > > > Alan Stern > > Hi, > > Sorry for my late reply but I've been very busy this week. > > You can find the new captures in the same directory. Or just use the > following direct links: > https://drive.google.com/open?id=0B2tgr9hETOtgTEU1Qmc2eWNIYlE > https://drive.google.com/open?id=0B2tgr9hETOtgZUV2TkZRRGJjMWs > > I could not notice any difference though. Anyway I'm happy to test > patches if you want to try changes.
The new capture proves my earlier point. It shows the same sequence of link-state changes as before (DISABLED -> RX_DETECT -> CONNECTED), but the port's remote wakeup mask was not set. As far as I can tell, USB-3 does not have any link state that will avoid negotiating a connection with a plugged-in cable but will signal the host when the cable is unplugged. Perhaps the best we can do is put the link into U3 with remote wakeup disabled on the device. Mathias, what do you think? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html