Re: [PATCH] USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate()

2014-04-12 Thread Oliver Neukum
On Sat, 2014-04-12 at 02:10 +0400, Alexey Khoroshilov wrote:
> If acm_submit_read_urbs() fails in acm_port_activate(), error handling
> code calls usb_autopm_put_interface() while it is already called
> before acm_submit_read_urbs(). The patch reorganizes error handling code
> to avoid double decrement of USB interface's PM-usage counter.
> 
> Found by Linux Driver Verification project (linuxtesting.org).

Nice catch.

> Signed-off-by: Alexey Khoroshilov 
Acked-by: Oliver Neukum 


--
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


Re: about possible port reset when disconnect

2014-04-12 Thread vichy
hi Alan:

2014-04-09 6:58 GMT+08:00 Alan Stern :
> On Tue, 8 Apr 2014, vichy wrote:
>
>> > That's a different bit.  USB_PORT_FEAT_C_RESET isn't the same as
>> > USB_PORT_FEAT_RESET.
>> what I am curious is,
>> if port reset bit will clear to 0 within 2ms, why we still need to
>> clear_port_feature with USB_PORT_FEAT_C_RESET
>> (clear Port reset )
>> >
>> >> if (hub_is_superspeed(hub->hdev)) {
>> >> clear_port_feature(hub->hdev, port1,
>> >> USB_PORT_FEAT_C_BH_PORT_RESET);
>> >> clear_port_feature(hub->hdev, port1,
>> >> USB_PORT_FEAT_C_PORT_LINK_STATE);
>> >> clear_port_feature(hub->hdev, port1,
>> >> USB_PORT_FEAT_C_CONNECTION);
>> >> }
>
> Because if we leave these bits set, the hub will send messages on its
> interrupt endpoint telling us that these bits need to be cleared.
I got what makes me confused.
The USB_PORT_FEAT_C_RESET only work for non-root hub.

appreciate your kind help,
--
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