Commit e947975b authored by Al Borchers's avatar Al Borchers Committed by Greg Kroah-Hartman

[PATCH] USB: corrected digi_acceleport 2.6.9-rc1 fix for hang on disconnect

- 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: default avatarAl Borchers <alborchers@steinerpoint.com>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 825d5976
...@@ -1546,6 +1546,10 @@ static void digi_close( struct usb_serial_port *port, struct file *filp ) ...@@ -1546,6 +1546,10 @@ static void digi_close( struct usb_serial_port *port, struct file *filp )
dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_count ); 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 */ /* do cleanup only after final close on this port */
spin_lock_irqsave( &priv->dp_port_lock, flags ); spin_lock_irqsave( &priv->dp_port_lock, flags );
priv->dp_in_close = 1; priv->dp_in_close = 1;
...@@ -1616,6 +1620,7 @@ dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_co ...@@ -1616,6 +1620,7 @@ dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_co
tty->closing = 0; tty->closing = 0;
exit:
spin_lock_irqsave( &priv->dp_port_lock, flags ); spin_lock_irqsave( &priv->dp_port_lock, flags );
priv->dp_write_urb_in_use = 0; priv->dp_write_urb_in_use = 0;
priv->dp_in_close = 0; priv->dp_in_close = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment