lkml.org 
[lkml]   [2018]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] USB: serial: f81232: clear overrun flag
From
Date
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

\
 
 \ /
  Last update: 2018-01-23 02:51    [W:0.094 / U:7.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site