Fix USB serial device stalled after tcflush() was called.

PR:		kern/65769
MFC after:	3 days
This commit is contained in:
Shunsuke Akiyama 2005-01-19 15:18:00 +00:00
parent eba5b9dfce
commit 1f41d5d83a

View File

@ -1,7 +1,7 @@
/* $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ */
/*-
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* Copyright (c) 2001-2003, 2005 Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -624,6 +624,7 @@ ucomstop(struct tty *tp, int flag)
if (flag & FREAD) {
DPRINTF(("ucomstop: read\n"));
ucomstopread(sc);
ucomstartread(sc);
}
if (flag & FWRITE) {
@ -637,6 +638,8 @@ ucomstop(struct tty *tp, int flag)
splx(s);
}
ucomstart(tp);
DPRINTF(("ucomstop: done\n"));
}
@ -813,6 +816,7 @@ ucom_cleanup(struct ucom_softc *sc)
ucom_shutdown(sc);
if (sc->sc_bulkin_pipe != NULL) {
sc->sc_state |= UCS_RXSTOP;
usbd_abort_pipe(sc->sc_bulkin_pipe);
usbd_close_pipe(sc->sc_bulkin_pipe);
sc->sc_bulkin_pipe = NULL;