[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <574f338f6f0b81fe1e4109f74c6dfcb45aca0d53.camel@suse.com>
Date:   Mon, 09 Nov 2020 10:22:16 +0100
From:   Oliver Neukum <oneukum@...e.com>
To:     Davidlohr Bueso <dave@...olabs.net>,
        Johan Hovold <johan@...nel.org>
Cc:     linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] usb/mos7720: process deferred urbs in a workqueue
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 scheduled, wait for it to complete */
> -               tasklet_kill(&mos_parport->urb_tasklet);
> -
> -               /* unlink any urbs sent by the tasklet  */
> -               spin_lock_irqsave(&mos_parport->listlock, flags);
> -               list_for_each_entry(urbtrack,
> -                                   &mos_parport->active_urbs,
> -                                   urblist_entry)
> -                       usb_unlink_urb(urbtrack->urb);
> -               spin_unlock_irqrestore(&mos_parport->listlock, flags);
> +               /* if work is currently scheduled, wait for it to complete */
> +               cancel_work_sync(&mos_parport->work);
>                 parport_del_port(mos_parport->pp);
> 
>                 kref_put(&mos_parport->ref_count, destroy_mos_parport);
Hi,
do you really want to cancel as opposed to wait for work in release()?
	Regards
		Oliver
Powered by blists - more mailing lists
 
