Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Oct 1998 14:27:43 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@plutotech.com>
To:        jin@george.lbl.gov (Jin Guojun)
Cc:        se@mi.uni-koeln.de, bugs@FreeBSD.ORG
Subject:   Re: pciconf does not report unloaded devices under 3.x-RELEASE, as well as the kernel, which causes modload failure
Message-ID:  <199810192027.OAA24944@panzer.plutotech.com>
In-Reply-To: <199810191954.MAA07044@george.lbl.gov> from Jin Guojun at "Oct 19, 98 12:54:49 pm"

next in thread | previous in thread | raw e-mail | index | archive | help

--ELM908828863-24887-0_
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Jin Guojun wrote...
> STefan,
> 
> Under 3.0 RELEASE, the pciconf does not report these devices if there is
> no driver is loaded into the kernel for them. This causes the modload fails:
> 
> # modload -v -ezatm_mod /lkm/znatmdrv.o
> modload: error initializing module: Device not configured
> 
> 
> The 2.2.7 and 3.0 dmesg and pciconf output are appened at the end of this mail.
> The unused ISA devices are reported by dmesg on both systems, but not unused
> PCI devices are not reported under 3.0. 

I think unused PCI devices are reported if you boot with -v.

> I do not know if this is kernel issue or PCI probe issue.

[ ... ]

> FBSD3.x # pciconf -l
> 
> chip0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x12378086 rev=0x02 hdr=0x00
> chip1@pci0:1:0: class=0x060100 card=0x00000000 chip=0x70008086 rev=0x01 hdr=0x00
> ide_pci0@pci0:1:1:      class=0x010180 card=0x00000000 chip=0x70008086 rev=0x01 hdr=0x00
> chip2@pci0:1:2: class=0x0c0300 card=0x00000000 chip=0x70108086 rev=0x00 hdr=0x00
> ncr0@pci0:10:0: class=0x010000 card=0x00000000 chip=0x00031000 rev=0x03 hdr=0x00
> fxp0@pci0:11:0: class=0x020000 card=0x00018086 chip=0x12298086 rev=0x02 hdr=0x00
> 

Try the attached patch to src/usr.sbin/pciconf/pciconf.c and see if it
causes all of the devices to be printed out.

The PCI code in 3.0 is substantially different than the PCI code in the 2.x
tree.  The pciconf device listing code didn't work until I re-wrote it.

Anyway, let me know what the patched version of pciconf prints out.

Ken
-- 
Kenneth Merry
ken@plutotech.com

--ELM908828863-24887-0_
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: attachment; filename=pciconf.c.diffs
Content-Description: pciconf.c.diffs
Content-Transfer-Encoding: 7bit

==== //depot/cam/usr.sbin/pciconf/pciconf.c#12 - /usr/home/ken/perforce/cam/usr.sbin/pciconf/pciconf.c ====
*** /tmp/tmp.27776.0	Mon Oct 19 14:26:34 1998
--- /usr/home/ken/perforce/cam/usr.sbin/pciconf/pciconf.c	Mon Oct 19 14:25:28 1998
***************
*** 167,178 ****
  			return;
  		}
  		for (p = conf; p < &conf[pc.num_matches]; p++) {
- 			if ((p->pd_name == NULL) || (*p->pd_name == '\0'))
- 				continue;
  
  			printf("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08lx "
  			       "chip=0x%08lx rev=0x%02x hdr=0x%02x\n", 
! 			       p->pd_name, p->pd_unit, 
  			       p->pc_sel.pc_bus, p->pc_sel.pc_dev, 
  			       p->pc_sel.pc_func, (p->pc_class << 16) |
  			       (p->pc_subclass << 8) | p->pc_progif,
--- 167,177 ----
  			return;
  		}
  		for (p = conf; p < &conf[pc.num_matches]; p++) {
  
  			printf("%s%d@pci%d:%d:%d:\tclass=0x%06x card=0x%08lx "
  			       "chip=0x%08lx rev=0x%02x hdr=0x%02x\n", 
! 			       (p->pd_name && *p->pd_name) ? p->pd_name :
! 			       "none", p->pd_unit, 
  			       p->pc_sel.pc_bus, p->pc_sel.pc_dev, 
  			       p->pc_sel.pc_func, (p->pc_class << 16) |
  			       (p->pc_subclass << 8) | p->pc_progif,

--ELM908828863-24887-0_--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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