Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-08 Thread Alexander Holler
Am 08.02.2013 05:07, schrieb Dave Airlie: But I've just switched to udl (instead of udlfb) and will see if I can fix the bugs there to make it usable as a console. udl is a rewrite of udlfb with some additional features (e.g. drm), so hopefully fixing the remaining problems there will require le

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-07 Thread Dave Airlie
> > But I've just switched to udl (instead of udlfb) and will see if I can fix > the bugs there to make it usable as a console. udl is a rewrite of udlfb > with some additional features (e.g. drm), so hopefully fixing the remaining > problems there will require less work. I may have fixed the majo

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-05 Thread Alexander Holler
Am 05.02.2013 18:22, schrieb Greg KH: On Tue, Feb 05, 2013 at 08:08:28AM +0100, Alexander Holler wrote: Am 04.02.2013 20:25, schrieb Greg KH: Where was that urb when the disconnect happened? The USB core should call your urb callback for any outstanding urbs at that point in time, with the p

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-05 Thread Greg KH
On Tue, Feb 05, 2013 at 08:08:28AM +0100, Alexander Holler wrote: > Am 04.02.2013 20:25, schrieb Greg KH: > > On Mon, Feb 04, 2013 at 08:17:04PM +0100, Alexander Holler wrote: > >> Am 04.02.2013 13:05, schrieb Alexander Holler: > >>> Am 04.02.2013 02:14, schrieb Greg KH: > >>> > So you are rig

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-04 Thread Alexander Holler
Am 04.02.2013 20:25, schrieb Greg KH: > On Mon, Feb 04, 2013 at 08:17:04PM +0100, Alexander Holler wrote: >> Am 04.02.2013 13:05, schrieb Alexander Holler: >>> Am 04.02.2013 02:14, schrieb Greg KH: >>> So you are right in that your driver will wait for forever for a disconnect() to happen

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-04 Thread Greg KH
On Mon, Feb 04, 2013 at 08:17:04PM +0100, Alexander Holler wrote: > Am 04.02.2013 13:05, schrieb Alexander Holler: > >Am 04.02.2013 02:14, schrieb Greg KH: > > > >>So you are right in that your driver will wait for forever for a > >>disconnect() to happen, as it will never be called. I don't under

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-04 Thread Alexander Holler
Am 04.02.2013 13:05, schrieb Alexander Holler: Am 04.02.2013 02:14, schrieb Greg KH: So you are right in that your driver will wait for forever for a disconnect() to happen, as it will never be called. I don't understand the problem that this is causing when it happens. What's wrong with udlf

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-04 Thread Alexander Holler
Am 04.02.2013 02:14, schrieb Greg KH: So you are right in that your driver will wait for forever for a disconnect() to happen, as it will never be called. I don't understand the problem that this is causing when it happens. What's wrong with udlfb that having the cpu suddently reset as the pow

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-02-03 Thread Greg KH
On Tue, Jan 29, 2013 at 09:35:42PM +0100, Alexander Holler wrote: > Am 29.01.2013 16:51, schrieb Alexander Holler: > >Am 29.01.2013 12:11, schrieb Alexander Holler: > > > >> > >>To explain the problem on shutdown a bit further, I think the following > >>happens (usb and driver are statically linked

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-29 Thread Alexander Holler
Am 29.01.2013 21:35, schrieb Alexander Holler: So, if the above down_timeout_killable() is only down_interruptible(), as in kernel 3.7.5, the box would not shutdown afterwards, because on shutdown no signal would be send to that kernel-thread which called dlfb_free_urb_list(). A last note: dlf

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-29 Thread Alexander Holler
Am 29.01.2013 16:51, schrieb Alexander Holler: Am 29.01.2013 12:11, schrieb Alexander Holler: To explain the problem on shutdown a bit further, I think the following happens (usb and driver are statically linked and started by the kernel): shutdown -> kill signal -> usb stack shuts down -> ud

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-29 Thread Alexander Holler
Am 29.01.2013 12:11, schrieb Alexander Holler: To explain the problem on shutdown a bit further, I think the following happens (usb and driver are statically linked and started by the kernel): shutdown -> kill signal -> usb stack shuts down -> udlfb waits (forever) for a kill or an urb which i

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-29 Thread Alexander Holler
Am 29.01.2013 11:35, schrieb Alexander Holler: Am 29.01.2013 01:56, schrieb Alexander Holler: Am 29.01.2013 01:22, schrieb Andrew Morton: On Fri, 25 Jan 2013 19:49:27 +0100 Alexander Holler wrote: When a device was disconnected the driver may hang at waiting for urbs it never will get. Fix t

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-29 Thread Alexander Holler
Am 29.01.2013 01:56, schrieb Alexander Holler: Am 29.01.2013 01:22, schrieb Andrew Morton: On Fri, 25 Jan 2013 19:49:27 +0100 Alexander Holler wrote: When a device was disconnected the driver may hang at waiting for urbs it never will get. Fix this by using a timeout while waiting for the use

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-28 Thread Alexander Holler
Am 29.01.2013 01:22, schrieb Andrew Morton: > On Fri, 25 Jan 2013 19:49:27 +0100 > Alexander Holler wrote: > >> When a device was disconnected the driver may hang at waiting for urbs it >> never >> will get. Fix this by using a timeout while waiting for the used semaphore. >> >> There is still a

Re: [PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-28 Thread Andrew Morton
On Fri, 25 Jan 2013 19:49:27 +0100 Alexander Holler wrote: > When a device was disconnected the driver may hang at waiting for urbs it > never > will get. Fix this by using a timeout while waiting for the used semaphore. > > There is still a memory leak if a timeout happens, but at least the dr

[PATCH 2/3 v2] fb: udlfb: fix hang at disconnect

2013-01-25 Thread Alexander Holler
When a device was disconnected the driver may hang at waiting for urbs it never will get. Fix this by using a timeout while waiting for the used semaphore. There is still a memory leak if a timeout happens, but at least the driver now continues his disconnect routine. Cc: Signed-off-by: Alexande