Comments
Patch
This patch fixes -EIO caused when serial port opened more than once.
Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
---
===================================================================
@@ -1354,13 +1354,14 @@
/* do the actual close */
serial->open_count--;
kref_put(&serial->parent->ref, hso_serial_ref_free);
+ if (serial->tty == tty)
+ tty_kref_put(tty);
if (serial->open_count <= 0) {
serial->open_count = 0;
spin_lock_irq(&serial->serial_lock);
if (serial->tty == tty) {
serial->tty->driver_data = NULL;
serial->tty = NULL;
- tty_kref_put(tty);
}
spin_unlock_irq(&serial->serial_lock);
if (!usb_gone)
@@ -1368,7 +1369,6 @@
tasklet_kill(&serial->unthrottle_tasklet);
cancel_work_sync(&serial->retry_unthrottle_workqueue);
}
-
if (!usb_gone)
usb_autopm_put_interface(serial->parent->interface);
Hi All, This is an important patch the linux-2.6.29-rc1 driver with itworks much better than it did. I'm about 80% sure this patch is correct but it needs Alan Cox'es blessing as it modifies code he added. This patch fixes -EIO caused when serial port opened more than once. Signed-off-by: Denis Joseph Barrow <D.Barow@option.com> ---