Re: a few usb issues related to edge cases

2011-12-21 Thread Andriy Gapon
on 21/12/2011 18:38 Hans Petter Selasky said the following: > On Wednesday 21 December 2011 12:29:49 Andriy Gapon wrote: >> on 20/12/2011 14:25 Andriy Gapon said the following: >>> I just wanted to draw your attention to the fact that obtaining any locks >>> in the kdb context (or USB polling code

Re: a few usb issues related to edge cases

2011-12-21 Thread Hans Petter Selasky
On Wednesday 21 December 2011 12:29:49 Andriy Gapon wrote: > on 20/12/2011 14:25 Andriy Gapon said the following: > > I just wanted to draw your attention to the fact that obtaining any locks > > in the kdb context (or USB polling code in general, even) is not a good > > idea. Chances of getting in

Re: a few usb issues related to edge cases

2011-12-21 Thread Andriy Gapon
on 20/12/2011 14:25 Andriy Gapon said the following: > I just wanted to draw your attention to the fact that obtaining any locks in > the > kdb context (or USB polling code in general, even) is not a good idea. > Chances of getting into trouble on those locks are probably quite moderate or > even

Re: a few usb issues related to edge cases

2011-12-20 Thread Andriy Gapon
Now the juicy stuff :) on 19/12/2011 16:30 Hans Petter Selasky said the following: >> 3. Looking at usbd_transfer_poll I see that it touches a lot of locks, >> including taking the bus lock. As we've discussed before, this is not safe >> in a particular context where the polling is supposed to

Re: a few usb issues related to edge cases

2011-12-19 Thread Andriy Gapon
on 19/12/2011 17:11 Hans Petter Selasky said the following: > I will fix that. I see a missing wait there. Can I assume that we are allowed > to sleep from device_shutdown() and that system timers still work? I don't see any reason why either of these should be not true. Oh, and I see that you've

Re: a few usb issues related to edge cases

2011-12-19 Thread Hans Petter Selasky
On Monday 19 December 2011 16:06:13 Andriy Gapon wrote: > First replying just to couple of points where there seems to be a > misunderstanding. > > on 19/12/2011 16:30 Hans Petter Selasky said the following: > >> 2. Somewhat related to the above. I think that because the USB > >> subsystem imple

Re: a few usb issues related to edge cases

2011-12-19 Thread Andriy Gapon
First replying just to couple of points where there seems to be a misunderstanding. on 19/12/2011 16:30 Hans Petter Selasky said the following: >> 2. Somewhat related to the above. I think that because the USB subsystem >> implements the shutdown method and detaches all its drivers, then the u

Re: a few usb issues related to edge cases

2011-12-19 Thread Hans Petter Selasky
On Monday 19 December 2011 13:16:17 Andriy Gapon wrote: > Hans Petter, > > I think that I see some issues in the USB code that could cause problems in > some edge cases. > From easiest to hardest: > Hi, > 1. I think that currently there is a LOR in usb_bus_shutdown. I think > that the followi

a few usb issues related to edge cases

2011-12-19 Thread Andriy Gapon
Hans Petter, I think that I see some issues in the USB code that could cause problems in some edge cases. >From easiest to hardest: 1. I think that currently there is a LOR in usb_bus_shutdown. I think that the following patch should fix it: