On Tue, 9 May 2006, Guennadi Liakhovetski wrote:

> On Mon, 8 May 2006, Guennadi Liakhovetski wrote:
> 
> > Yes. I put a WARN_ON(1) next to ++open_count in both files and I still see 
> > it every time I log in and out.
> 
> Below is my current version of the patch. No idea in how far it is 
> generically acceptable... Works for me.

At last I tried another usb-serial adapter (pl2303) without the patch 
below - login on ttyUSB0 (while having console configured) works. So, the 
patch below is wrong, the problem indeed is somewhere in ftdi_sio. OTOH, 
with pl2303 the whole boot-log is corrupted. Looks like the baudrate is 
not configured. But, I guess, with the switch to drivers/serial everything 
will change anyway, so, makes no sense to debug those problems further 
now.

Thanks
Guennadi
---
Guennadi Liakhovetski

> 
> diff -u a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
> --- a/drivers/usb/serial/console.c    2006-05-09 00:28:03.000000000 +0200
> +++ b/drivers/usb/serial/console.c    2006-05-09 00:26:26.000000000 +0200
> @@ -296,3 +296,7 @@
>       }
>  }
>  
> +int usb_serial_console_port(struct usb_serial_port *port)
> +{
> +     return (port == usbcons_info.port);
> +}
> diff -u a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
> --- a/drivers/usb/serial/usb-serial.c 2006-05-09 00:27:31.000000000 +0200
> +++ b/drivers/usb/serial/usb-serial.c 2006-05-09 00:25:57.000000000 +0200
> @@ -208,7 +208,7 @@
>       tty->driver_data = port;
>       port->tty = tty;
>  
> -     if (port->open_count == 1) {
> +     if (port->open_count == 1 || (port->open_count == 2 && 
> usb_serial_console_port(port))) {
>  
>               /* lock this module before we call it
>                * this may fail, which means we must bail out,
> diff -u a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
> --- a/drivers/usb/serial/usb-serial.h 2006-05-09 00:27:10.000000000 +0200
> +++ b/drivers/usb/serial/usb-serial.h 2006-05-09 00:12:20.000000000 +0200
> @@ -249,10 +249,12 @@
>  extern void usb_serial_console_init (int debug, int minor);
>  extern void usb_serial_console_exit (void);
>  extern void usb_serial_console_disconnect(struct usb_serial *serial);
> +extern int usb_serial_console_port(struct usb_serial_port *port);
>  #else
>  static inline void usb_serial_console_init (int debug, int minor) { }
>  static inline void usb_serial_console_exit (void) { }
>  static inline void usb_serial_console_disconnect(struct usb_serial *serial) 
> {}
> +static inline int usb_serial_console_port(struct usb_serial_port *port) 
> {return 0;}
>  #endif
>  
>  /* Functions needed by other parts of the usbserial core */
> 

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to