linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>
To: "oneukum@suse.com" <oneukum@suse.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: ttyACM: disabled by hub (EMI?), re-enabling... Causes garbage chars & disconnect
Date: Wed, 27 May 2020 15:41:00 +0000	[thread overview]
Message-ID: <d7f2750db8c2616fb74fc2e7ea006354e546c7fc.camel@infinera.com> (raw)
In-Reply-To: <c2c3eed27aa13f981690779aca00c420ce0beb06.camel@infinera.com>

On Wed, 2020-05-27 at 15:16 +0200, Joakim Tjernlund wrote:
> On Wed, 2020-05-27 at 12:41 +0200, Oliver Neukum wrote:
> > Am Mittwoch, den 27.05.2020, 09:40 +0000 schrieb Joakim Tjernlund:
> > > On Wed, 2020-05-27 at 10:38 +0200, Oliver Neukum wrote:
> > > > CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
> > > > 
> > > > 
> > > > Am Dienstag, den 26.05.2020, 17:19 +0000 schrieb Joakim Tjernlund:
> > > > > This "u-boot SPL" is the first thing u-boot writes and somehow this is remembered, I assume, by cdc_acm
> > > > > and gets echoed back when I open ttyACM0
> > > > 
> > > > Hi,
> > > > 
> > > > that makes sense, but it is not something that we could really
> > > > change in CDC-ACM, I am afraid.
> > > 
> > > Why not? CDC-ACM should echo back anything it has received before open of ttyACM
> > 
> > Well, there is an inherent race condition with loading the module I am
> > afraid. By default cdc-acm should actually echo. You can set the
> > DISABLE_ECHO echo quirk for your device if you want to get rid of it.
> > 
> > Is CDC-ACM violating some standard with respect to echoing? Changing
> > defaults really hurts users, no matter what you do.
> > 
> 
> 	/*
> 	 * Suppress initial echoing for some devices which might send data
> 	 * immediately after acm driver has been installed.
> 	 */
> 	if (acm->quirks & DISABLE_ECHO)
> 		tty->termios.c_lflag &= ~ECHO;
> 
> That seems to be what I needed, should be default I think ...
> Need to test som more but looks much better.
> I guess all cdc_acm's are could suffer from this? Will depend the target in the other
> end.
> 

Would be nice if the ECHO could be delay until first read(2)/termios_set, the baudrate could be 11500 until open(2) too, maybe

However, the bigger question: Is the a way to configure Windows to default to ~ECHO too ?

    Jocke 

  reply	other threads:[~2020-05-27 15:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 14:46 ttyACM: disabled by hub (EMI?), re-enabling... Causes garbage chars & disconnect Joakim Tjernlund
2020-05-25 15:02 ` Oliver Neukum
2020-05-25 15:15   ` Joakim Tjernlund
2020-05-25 16:49     ` Joakim Tjernlund
2020-05-26  8:47       ` Oliver Neukum
2020-05-26  8:59         ` Joakim Tjernlund
2020-05-26 10:14           ` Oliver Neukum
2020-05-26 16:46             ` Joakim Tjernlund
2020-05-26 17:19               ` Joakim Tjernlund
2020-05-27  8:38                 ` Oliver Neukum
2020-05-27  9:40                   ` Joakim Tjernlund
2020-05-27 10:12                     ` Greg KH
2020-05-27 10:41                     ` Oliver Neukum
2020-05-27 13:16                       ` Joakim Tjernlund
2020-05-27 15:41                         ` Joakim Tjernlund [this message]
2020-06-05 10:09                           ` Joakim Tjernlund
2020-06-08  9:13                             ` Oliver Neukum
2020-06-08 11:39                               ` Joakim Tjernlund
2020-06-08 15:40                                 ` Oliver Neukum
2020-06-08 16:00                                   ` Joakim Tjernlund
2020-06-08 19:21                                     ` Oliver Neukum
2020-06-15 11:01           ` Joakim Tjernlund

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=d7f2750db8c2616fb74fc2e7ea006354e546c7fc.camel@infinera.com \
    --to=joakim.tjernlund@infinera.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    /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;
as well as URLs for NNTP newsgroup(s).