From: Du Xing duxing2...@gmail.com
In skel_read,the reader blocked in wait_for_completion before submit bulk in
urb.
Using processed_urb is for retaining the completion in the case that
previous interruptible wait in skel_read was interrupted and complete before
next skel_read.
Replacing complet
On Saturday 16 March 2013 23:47:19 Du Xing wrote:
> On Friday, March 15, 2013 12:53 AM, Oliver Neukum wrote:
>
> > The problem is that I needed to work around the counting nature of
> > completions.
> > If you go to a waitqueue the need is removed. Your original patch together
> > with
> > the c
On Friday, March 15, 2013 12:53 AM, Oliver Neukum wrote:
> The problem is that I needed to work around the counting nature of
> completions.
> If you go to a waitqueue the need is removed. Your original patch together
> with
> the change to use a wait queue would be correct.
Got that. Below is
On Friday 15 March 2013 00:19:00 Du Xing wrote:
> Ming Lei
> Below is the Patch v2 according to your solutions.is there any
> misunderstanding?
The problem is that I needed to work around the counting nature of completions.
If you go to a waitqueue the need is removed. Your original patch togethe
On Thursday, March 14, 2013 06:35 PM, Ming Lei wrote:
> On Thu, Mar 14, 2013 at 6:19 PM, Oliver Neukum wrote:
>> On Thursday 14 March 2013 18:07:29 Ming Lei wrote:
But then it makes no sense and you'd be better of with a waitqueue
instead of a completion.
>>>
>>> Maybe we can do it in a
On Thu, Mar 14, 2013 at 6:19 PM, Oliver Neukum wrote:
> On Thursday 14 March 2013 18:07:29 Ming Lei wrote:
>> > But then it makes no sense and you'd be better of with a waitqueue
>> > instead of a completion.
>>
>> Maybe we can do it in another patch.
>
> Part of the locking changes would need to
On Thursday 14 March 2013 18:07:29 Ming Lei wrote:
> > But then it makes no sense and you'd be better of with a waitqueue
> > instead of a completion.
>
> Maybe we can do it in another patch.
Part of the locking changes would need to be reverted.
It is less work to convert now.
Regards
On Thu, Mar 14, 2013 at 5:04 PM, Oliver Neukum wrote:
>>
>> 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).
>
> It is possible, if you also change lock
On Thursday 14 March 2013 12:13:59 Ming Lei wrote:
> On Wed, Mar 13, 2013 at 11:15 PM, Oliver Neukum wrote:
> > On Wednesday 13 March 2013 23:02:32 Ming Lei wrote:
> >> On Wed, Mar 13, 2013 at 10:55 PM, Oliver Neukum wrote:
> >> >
> >> > But it will be run when the next read() call is made. The q
On Wed, Mar 13, 2013 at 11:15 PM, Oliver Neukum wrote:
> On Wednesday 13 March 2013 23:02:32 Ming Lei wrote:
>> On Wed, Mar 13, 2013 at 10:55 PM, Oliver Neukum wrote:
>> >
>> > But it will be run when the next read() call is made. The question is what
>> > happens
>>
>> When next read() is calle
On Wednesday 13 March 2013 23:02:32 Ming Lei wrote:
> On Wed, Mar 13, 2013 at 10:55 PM, Oliver Neukum 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
>
On Wed, Mar 13, 2013 at 10:55 PM, Oliver Neukum 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.
Thanks,
--
Ming Lei
--
To un
On Wednesday 13 March 2013 22:42:37 Ming Lei wrote:
> On Wed, Mar 13, 2013 at 10:36 PM, Oliver Neukum wrote:
> > On Wednesday 13 March 2013 22:22:53 Du Xing wrote:
> >> From: Du Xing duxing2...@gmail.com
> >>
> >> In skel_read,the reader blocked in wait_for_completion before submit bulk
> >> in u
On Wed, Mar 13, 2013 at 10:36 PM, Oliver Neukum wrote:
> On Wednesday 13 March 2013 22:22:53 Du Xing wrote:
>> From: Du Xing duxing2...@gmail.com
>>
>> In skel_read,the reader blocked in wait_for_completion before submit bulk in
>> urb.
>> Using processed_urb is totally unnecessary, remove it can
On Wednesday 13 March 2013 22:22:53 Du Xing wrote:
> From: Du Xing duxing2...@gmail.com
>
> In skel_read,the reader blocked in wait_for_completion before submit bulk in
> urb.
> Using processed_urb is totally unnecessary, remove it can fix the bug.
The processed_urb is intended for the case that
From: Du Xing duxing2...@gmail.com
In skel_read,the reader blocked in wait_for_completion before submit bulk in
urb.
Using processed_urb is totally unnecessary, remove it can fix the bug.
---
Signed-off-by: Du Xing duxing2...@gmail.com
---
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb
From: Du Xing duxing2...@gmail.com
In skel_read,the reader blocked in wait_for_completion before submit bulk in
urb.
Using processed_urb is totally unnecessary, remove it can fix the bug.
---
Signed-off-by: Du Xing duxing2...@gmail.com
---
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb
17 matches
Mail list logo