Re: Serial driver problems with 5.2-current

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sat, 27 Dec 2003 14:21:40 -0700 (MST)
Try this patch.  It bails out more.

Index: sio.c
===================================================================
RCS file: /cache/ncvs/src/sys/dev/sio/sio.c,v
retrieving revision 1.416
diff -u -r1.416 sio.c
--- sio.c	17 Nov 2003 07:21:19 -0000	1.416
+++ sio.c	27 Dec 2003 21:16:50 -0000
_at__at_ -1794,9 +1794,20 _at__at_
 			}
 		}
 		line_status = inb(com->line_status_port);
-
+		if (line_status == 0xff) {
+			printf("sio%d: spouting nonsense -- disabled.\n",
+			    com->unit);
+			com->gone = 1;
+			return;
+		}
 		/* input event? (check first to help avoid overruns) */
 		while (line_status & LSR_RCV_MASK) {
+			if (line_status == 0xff) {
+				printf("sio%d: linstatus bad -- disabled.\n",
+				    com->unit);
+				com->gone = 1;
+				return;
+			}
 			/* break/unnattached error bits or real input? */
 			if (!(line_status & LSR_RXRDY))
 				recv_data = 0;
Received on Sat Dec 27 2003 - 12:22:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC