lkml.org 
[lkml]   [2019]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V9 1/4] USB: serial: f81232: fix interrupt worker not stop
On Tue, Apr 30, 2019 at 09:22:29AM +0800, Ji-Ze Hong (Peter Hong) wrote:
> The F81232 will use interrupt worker to handle MSR change.
> This patch will fix the issue that interrupt work should stop
> in close() and suspend().
>
> Cc: Johan Hovold <johan@kernel.org>
> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>

> +static int f81232_resume(struct usb_serial *serial)
> +{
> + struct usb_serial_port *port = serial->port[0];
> + int result;
> +
> + if (tty_port_initialized(&port->port)) {
> + result = usb_submit_urb(port->interrupt_in_urb, GFP_NOIO);
> + if (result) {
> + dev_err(&port->dev, "submit interrupt urb failed: %d",
> + result);

I added the missing '\n' to the error message.

> + return result;
> + }
> + }
> +
> + return usb_serial_generic_resume(serial);
> +}

This also fixes the issue with interrupt events not being received
after a suspend cycle, so I added that to the commit message.

Johan

\
 
 \ /
  Last update: 2019-05-03 08:54    [W:3.661 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site