From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Dmitry Smirnov <d.smirnov@inbox.lv>, <linux-usb@vger.kernel.org>
Subject: Re: [PATCH V2 1/1] usb: mos7840: Fix hangup after resume
Date: Mon, 10 Jun 2024 10:38:25 +0300 [thread overview]
Message-ID: <54defb93-f90d-5859-d481-34af13db65df@omp.ru> (raw)
In-Reply-To: <20240609225850.3900-2-d.smirnov@inbox.lv>
On 6/10/24 1:58 AM, Dmitry Smirnov wrote:
No description?
> Signed-off-by: Dmitry Smirnov <d.smirnov@inbox.lv>
> ---
> V1 -> V2: Addressed review comments
I think this won't do, you need to be more detailed.
> drivers/usb/serial/mos7840.c | 50 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
> index 8b0308d84270..30c5b09a4409 100644
> --- a/drivers/usb/serial/mos7840.c
> +++ b/drivers/usb/serial/mos7840.c
> @@ -1737,6 +1737,54 @@ static void mos7840_port_remove(struct usb_serial_port *port)
> kfree(mos7840_port);
> }
>
> +static int mos7840_suspend(struct usb_serial *serial, pm_message_t message)
> +{
> + struct moschip_port *mos7840_port;
> + struct usb_serial_port *port;
> + int i;
You need an empty line here...
> + dev_dbg(&serial->interface->dev, "mos7840_suspend\n");
> +
[...]
> +static int mos7840_resume(struct usb_serial *serial)
> +{
> + struct moschip_port *mos7840_port;
> + struct usb_serial_port *port;
> + int res;
> + int i;
And here...
> + dev_dbg(&serial->interface->dev, "mos7840_resume\n");
> +
> + for (i = 0; i < serial->num_ports; ++i) {
> + port = serial->port[i];
> + if (!tty_port_initialized(&port->port))
> + continue;
> +
> + mos7840_port = usb_get_serial_port_data(port);
> +
> + if (port->bulk_in_size) {
> + res = usb_submit_urb(mos7840_port->read_urb, GFP_NOIO);
Contrariwise, the empty line here doesn't seem justified.
> +
> + if (res) {
> + usb_kill_urb(mos7840_port->read_urb);
> + mos7840_port->read_urb_busy = false;
> + }
> + }
> + }
> +
> + return 0;
> +}
> +
> static struct usb_serial_driver moschip7840_4port_device = {
> .driver = {
> .owner = THIS_MODULE,
[...]
MBR, Sergey
prev parent reply other threads:[~2024-06-10 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-09 22:58 [PATCH V2 0/1] usb: mos7840: Fix hangup after resume Dmitry Smirnov
2024-06-09 22:58 ` [PATCH V2 1/1] " Dmitry Smirnov
2024-06-10 4:39 ` Greg KH
2024-06-10 7:38 ` Sergey Shtylyov [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=54defb93-f90d-5859-d481-34af13db65df@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=d.smirnov@inbox.lv \
--cc=linux-usb@vger.kernel.org \
/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