Greg --

Sorry, the digi_acceleport patch I just sent doesn't
apply cleanly (RCS mess up).  Here is a corrected
patch.

Please apply this one.

Thanks,
-- Al

Change Log

- Fixed hang on disconnect in digi_acceleport USB serial driver.
  See http://bugme.osdl.org/show_bug.cgi?id=2459.  Close after
  disconnect no longer tries to communicate with the device.

Signed-off-by: Al Borchers <[EMAIL PROTECTED]>

--- linux-2.6.9-rc1.orig/drivers/usb/serial/digi_acceleport.c   2004-08-14 
05:55:31.000000000 -0500
+++ linux-2.6.9-rc1.new/drivers/usb/serial/digi_acceleport.c    2004-09-03 
03:43:16.000000000 -0500
@@ -1553,13 +1553,17 @@ static void digi_close( struct usb_seria
 dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count );
 
 
+       /* if disconnected, just clear flags */
+       if (!usb_get_intfdata(port->serial->interface))
+               goto exit;
+
        /* do cleanup only after final close on this port */
        spin_lock_irqsave( &priv->dp_port_lock, flags );
        priv->dp_in_close = 1;
        spin_unlock_irqrestore( &priv->dp_port_lock, flags );
 
        /* tell line discipline to process only XON/XOFF */
-        tty->closing = 1;
+       tty->closing = 1;
 
        /* wait for output to drain */
        if( (filp->f_flags&(O_NDELAY|O_NONBLOCK)) == 0 ) {
@@ -1624,6 +1628,7 @@ dbg( "digi_close: TOP: port=%d, open_cou
 
        tty->closing = 0;
 
+exit:
        spin_lock_irqsave( &priv->dp_port_lock, flags );
        priv->dp_write_urb_in_use = 0;
        priv->dp_in_close = 0;




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to