On Fri, 2020-07-10 at 18:05 +0200, Joakim Tjernlund wrote: > On Fri, 2020-07-10 at 14:41 +0200, Johan Hovold 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. > > > > > > On Fri, Jul 10, 2020 at 10:46:19AM +0000, Joakim Tjernlund wrote: > > > On Fri, 2020-07-10 at 12:34 +0200, Greg KH wrote: > > > > > > > > On Fri, Jul 10, 2020 at 11:35:18AM +0200, Joakim Tjernlund wrote: > > > > > > > tty_set_operations(acm_tty_driver, &acm_ops); > > > > > > > > > > - retval = tty_register_driver(acm_tty_driver); > > > > > + retval = usb_register(&acm_driver); > > > > > if (retval) { > > > > > put_tty_driver(acm_tty_driver); > > > > > return retval; > > > > > } > > > > > > > > > > - retval = usb_register(&acm_driver); > > > > > + retval = tty_register_driver(acm_tty_driver); > > > > > if (retval) { > > > > > - tty_unregister_driver(acm_tty_driver); > > > > > + usb_deregister(&acm_driver); > > > > > > > > Why are you switching these around? I think I know, but you don't > > > > really say... > > > > > > I wrote: > > > For initial termios to reach USB core, USB driver has to be > > > registered before TTY driver. > > > Found out that by trial and error. Isn't that clear enough? > > > > No, that makes no sense at all since USB core does not care about > > init_termios. > > But you install acm_ops into tty: > tty_set_operations(acm_tty_driver, &acm_ops); > Perhaps there is a call into acm_ops? > > Anyhow, does it not make sense to have usb before tty as tty uses usb? Forgot to mention, I can remove: // acm->line.dwDTERate = cpu_to_le32(9600); // acm->line.bDataBits = 8; // acm_set_line(acm, &acm->line); in acm_probe() without noticing any change Jocke