hi Alan:
>> Your log contains the explanation:
>>
>>> Platform-ehci Platform-ehci.0: port 1 reset
>>
>> This is where the reset starts.
>>
>>> Platform-ehci Platform-ehci.0: in port reset sequence, GetStatus
>>> port:1 status 000100 0 ACK sig=se0 RESET
>>> usb 4-1: USB disconnect, device number 20
>>
>> And this is where US_FLIDX_DISCONNECTING gets set -- after the reset
>> has already begun.
>>
>>> 2. shall we add below determination before port reset?
>>> --- a/linux-3.8.2/drivers/usb/host/ehci-hub.c
>>> ++ b/linux-3.8.2/drivers/usb/host/ehci-hub.c
>>> @@ -1139,6 +1139,9 @@ static int ehci_hub_control (
>>> case USB_PORT_FEAT_RESET:
>>> if (temp & PORT_RESUME)
>>> goto error;
>>> +
>>> + if (!(temp & PORT_CONNECT))
>>> + goto disconnect;
>>> /* line status bits may report this as low speed,
>>> * which can be fine if this root hub has a
>>> * transaction translator built in.
>>
>> We could add this, but it's not a big deal. The real question is why
>> did this happen:
>>
>>> hub 4-0:1.0: hub_port_status failed (err = -32)
>>
>> hub_port_status should not return an error. It should have returned
>> valid data, and the port status should have shown that the device was
>> disconnected. Can you figure out why hub_port_status didn't work?
I add more description.
in Below #1, since connect status is zero, handshake will fail with
return -ETIMEDOUT.
Then go to #2 error label.
and finally hub_port_status get -32, -EPIPE.
1. Platform-ehci Platform-ehci.0: port 1 reset error -110
the -110 is due to below handshake timeout.
retval = handshake(ehci, status_reg,
PORT_RESET, 0, 1000);
if (retval != 0) {
ehci_err (ehci, "port %d reset error %d\n",
wIndex + 1, retval);
goto error;
}
2. hub 4-0:1.0: hub_port_status failed (err = -32)
the -32 is due to below error label we set retval = -EPIPE
error:
/* "stall" on error */
retval = -EPIPE;
thanks for your kind reply ^^
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html