Current-Users archive

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

Re: ucom(4) hang up



On Friday 19 February 2010 12:56:25 KIYOHARA Takashi wrote:

> I understood this problem.
> uftdi(4) might receive state information only, not the data part.
> uftdi_read() will return cp+2 and set 0 to cc.
> And, neither uc_index nor uc_len never become the same though
> ucomreadcb() calls ucom_read_complete().

Thanks for the analysis. Can you test if the patch, below, fixes the 
problem?

Steve

Index: ucom.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/ucom.c,v
retrieving revision 1.82
diff -u -r1.82 ucom.c
--- ucom.c      6 Jan 2010 20:37:56 -0000       1.82
+++ ucom.c      19 Feb 2010 14:26:22 -0000
@@ -1167,7 +1167,7 @@
 
                splx(s);
 
-               if (ub->ub_index == ub->ub_len) {
+               if (ub->ub_index >= ub->ub_len) {
                        SIMPLEQ_REMOVE_HEAD(&sc->sc_ibuff_full, ub_link);
 
                        ucomsubmitread(sc, ub);




Home | Main Index | Thread Index | Old Index