NetBSD-Bugs archive

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

kern/39044: spurious '\n' received from USB-Modems

>Number:         39044
>Category:       kern
>Synopsis:       spurious '\n' received from USB-Modems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 26 16:45:00 +0000 2008
>Originator:     Matthias Pfaller
>Release:        NetBSD 4.99.62
Matthias Pfaller                            Software Entwicklung
marco Systemanalyse und Entwicklung GmbH    Tel   +49 8131 5161-41
Hans-Böckler-Str. 2, D 85221 Dachau         Fax   +49 8131 5161-66                        Email
System: NetBSD joghurt 4.99.62 NetBSD 4.99.62 (JOGHURT) #1: Sat May 3 14:51:54 
CEST 2008 leo@joghurt:/usr/src/sys/arch/i386/compile/JOGHURT i386
Architecture: i386
Machine: i386
        When using an USB communications class device, I will sometimes
        read a spurious '\n' directly after the open. It happens only if
        the device was used (open/close) before.
        Get an USB communications class device. connect and disconnect several
        times and get a '\n'.
        Don't really know, but there is the following in sys/dev/usb/ucom.c:

                ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, 
usbd_status status)
                        struct ucom_softc *sc = (struct ucom_softc *)p;
                        struct tty *tp = sc->sc_tty;
                        int (*rint)(int, struct tty *) = tp->t_linesw->l_rint;
                        usbd_status err;
                        u_int32_t cc;
                        u_char *cp;
                        int s;

                        DPRINTFN(5,("ucomreadcb: status=%d\n", status));

                        if (status == USBD_CANCELLED || status == USBD_IOERROR 
                            sc->sc_dying) {
                                DPRINTF(("ucomreadcb: dying\n"));
                                /* Send something to wake upper layer */
                                s = spltty();
                                (*rint)('\n', tp);

        I think this where my '\n' gets injected. Is it safe to remove this

Regards, Matthias

Home | Main Index | Thread Index | Old Index