Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Mar 2009 19:10:17 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r189421 - head/sys/isa
Message-ID:  <200903051910.n25JAHUb096975@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Thu Mar  5 19:10:17 2009
New Revision: 189421
URL: http://svn.freebsd.org/changeset/base/189421

Log:
  Allow syscons to work on amd64 and i386 without any hints:
  - Enable keyboard autodetection by default for ISA syscons attachments.
  - If there are no syscons hints at all, assume there is a single sc0 device
    anyway.  The console probe will still fail unless a VGA adapter is found.
  
  MFC after:	2 weeks

Modified:
  head/sys/isa/syscons_isa.c

Modified: head/sys/isa/syscons_isa.c
==============================================================================
--- head/sys/isa/syscons_isa.c	Thu Mar  5 18:43:54 2009	(r189420)
+++ head/sys/isa/syscons_isa.c	Thu Mar  5 19:10:17 2009	(r189421)
@@ -101,7 +101,9 @@ scprobe(device_t dev)
 static int
 scattach(device_t dev)
 {
-	return sc_attach_unit(device_get_unit(dev), device_get_flags(dev));
+
+	return (sc_attach_unit(device_get_unit(dev), device_get_flags(dev) |
+	    SC_AUTODETECT_KBD));
 }
 
 static int
@@ -238,8 +240,10 @@ sc_get_cons_priority(int *unit, int *fla
 			*flags = f;
 		}
 	}
-	if (*unit < 0)
-		return CN_DEAD;
+	if (*unit < 0) {
+		*unit = 0;
+		*flags = 0;
+	}
 #if 0
 	return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL);
 #endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903051910.n25JAHUb096975>