Serial driver problems with 5.2-current
M. Warner Losh
imp at bsdimp.com
Sat Dec 27 09:04:38 PST 2003
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
-------------- next part --------------
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
@@ -35,7 +35,7 @@
*/
#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"
@@ -1794,7 +1794,11 @@
}
}
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? */
More information about the freebsd-current
mailing list