[patch for 2.6.30? 1/1] drivers/usb/serial/ti_usb_3410_5052.c: ti_usb returns EIO when reopening the device

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

 



From: Christoph Mair <christoph.mair@xxxxxxxxx>

Fix regression introduced by 4a90f09b20f4622dcbff1f0e1e6bae1704f8ad8c
("tty: usb-serial krefs").

The driver works as expected until you close the device and try to reopen
it.  All you get from now on, is an I/O error.  It seems that something
isn't released correctly, because the refcount of the usbserial module
does not drop to zero, even when unloading all dependent drivers.

Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/usb/serial/ti_usb_3410_5052.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/usb/serial/ti_usb_3410_5052.c~drivers-usb-serial-ti_usb_3410_5052c-ti_usb-returns-eio-when-reopening-the-device drivers/usb/serial/ti_usb_3410_5052.c
--- a/drivers/usb/serial/ti_usb_3410_5052.c~drivers-usb-serial-ti_usb_3410_5052c-ti_usb-returns-eio-when-reopening-the-device
+++ a/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1218,8 +1218,8 @@ static void ti_bulk_in_callback(struct u
 			tport->tp_icount.rx += urb->actual_length;
 			spin_unlock(&tport->tp_lock);
 		}
-		tty_kref_put(tty);
 	}
+	tty_kref_put(tty);
 
 exit:
 	/* continue to read unless stopping */
_
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux