Am Freitag, 18. Februar 2005 23:20 schrieb Alexander V. Lukyanov: > Hello! > > I have ZyXEL UNO modem which has usb acm interface. Starting with kernel > version 2.6.8 the driver cdc-acm began to hand when the modem connection > was dropped due to being idle. After the hang, no data could be read from > the device /dev/usb/ttyACM0, but writting was ok. The led "data" was lit > on the modem all the time after the disconnect (which indicates that modem > has data to be read). > > I tracked down the problem to this: acm_read_bulk was called from > usb_submit_urb(acm->readurb), _inside_ acm_tty_open, and that time acm->used > was 0 which led to acm_rx_tasklet being not called, and acm_read_bulk was > never called again. > > The problem was caused by patch in 2.6.8, which moved incrementing of > acm->used to bottom of acm_tty_open. My patch to fix it is attached. > > When debugging the problem I noticed that debug messages sometimes have > double \n and the second one is not KERN_DEBUG level, which causes it to > be emitted to display. A second patch to normalize newlines in debug > output is attached. > > -- > Alexander.
Hi, thank you very much. This problem had me looking through tty changes. I had to redo it because it was against an older kernel. I'll try to get it in quickly. Regards Oliver
You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== [EMAIL PROTECTED], 2005-02-19 10:00:31+01:00, [EMAIL PROTECTED] - fix issue with softint racing with reopen by A. V. Lukyanov cdc-acm.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c 2005-02-19 10:02:21 +01:00 +++ b/drivers/usb/class/cdc-acm.c 2005-02-19 10:02:21 +01:00 @@ -278,15 +278,14 @@ - if (acm->used) { + if (acm->used++) { goto done; } acm->ctrlurb->dev = acm->dev; if (usb_submit_urb(acm->ctrlurb, GFP_KERNEL)) { dbg("usb_submit_urb(ctrl irq) failed"); - rv = -EIO; - goto err_out; + goto bail_out; } acm->readurb->dev = acm->dev; @@ -303,7 +302,6 @@ tty->low_latency = 1; done: - acm->used++; err_out: up(&open_sem); return rv; @@ -312,6 +310,8 @@ usb_kill_urb(acm->readurb); bail_out_and_unlink: usb_kill_urb(acm->ctrlurb); +bail_out: + acm->used--; up(&open_sem); return -EIO; } =================================================================== This BitKeeper patch contains the following changesets: 1.2063 ## Wrapped with gzip_uu ## M'XL( )T %T( \U4T4[;,!1]KK_B2KQLJI)<VTG<%!7!8-JF(0VQL1>$)M=U M$JMIC&('J):/7T)'&4B##>UA<:0X]YZ<Z)Q[DATX<[J9CFQEKG1#=N"]=;Z_ MU;6M=5C:E:Y,W=[TC5-K^T8TE");589%7QJM7235BO3M$^E5"3V'FXYHR+<5 MO[[4T]'IVW=GQP>GA,QF<%C*NM"?M8?9C'C;7,EJX?:E+RM;A[Z1M5MI+T-E M5]T6VC%$UJ^$"HY)VM$48]$INJ!4QE0OD,63-":U4<M+4Q2FWE_+TMJ!))3M M^=U;+AXR)LBHH$DB8NS8A$TH.0(:,DPY8!(ABV@&%*>(4T['2/L-;'S:?^P/ MC"D$2-[ O]5S2!0$D)L;,,ZU&JZ-+\'9W)O:0R.5J8M-K='V4M<P7\-!"%]# M.&Z7:UG;*_(1V(1C3$[N;2?!7QZ$H$2R]XRV13,XXZ+6S8=,A.H7C3%2T26I MR-)NKGB24YJSF.=<B_GO''W [EMAIL PROTECTED]/+,,.!F2-FZ6VVGGCH^;2] M4 'YJ:#6[;)=A;8ISHM&%Q=_H Y9GS"[EMAIL PROTECTED]';] GQ.'M4/)>]&(+XO\S> M9C"?(&BN;\\^2R=/S>@%T3SJ/[EMAIL PROTECTED],/F,C([EMAIL PROTECTED]<5X_!J^#X@)L &1 M#8A18;V%N335-]OZ77+$,1T(.(U[U%U]2D9;FB#8O?_#J5*KI6M7,Y%*%$F> *DQ\_U^'?0P4