Re: Re: Serial driver problems with 5.2-current

From: Dheeraj <dhee_at_myrealbox.com>
Date: Sat, 27 Dec 2003 18:48:53 -0500
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
_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 - 14:48:54 UTC

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