Linux USB
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Piotr Kubik <piotr@kubik.pl>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Oliver Neukum <oneukum@suse.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Francesco Lavra <francescolavra@interfree.it>,
	stable@vger.kernel.org
Subject: Re: [PATCH] USB: cdc-acm: restore the line coding after a reset-resume
Date: Thu, 19 Nov 2026 13:47:07 +0100	[thread overview]
Message-ID: <1817932e-469f-401b-bc04-37f30625c3ec@suse.com> (raw)
In-Reply-To: <20261119122842.3611681-1-piotr@kubik.pl>



On 19.11.26 13:28, Piotr Kubik wrote:
Hi,

thank you for this patch. However, it has an issue.
Let me comment on this inline.

   
> +	/*
> +	 * The device can lose its line coding, for example when it loses
> +	 * power during system suspend, and acm_tty_set_termios() sends the
> +	 * line coding only when it differs from acm->line. Send it once, for
> +	 * the control interface. In a runtime resume of the device, an autopm
> +	 * reference here would wait for this resume and never return.
> +	 */
> +	if (intf == acm->control)

This test is problematic. The interfaces may be resumed in any order.
You are setting a line coding before the rest of the device is
resumed.

To do this cleanly, you need to look at the counter.

	Regards
		Oliver


      parent reply	other threads:[~2026-11-19 12:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 12:28 [PATCH] USB: cdc-acm: restore the line coding after a reset-resume Piotr Kubik
2026-11-19 12:36 ` sashiko-bot
2026-11-19 12:47 ` Oliver Neukum [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=1817932e-469f-401b-bc04-37f30625c3ec@suse.com \
    --to=oneukum@suse.com \
    --cc=francescolavra@interfree.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=piotr@kubik.pl \
    --cc=stable@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