On Wed, Mar 13, 2013 at 11:15 PM, Oliver Neukum <[email protected]> wrote:
> On Wednesday 13 March 2013 23:02:32 Ming Lei wrote:
>> On Wed, Mar 13, 2013 at 10:55 PM, Oliver Neukum <[email protected]> wrote:
>> >
>> > But it will be run when the next read() call is made. The question is what 
>> > happens
>>
>> When next read() is called, looks it won't be reached if
>> 'ongoing_read' is set, and
>> it needn't run without ongoing URBs.
>
> If ongoing_read is not set, IO may be started and its completion would
> not be waited for, as the IO that had been started, but wasn't waited
> for due to an interrupt, has completed.

OK, got it, so how about INIT_COMPLETION(&dev->bulk_in_completion)
in case of !ongoing_read? That means replacing 'if (!dev->processed_urb)'
with INIT_COMPLETION(&dev->bulk_in_completion).

Thanks,
-- 
Ming Lei
--
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

Reply via email to