Messages in this thread | | | Subject | Re: [PATCH 1/5] USB: serial: f81232: clear overrun flag | From | "Ji-Ze Hong (Peter Hong)" <> | Date | Tue, 23 Jan 2018 09:50:48 +0800 |
| |
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
| |