Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-10]: src/sys/dev/usb Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/10fe2dbed1ab
branches: netbsd-10
changeset: 373616:10fe2dbed1ab
user: martin <martin%NetBSD.org@localhost>
date: Wed Feb 22 13:06:42 2023 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #92):
sys/dev/usb/ucom.c: revision 1.136
sys/dev/usb/ucom.c: revision 1.135
ucom(4): Nix broken error branch.
This error branch was introduced to make the system act, when a USB
serial adapter is yanked, as if the other end had spat out a line
feed in an attempt to wake any sleeping readers so they will stop
using the USB serial port.
This is no longer necessary, because ttycancel will wake them anyway,
and it is actually harmful because it puts stuff in the output queue
(CR LF) that will never be processed, causing subsequent users to
hang trying to open the device.
Problem found and patch tested by tih@.
ucom(4): Missed a spot in previous -- nix now-unused local.
diffstat:
sys/dev/usb/ucom.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diffs (45 lines):
diff -r 0c22fa24f44b -r 10fe2dbed1ab sys/dev/usb/ucom.c
--- a/sys/dev/usb/ucom.c Wed Feb 22 12:59:17 2023 +0000
+++ b/sys/dev/usb/ucom.c Wed Feb 22 13:06:42 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ucom.c,v 1.134 2022/10/26 23:48:43 riastradh Exp $ */
+/* $NetBSD: ucom.c,v 1.134.2.1 2023/02/22 13:06:42 martin Exp $ */
/*
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.134 2022/10/26 23:48:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucom.c,v 1.134.2.1 2023/02/22 13:06:42 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1435,7 +1435,6 @@
ucomreadcb(struct usbd_xfer *xfer, void *p, usbd_status status)
{
struct ucom_softc *sc = (struct ucom_softc *)p;
- struct tty *tp = sc->sc_tty;
struct ucom_buffer *ub;
uint32_t cc;
u_char *cp;
@@ -1446,18 +1445,8 @@
if (status == USBD_CANCELLED || status == USBD_IOERROR ||
sc->sc_closing) {
-
DPRINTF("... done (status %jd closing %jd)",
status, sc->sc_closing, 0, 0);
-
- if (status == USBD_IOERROR || sc->sc_closing) {
- /* Send something to wake upper layer */
- (tp->t_linesw->l_rint)('\n', tp);
- ttylock(tp); /* XXX */
- ttwakeup(tp);
- ttyunlock(tp); /* XXX */
- }
-
mutex_exit(&sc->sc_lock);
return;
}
Home |
Main Index |
Thread Index |
Old Index