Re: [PATCH 1/5] USB: serial: f81232: clear overrun flag

From: Ji-Ze Hong (Peter Hong)
Date: Mon Jan 22 2018 - 20:50:57 EST


Hi Oliver,

Oliver Neukum æ 2018/1/22 äå 06:06 åé:
+static void f81232_lsr_worker(struct work_struct *work)
+{
+ struct f81232_private *priv;
+ struct usb_serial_port *port;
+ int status;
+ u8 tmp;
+
+ priv = container_of(work, struct f81232_private, lsr_work);
+ port = priv->port;
+
+ status = f81232_get_register(port, LINE_STATUS_REGISTER, &tmp);
+ if (status)
+ dev_warn(&port->dev, "read LSR failed: %d\n", status);
+}

Hi,

I am afraid this is incomplete. You are scheduling a work that does IO.
Hence you must cancel that work when the driver is unbound from the
interface. You must also not do IO like this while the system is suspending.

We'll add cancel worker operation on close() and suspend() to prevent
from I/O operations in wrong time with next patch version.

Thanks
--
With Best Regards,
Peter Hong