[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171031085624.GN7223@localhost>
Date: Tue, 31 Oct 2017 09:56:24 +0100
From: Johan Hovold <johan@...nel.org>
To: "Ji-Ze Hong (Peter Hong)" <hpeter@...il.com>
Cc: johan@...nel.org, gregkh@...uxfoundation.org,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
hpeter+linux_kernel@...il.com, peter_hong@...tek.com.tw
Subject: Re: [PATCH V1 1/2] usb: serial: f81534: fix hang-up on overrun
On Fri, Oct 13, 2017 at 10:21:34AM +0800, Ji-Ze Hong (Peter Hong) wrote:
> The F81532/534 without this patch will hang-up on data overrun.
>
> It's caused by enable LSR interrupt in IER by default and occur data
> overrun, the chip will busy for process LSR interrupt but not read LSR
> internally. It will not responed for USB control endpoint0 and we can't
> read LSR from driver in this situration.
>
> So we'll disable the LSR interrupt in probe() and submit the LSR worker to
> clear LSR state when reported LSR error bit with bulk-in data in
> f81534_process_per_serial_block().
>
> Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@...il.com>
> +static void f81534_lsr_worker(struct work_struct *work)
> +{
> + struct f81534_port_private *port_priv =
> + container_of(work, struct f81534_port_private,
> + lsr_work);
> + struct usb_serial_port *port = port_priv->port;
I separated declaration from initialisation here to avoid the line
breaks.
> + int status;
> + u8 tmp;
> +
> + status = f81534_get_port_register(port, F81534_LINE_STATUS_REG, &tmp);
> + if (status)
> + dev_warn(&port->dev, "read LSR failed: %x\n", status);
And I changed this to %d before applying as you're printing a negative
errno here.
> +}
> +
Now applied for -next.
Thanks,
Johan
Powered by blists - more mailing lists