NetBSD-Bugs archive

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

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



Matthias Drochner wrote:
leo%marco.de@localhost said:
Removing the
                                (*rint)('\n', tp);
   line from ucom.c doesn't seem to harm

Maybe, but to understand what's going on it would help
to know which of the 3 possible conditions trigger this.
(status == USBD_CANCELLED || status == USBD_IOERROR ||
sc->sc_dying)

I inserted:
                logprintf("status = %d, sc->sc_dying = %d\n", status,
                        sc->sc_dying);

The result is:
    Jul  1 14:05:49 joghurt /netbsd: status = 6, sc->sc_dying = 0

status = 6 is USBD_CANCELLED.

Some more investigation showed (and a mail from Matthias Drochner) showed, that it is ucomclose calling ucom_cleanup that triggers the spurious \n. The \n is inserted into the tty queue at device close time and delivered, when I open the device. Is there any reason to to insert the \n into the queue when doing a device close?

Regards, Matthias
--
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
http://www.marco.de/                      Email leo%marco.de@localhost
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München


Home | Main Index | Thread Index | Old Index