From nobody@FreeBSD.org  Tue Apr  6 20:11:43 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8775816A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Apr 2004 20:11:43 -0700 (PDT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 81CCB43D1D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  6 Apr 2004 20:11:43 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i373AP72010754
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 6 Apr 2004 20:10:25 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i373APrI010753;
	Tue, 6 Apr 2004 20:10:25 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200404070310.i373APrI010753@www.freebsd.org>
Date: Tue, 6 Apr 2004 20:10:25 -0700 (PDT)
From: Stephan Uphoff <ups@tree.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sio: kgdb debugger port initialization destroys default serial console speed
X-Send-Pr-Version: www-2.3

>Number:         65278
>Category:       kern
>Synopsis:       [sio] [patch] kgdb debugger port initialization destroys default serial console speed
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ups
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 06 20:20:19 PDT 2004
>Closed-Date:    Tue Dec 04 21:19:03 PST 2007
>Last-Modified:  Wed Dec  5 05:20:01 UTC 2007
>Originator:     Stephan Uphoff
>Release:        current
>Organization:
>Environment:
N/A
>Description:
kgdb debugger port initialization in sio.c destroys default 
serial console baud rate (comdefaultrate) if booted using a 
serial console ( boothowto & RB_SERIAL).

>How-To-Repeat:
Use sio0 as console and sio1 as kgdb port.
Boot using the serial console.

After boot-up comdefaultrate will contain an arbitrary value based on
the state of the divisor of the gdb remote port.

>Fix:
Restrict comdefaultrate changes to console ports.


==== //depot/tree/orca/src/sys/dev/sio/sio.c#2 - /usr/develop/tree/orca/src/sys/dev/sio/sio.c ====
@@ -2945,7 +2945,7 @@
 				continue;
 			iobase = port;
 			s = spltty();
-			if (boothowto & RB_SERIAL) {
+			if ((boothowto & RB_SERIAL) && COM_CONSOLE(flags)) {
 				boot_speed =
 				    siocngetspeed(iobase, comdefaultrclk);
 				if (boot_speed)

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ups 
Responsible-Changed-By: kris 
Responsible-Changed-When: Sat Apr 9 00:51:04 GMT 2005 
Responsible-Changed-Why:  
Submitter is now a committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=65278 
State-Changed-From-To: open->closed 
State-Changed-By: julian 
State-Changed-When: Tue Dec 4 21:17:19 PST 2007 
State-Changed-Why:  
This patch allowed me to debug again (praise the lord) 
so I committed it. MFC whenever possible.  

http://www.freebsd.org/cgi/query-pr.cgi?pr=65278 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/65278: commit references a PR
Date: Wed,  5 Dec 2007 05:17:01 +0000 (UTC)

 julian      2007-12-05 05:16:56 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/dev/sio          sio.c 
   Log:
   Stop serial console and gdb serial port from getting all screwed up.
   PR: 65278
   MFC in: 3 days
   Submitted by: ups@
   
   Revision  Changes    Path
   1.472     +1 -1      src/sys/dev/sio/sio.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
