cdc_acm: Problem with device hangup

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

 



Hello,

i have the following problem with the cdc-acm - driver:

I'm using the driver with an "Ericsson F3507G" on a Thinkpad T400.

If a disable the device (with the RFKill-Switch) while it is used by a
programm like ppp, the driver doesn't seem to correctly clean up the tty,
even after the program has been closed)

The tty is still active (e.g. there still exists an entry in
/sys/dev/char/166:0 if ttyACM0 was used) and if a reacticate the device,
this device entry will be skipped and the Device-Nodes ttyACM1, ttyACM2
and ttyACM3 will be used.

This problem was introduced with the commit
10077d4a6674f535abdbe25cdecb1202af7948f1 (before 2.6.31-rc1) and still
exists in 2.6.31.

I was able the fix this problem with the following patch:

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 2bfc41e..0970d2f 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -676,6 +676,7 @@ static void acm_tty_hangup(struct tty_struct *tty)
        struct acm *acm = tty->driver_data;
        tty_port_hangup(&acm->port);
        acm_port_down(acm, 0);
+       acm_tty_unregister(acm);
 }


Best regards

 Dietmar Hilbrich


--
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