Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2006 14:58:13 -0800
From:      Sean Shapira <sds@jazzie.com>
To:        freebsd-drivers@freebsd.org
Subject:   if_ed_isa.c change to support pnp on compaq lte dock
Message-ID:  <43C98205.70002@jazzie.com>

next in thread | raw e-mail | index | archive | help
This is regarding 5.4-RELEASE-p9 running on a Compaq LTE (Pentium-based) 
laptop connected to a docking station.  A patch for if_ed_isa.c is 
included below.  The Compaq LTE docking station includes an 
ne2000-compatible ethernet interface, and using device.hints that match 
the port and irq configured in the bios works just fine when booting 
from a powered-off state.
But when doing a warm boot with the same device.hints, the system hangs 
when it attempts to probe the ed.0 device.  The hints used are:

	hint.ed.0.at="isa"
	hint.ed.0.port="0x340"
	hint.ed.0.irq="11"
	hint.ed.0.maddr="0xd8000"
	hint.ed.0.disabled="0"

The system has a plug-n-play bios that knows about this device:

	PNP8160: adding irq mask 0x800
	PNP8160: adding io range 0x340-0x35f, size=0x20, align=0x20
	pnpbios: handle 21 device ID PNP8160 (6081d041)

But the ed driver in 5.4-RELEASE doesn't attach to it automatically.
I made the obvious change, adding the device id to the table:

*** if_ed_isa.c 2006/01/13 19:23:23     1.1
--- if_ed_isa.c 2006/01/13 19:25:18
***************
*** 59,64 ****
--- 59,65 ----
         { 0x0090252a,   NULL },         /* JQE9000 */
         { 0x0020832e,   NULL },         /* KTC2000 */
         { 0x4cf48906,   NULL },         /* ATIf44c */
+       { 0x6081d041,   NULL },         /* PNP8160 */
         { 0,            NULL }
   };

After removing the device.hints, the system now reports:
ed0: <PNP8160> at port 0x340-0x35f irq 11 on isa0
both on cold boots and warm restarts, and does not hang.  Hurray!

Was there a better way to accomplish this?  If no, can the change to add 
this device id get incorporated into future FreeBSD releases?

-- 
Sean Shapira    sds@jazzie.com



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