From owner-freebsd-stable@FreeBSD.ORG Sat Oct 31 16:42:25 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D140106568F for ; Sat, 31 Oct 2009 16:42:25 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 300928FC0C for ; Sat, 31 Oct 2009 16:42:24 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=RI7NlYPrrqxai-UJNEMA:9 a=Q0WJdE86aX7CkBoouuwA:7 a=VSWCtUXUGdEcwsccAE3wcmrcC1kA:4 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1317032551; Sat, 31 Oct 2009 16:42:22 +0100 From: Hans Petter Selasky To: Dimitry Andric Date: Sat, 31 Oct 2009 16:43:35 +0100 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <4AEC3823.9000204@andric.com> <4AEC4F81.7010404@andric.com> In-Reply-To: <4AEC4F81.7010404@andric.com> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910311643.36862.hselasky@c2i.net> Cc: freebsd-stable@freebsd.org, Andrew Thompson Subject: Re: Console has no name? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Oct 2009 16:42:25 -0000 On Saturday 31 October 2009 15:53:53 Dimitry Andric wrote: > On 2009-10-31 14:14, Dimitry Andric wrote: > > Somewhere between r198312 and r198702 I started getting this message > > during boot, on a machine using serial console: > > > > WARNING: console at 0xc093cea0 has no name > > Okay, this seems to be caused by r198655, which is an MFC of r197570, > where experimental support for USB serial console was added. > > However, the consdev::cn_name field is never initialized in > usb_serial.c, whereas this does happen in other console drivers. > > There doesn't seem to be a consensus whether this field needs to be > initialized in the _cnprobe() or _cninit() functions: I count 9 instances > of initialization in the former, and 3 in the latter. Is there a > preferred way? > > Since _cnprobe seems more popular, I propose the following fix: > > Index: sys/dev/usb/serial/usb_serial.c > =================================================================== > --- sys/dev/usb/serial/usb_serial.c (revision 198702) > +++ sys/dev/usb/serial/usb_serial.c (working copy) > @@ -1301,6 +1301,7 @@ static void > ucom_cnprobe(struct consdev *cp) > { > cp->cn_pri = CN_NORMAL; > + strlcpy(cp->cn_name, "ucom", sizeof cp->cn_name); > } > > static void Patch looks fine by me. --HPS