On Thu, Sep 04, 2003 at 04:31:45PM +0300, Rus V. Brushkoff wrote:
> 
>       Hi.
> 
>  Can somebody reproduce this - doing 'cat /dev/ttyUSB0' and then unplug
> device, my config is kernel is 2.4.23-pre3 / mb Intel D845PEBT2 / 1.8Ghz
> P4 / 768 Mb RAM :

Can you try the patch below and let me know if it fixes it or not?

thanks,

greg k-h


--- a/drivers/usb/serial/usbserial.c    Sat Aug 30 23:27:18 2003
+++ b/drivers/usb/serial/usbserial.c    Thu Sep  4 13:48:45 2003
@@ -556,7 +556,10 @@
                else
                        generic_close(port, filp);
                port->open_count = 0;
-               port->tty = NULL;
+               if (port->tty) {
+                       port->tty->driver_data = NULL;
+                       port->tty = NULL;
+               }
        }
 
        if (port->serial->type->owner)
@@ -1401,12 +1404,9 @@
                for (i = 0; i < serial->num_ports; ++i) {
                        port = &serial->port[i];
                        down (&port->sem);
-                       if (port->tty != NULL) {
-                               while (port->open_count > 0) {
+                       if (port->tty != NULL)
+                               while (port->open_count > 0)
                                        __serial_close(port, NULL);
-                               }
-                               port->tty->driver_data = NULL;
-                       }
                        up (&port->sem);
                }
 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to