Re: [PATCH v3 5/5] usb: chipidea: udc: don't stall endpoint if request list is empty in isr_tr_complete_low

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

 



On 09/06/2012 02:46 PM, Alexander Shishkin wrote:
> Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> writes:
> 
>> From: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
>>
>> When attaching an imx28 or imx53 in USB gadget mode to a Windows host and
>> starting a rndis connection we see this message every 4-10 seconds:
>>
>>     g_ether gadget: high speed config #2: RNDIS
>>
>> Analysis shows that each time this message is printed, the rndis connection is
>> re-establish due to a reset because of a stalled endpoint (ep 0, dir 1). The
>> endpoint is stalled because the reqeust complete bit on that endpoint is set,
>> but in isr_tr_complete_low() the endpoint request list (mEp->qh.queue) is
>> empty.
>>
>> This patch removed this check, because the code doesn't take the following
>> situation into account:
>>
>> The loop over all endpoints in isr_tr_complete_handler() will call ep_nuke() on
>> both ep0/dir0 and ep/dir1 in the first loop. Pending reqeusts will be flushed
>> and completed here. There seems to be a race condition, the request is nuked,
>> but the request complete bit will be set, too. The subsequent check (in
>> ep0/dir1's loop cycle) for endpoint request list (mEp->qh.queue) empty will
>> fail.
>>
>> Both other mainline chipidea drivers (mv_udc_core.c and fsl_udc_core.c) don't
>> have this check.
>>
>> Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
>> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
> 
> Makes sense to me,
> 
> Acked-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>

Thanks a lot. IMHO this is a candidate for stable.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux