From owner-freebsd-current@FreeBSD.ORG Fri Jan 27 18:48:37 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9539E1065673 for ; Fri, 27 Jan 2012 18:48:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4738FC16 for ; Fri, 27 Jan 2012 18:48:37 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id C6C1146B2D; Fri, 27 Jan 2012 13:48:36 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 543A0B979; Fri, 27 Jan 2012 13:48:36 -0500 (EST) From: John Baldwin To: aconnolly08@yahoo.co.jp Date: Fri, 27 Jan 2012 13:48:35 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <639642.41300.qm@web100410.mail.kks.yahoo.co.jp> In-Reply-To: <639642.41300.qm@web100410.mail.kks.yahoo.co.jp> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201201271348.35731.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 27 Jan 2012 13:48:36 -0500 (EST) Cc: "freebsd-current@freebsd.org" Subject: Re: atkbc not loaded with ACPI enabled in 9.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 18:48:37 -0000 On Saturday, January 21, 2012 12:11:54 am aconnolly08@yahoo.co.jp wrote: > > --- On Wed, 2012/1/18, John Baldwin wrote: > > On Friday, January 13, 2012 10:27:13 pm aconnolly08@yahoo.co.jp wrote: > > Please try this patch: > > > > Index: sys/dev/atkbdc/atkbdc_isa.c > > =================================================================== > > --- atkbdc_isa.c (revision 230009) > > +++ atkbdc_isa.c (working copy) > > @@ -87,6 +87,7 @@ static driver_t atkbdc_isa_driver = { > > > > static struct isa_pnp_id atkbdc_ids[] = { > > { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ > > + { 0x0320d041, "Keyboard controller (i8042)" }, /* PNP0320 */ > > { 0 } > > }; > > > > > > -- > > John Baldwin > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org > > John, > > Thanks for your help, but that patch doesn't appear to address the problem. > I edited the atkbdc_isa.c file as you instructed, rebuilt and installed my > kernel, but my integrated keyboard remains unresponsive with ACPI enabled. > > Here's the new output of dmesg -a http://pastebin.com/h6ahmD2ddevinfo -ur > http://pastebin.com/sdNcNEJUdevinfo -vr http://pastebin.com/P2yqQBLY > > Perhaps I was supposed to remove PNP0303 support? > > No, the goal was to get atkbdc to try to attach to PNP0320 devices since those > have your keyboard I/O ports. Can you add some printfs to atkbdc_isa_probe() > to see how many times it is getting past the ID check, and how far along it > gets in each cases (i.e. which failure case causes the probe routine to return > an error)? > > -- > John Baldwin > > > John, > > I added some printfs to the isa_probe() function to see how far it was getting. The function is called many times as you can see in the dmesg, but mostly it exits at the PnP ID check with ENXIO. > > At one point it gets further, but still exits with ENXIO when port0 is found to be NULL. > > Any suggestions for further investigation? > > edited function http://pastebin.com/uUsVLiz2 > dmesg -a http://pastebin.com/kDtC9gvM Hmm, so this looks like it is only getting past the ID check once and is not probing the 0320 device at all. Please try this patch with some different debugging printfs and let me know what you get as output during boot: Index: atkbdc_isa.c =================================================================== --- atkbdc_isa.c (revision 230585) +++ atkbdc_isa.c (working copy) @@ -87,6 +87,7 @@ static driver_t atkbdc_isa_driver = { static struct isa_pnp_id atkbdc_ids[] = { { 0x0303d041, "Keyboard controller (i8042)" }, /* PNP0303 */ + { 0x0320d041, "Keyboard controller (i8042)" }, /* PNP0320 */ { 0 } }; @@ -111,6 +112,9 @@ atkbdc_isa_probe(device_t dev) return ENXIO; device_set_desc(dev, "Keyboard controller (i8042)"); + if (isa_get_logicalid(dev) != 0) + device_printf(dev, "has PNP ID %s\n", + pnp_eisaformat(isa_get_logicalid(dev))); /* * Adjust I/O port resources. @@ -125,17 +129,25 @@ atkbdc_isa_probe(device_t dev) */ device_quiet(dev); rid = 0; - if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) + if (bus_get_resource(dev, SYS_RES_IOPORT, rid, &start, &count) != 0) { + device_printf(dev, "no I/O port resources\n"); return ENXIO; + } + device_printf(dev, "initial I/O port 0 is %x-%x\n", start, + start + count - 1); if (start == IO_KBD + KBD_STATUS_PORT) { start = IO_KBD; count++; } - if (count > 1) /* adjust the count and/or start port */ + if (count > 1) /* adjust the count and/or start port */ { + device_printf(dev, "setting rid 0 to %x-%x\n", start, start); bus_set_resource(dev, SYS_RES_IOPORT, rid, start, 1); + } port0 = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); - if (port0 == NULL) + if (port0 == NULL) { + device_printf(dev, "Failed to allocate I/O port rid 0\n"); return ENXIO; + } rid = 1; if (bus_get_resource(dev, SYS_RES_IOPORT, rid, NULL, NULL) != 0) bus_set_resource(dev, SYS_RES_IOPORT, 1, -- John Baldwin