Re: Serial driver problems with 5.2-current

From: M. Warner Losh <imp_at_bsdimp.com>
Date: Sat, 27 Dec 2003 10:04:17 -0700 (MST)
In message: <1072530641.b36949c0dhee_at_myrealbox.com>
            "Dheeraj" <dhee_at_myrealbox.com> writes:
: Hello Warner.
: 
: I got a little further ahead or maybe not.
: i just put in a bunch of printf's and noticed that it goes into an infinite loop. in
: 
: srs/sys/dev/sio.c
: 
: siointr1(struct com_s com) 
: {
: 
: in the 2nd while loop
:  while(line_status & LSR_RCV_MASK) {
:        /*break/unattached error bits or real input?*/
:    ----
:     ---
:  }
: }

: so it never comes out of this loop and the machine just hangs. i
: could also point to some more details if i were able to see the
: 'printfs' properly, right now i can see the scrreen scroll so fast
: that i can't make anything out of it. and as i said earlier i cannot
: break into the debugger. (i know only two ways of it, ctrl-alt-esc
: and sysctl, if there is anything else i can try out i shall try)

Very interesting.  You are attaching to a uart that potentially isn't
there for reasons unknown.  Not sure which interrupt is involved (we
should make a ddb command show active interrupts).

Please try this patch and report back what it says.

Warner

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 17:02:03 -0000
_at__at_ -35,7 +35,7 _at__at_
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.416 2003/11/17 07:21:19 bde Exp $");
 
 #include "opt_comconsole.h"
 #include "opt_compat.h"
_at__at_ -1794,7 +1794,11 _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;
+		}
 		/* input event? (check first to help avoid overruns) */
 		while (line_status & LSR_RCV_MASK) {
 			/* break/unnattached error bits or real input? */
Received on Sat Dec 27 2003 - 08:04:38 UTC

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