Re: [PATCH] cdc-acm: acm_init: Set initial BAUD to B0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Can I ask this too:
 what is the difference between acm_tty_install and acm_tty_open ? Both seems to be called at open(2)
seems to me that install could be folded into open ?

 Jocke




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux