Serial driver problems with 5.2-current

Dheeraj dhee at myrealbox.com
Sat Dec 27 15:48:54 PST 2003


Thanks Warner.

 At last it doesn't hang anymore. But it was what you expected with that 'return', I cannot test it right away if it can dial-out with that patch. I shall do it as soon as I get back home and reply on the result later in the evening.

truely
dheeraj

-----Original Message-----
From: "M. Warner Losh" <imp at bsdimp.com>
To: dhee at myrealbox.com
Date: Sat, 27 Dec 2003 14:21:40 -0700 (MST)
Subject: Re: Serial driver problems with 5.2-current

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