Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-13 Thread Johan Hovold
Sorry about the late reply. On Thu, Nov 05, 2020 at 10:17:13PM -0800, Davidlohr Bueso wrote: > On Thu, 05 Nov 2020, Johan Hovold wrote: > >On Wed, Nov 04, 2020 at 04:13:07PM -0800, Davidlohr Bueso wrote: > >> Also, but not strictly related to this. What do you think of deferring all > >> work in

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-09 Thread Davidlohr Bueso
On Mon, 09 Nov 2020, Oliver Neukum wrote: Am Donnerstag, den 05.11.2020, 22:17 -0800 schrieb Davidlohr Bueso: @@ -1888,16 +1732,8 @@ static void mos7720_release(struct usb_serial *serial) usb_set_serial_data(serial, NULL); mos_parport->serial = NULL; -

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-09 Thread Oliver Neukum
Am Donnerstag, den 05.11.2020, 22:17 -0800 schrieb Davidlohr Bueso: > @@ -1888,16 +1732,8 @@ static void mos7720_release(struct usb_serial *serial) > usb_set_serial_data(serial, NULL); > mos_parport->serial = NULL; > > - /* if tasklet currently

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-05 Thread Davidlohr Bueso
On Thu, 05 Nov 2020, Johan Hovold wrote: On Wed, Nov 04, 2020 at 04:13:07PM -0800, Davidlohr Bueso wrote: Also, but not strictly related to this. What do you think of deferring all work in write_parport_reg_nonblock() unconditionally? I'd like to avoid that mutex_trylock() because eventually

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-05 Thread Johan Hovold
On Wed, Nov 04, 2020 at 04:13:07PM -0800, Davidlohr Bueso wrote: > On Wed, 04 Nov 2020, Johan Hovold wrote: > > >Hmm. I took at closer look at the parport code and it seems the current > >implementation is already racy but that removing the tasklet is going to > >widen that that window. > > >

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-04 Thread Davidlohr Bueso
On Wed, 04 Nov 2020, Johan Hovold wrote: Hmm. I took at closer look at the parport code and it seems the current implementation is already racy but that removing the tasklet is going to widen that that window. Those register writes in restore() should be submitted before any later requests.

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-04 Thread Johan Hovold
On Wed, Nov 04, 2020 at 12:06:57PM +0100, Johan Hovold wrote: > On Tue, Nov 03, 2020 at 12:40:14PM -0800, Davidlohr Bueso wrote: > > On Mon, 02 Nov 2020, Bueso wrote: > > > > >There is > > >also no need anymore for atomic allocations. > > > > Bleh this is a brain fart - obviously not true as

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-04 Thread Johan Hovold
On Tue, Nov 03, 2020 at 12:40:14PM -0800, Davidlohr Bueso wrote: > On Mon, 02 Nov 2020, Bueso wrote: > > >There is > >also no need anymore for atomic allocations. > > Bleh this is a brain fart - obviously not true as usb_submit_urb() is > called under mos_parport->listlock. I'll send a v2 unless

Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue

2020-11-03 Thread Davidlohr Bueso
On Mon, 02 Nov 2020, Bueso wrote: There is also no need anymore for atomic allocations. Bleh this is a brain fart - obviously not true as usb_submit_urb() is called under mos_parport->listlock. I'll send a v2 unless you have any objections. Thanks, Davidlohr