Serial driver problems with 5.2-current

M. Warner Losh imp at bsdimp.com
Sat Dec 27 13:22:04 PST 2003


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
@@ -1794,9 +1794,20 @@
 			}
 		}
 		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;


More information about the freebsd-current mailing list