From: Johan Hovold <johan@kernel.org>
To: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
Cc: johan@kernel.org, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
hpeter+linux_kernel@gmail.com, peter_hong@fintek.com.tw
Subject: Re: [PATCH V1 1/2] usb: serial: f81534: fix hang-up on overrun
Date: Tue, 31 Oct 2017 09:56:24 +0100 [thread overview]
Message-ID: <20171031085624.GN7223@localhost> (raw)
In-Reply-To: <1507861295-10071-1-git-send-email-hpeter+linux_kernel@gmail.com>
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@gmail.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
prev parent reply other threads:[~2017-10-31 8:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 2:21 [PATCH V1 1/2] usb: serial: f81534: fix hang-up on overrun Ji-Ze Hong (Peter Hong)
2017-10-13 2:21 ` [PATCH V1 2/2] usb: serial: f81534: Implement break control Ji-Ze Hong (Peter Hong)
2017-10-31 8:59 ` Johan Hovold
2017-10-31 8:56 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171031085624.GN7223@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpeter+linux_kernel@gmail.com \
--cc=hpeter@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=peter_hong@fintek.com.tw \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox