What causes bus_alloc_resource() to fail?

From: Daniel Eischen <eischen_at_vigrid.com>
Date: Wed, 12 Jul 2006 00:07:11 -0400 (EDT)
I'm trying to add support for an ICH7-based audio device, but
bus_alloc_resource_any() is failing when it tries to allocate
the memory IO space.

ACPI dump is at:

   http://people.freebsd.org/~deischen/e1405.acpi.dump

src/sys/dev/sound/pci/ich.c diffs:

Index: ich.c
===================================================================
RCS file: /opt/FreeBSD/cvs/src/sys/dev/sound/pci/ich.c,v
retrieving revision 1.66
diff -u -r1.66 ich.c
--- ich.c	18 Jun 2006 14:14:41 -0000	1.66
+++ ich.c	9 Jul 2006 14:35:26 -0000
_at__at_ -56,6 +56,7 _at__at_
  #define INTEL_6300ESB	0x25a6	/* 6300ESB needs to be treated as ICH4 */
  #define INTEL_82801FB	0x266e	/* ICH6 needs to be treated as ICH4 */
  #define INTEL_82801GB	0x27de	/* ICH7 needs to be treated as ICH4 */
+#define	INTEL_82801G	0x27d8	/* ICH7 needs to be treaded as ICH4 ? */
  #define SIS_7012	0x7012	/* SiS 7012 needs special handling */
  #define NVIDIA_NFORCE	0x01b1
  #define NVIDIA_NFORCE2	0x006a
_at__at_ -98,6 +99,8 _at__at_
  		"Intel ICH6 (82801FB)" },
  	{ INTEL_VENDORID,	INTEL_82801GB,	PROBE_LOW,
  		"Intel ICH7 (82801GB)" },
+	{ INTEL_VENDORID,	INTEL_82801G,	PROBE_LOW,
+		"Intel ICH7 (82801G)" },
  	{ SIS_VENDORID,		SIS_7012,	0,
  		"SiS 7012" },
  	{ NVIDIA_VENDORID,	NVIDIA_NFORCE,	0,
_at__at_ -693,7 +696,7 _at__at_
  		if (sc->vendor == INTEL_VENDORID && (
  		    sc->devid == INTEL_82801DB || sc->devid == INTEL_82801EB ||
  		    sc->devid == INTEL_6300ESB || sc->devid == INTEL_82801FB ||
-		    sc->devid == INTEL_82801GB)) {
+		    sc->devid == INTEL_82801GB || sc->devid == INTEL_82801G)) {
  			sc->flags |= IGNORE_PCR;
  			device_printf(sc->dev, "primary codec not ready!\n");
  		}
_at__at_ -781,7 +784,8 _at__at_
  	 */
  	if (vendor == INTEL_VENDORID && (devid == INTEL_82801DB ||
  	    devid == INTEL_82801EB || devid == INTEL_6300ESB ||
-	    devid == INTEL_82801FB || devid == INTEL_82801GB)) {
+	    devid == INTEL_82801FB || devid == INTEL_82801GB ||
+	    devid == INTEL_82801G)) {
  		sc->nambarid = PCIR_MMBAR;
  		sc->nabmbarid = PCIR_MBBAR;
  		sc->regtype = SYS_RES_MEMORY;


# kldload /boot/kernel/snd_ich.ko
pci0: driver added
found-> vendor=0x8086, dev=0x27d8, revid=0x01
         bus=0, slot=27, func=0
         class=04-03-00, hdrtype=0x00, mfdev=0
         cmdreg=0x0106, statreg=0x0010, cachelnsz=16 (dwords)
         lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
         intpin=a, irq=21
         powerspec 2  supports D0 D3  current D0
         MSI supports 1 message, 64 bit
pci0:27:0: reprobing on driver added
pcm0: <Intel ICH7 (82801G)> mem 0xdfebc000-0xdfebffff irq 21 at device 27.0 on 
pci0
pcm0: unable to map IO port space
device_attach: pcm0 attach returned 6

# pciconf -lv
hostb0_at_pci0:0:0:        class=0x060000 card=0x01d81028 chip=0x27a08086 rev=0x03 
hdr=0x00
     vendor   = 'Intel Corporation'
     class    = bridge
     subclass = HOST-PCI
vgapci0_at_pci0:2:0:       class=0x030000 card=0x01d81028 chip=0x27a28086 rev=0x03 
hdr=0x00
     vendor   = 'Intel Corporation'
     class    = display
     subclass = VGA
vgapci1_at_pci0:2:1:       class=0x038000 card=0x01d81028 chip=0x27a68086 rev=0x03 
hdr=0x00
     vendor   = 'Intel Corporation'
     class    = display
pcm0_at_pci0:27:0: class=0x040300 card=0x01d81028 chip=0x27d88086 rev=0x01 hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) High Definition Audio'
     class    = multimedia
pcib1_at_pci0:28:0:        class=0x060400 card=0x00000040 chip=0x27d08086 rev=0x01 
hdr=0x01
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) PCI Express Root Port'
     class    = bridge
     subclass = PCI-PCI
pcib2_at_pci0:28:1:        class=0x060400 card=0x00000040 chip=0x27d28086 rev=0x01 
hdr=0x01
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) PCI Express Root Port'
     class    = bridge
     subclass = PCI-PCI
pcib3_at_pci0:28:3:        class=0x060400 card=0x00000040 chip=0x27d68086 rev=0x01 
hdr=0x01
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) PCI Express Root Port'
     class    = bridge
     subclass = PCI-PCI
uhci0_at_pci0:29:0:        class=0x0c0300 card=0x01d81028 chip=0x27c88086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) USB Universal Host Controller'
     class    = serial bus
     subclass = USB
uhci1_at_pci0:29:1:        class=0x0c0300 card=0x01d81028 chip=0x27c98086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) USB Universal Host Controller'
     class    = serial bus
     subclass = USB
uhci2_at_pci0:29:2:        class=0x0c0300 card=0x01d81028 chip=0x27ca8086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) USB Universal Host Controller'
     class    = serial bus
     subclass = USB
uhci3_at_pci0:29:3:        class=0x0c0300 card=0x01d81028 chip=0x27cb8086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) USB Universal Host Controller'
     class    = serial bus
     subclass = USB
ehci0_at_pci0:29:7:        class=0x0c0320 card=0x01d81028 chip=0x27cc8086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) USB 2.0 Enhanced Host Controller'
     class    = serial bus
     subclass = USB
pcib4_at_pci0:30:0:        class=0x060401 card=0x00000050 chip=0x24488086 rev=0xe1 
hdr=0x01
     vendor   = 'Intel Corporation'
     device   = '82801BAM/CAM/DBM (ICH2-M/3-M/4-M) Hub Interface to PCI Bridge'
     class    = bridge
     subclass = PCI-PCI
isab0_at_pci0:31:0:        class=0x060100 card=0x01d81028 chip=0x27b98086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801GBM (ICH7-M) LPC Interface Controller'
     class    = bridge
     subclass = PCI-ISA
atapci0_at_pci0:31:2:      class=0x010180 card=0x01d81028 chip=0x27c48086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801GBM/GHM (ICH7-M Family) Serial ATA Storage Controller'
     class    = mass storage
     subclass = ATA
none0_at_pci0:31:3:        class=0x0c0500 card=0x01d81028 chip=0x27da8086 rev=0x01 
hdr=0x00
     vendor   = 'Intel Corporation'
     device   = '82801G (ICH7 Family) SMBus Controller'
     class    = serial bus
     subclass = SMBus
none1_at_pci12:0:0:        class=0x028000 card=0x10208086 chip=0x42228086 rev=0x02 
hdr=0x00
     vendor   = 'Intel Corporation'
     class    = network
bfe0_at_pci2:0:0:  class=0x020000 card=0x01d81028 chip=0x170c14e4 rev=0x02 hdr=0x00
     vendor   = 'Broadcom Corporation'
     device   = 'BCM440x 100Base-TX Fast Ethernet'
     class    = network
     subclass = ethernet
fwohci0_at_pci2:1:0:       class=0x0c0010 card=0x01d81028 chip=0x08321180 rev=0x00 
hdr=0x00
     vendor   = 'Ricoh Co Ltd'
     class    = serial bus
     subclass = FireWire
none2_at_pci2:1:1: class=0x080501 card=0x01d81028 chip=0x08221180 rev=0x19 hdr=0x00
     vendor   = 'Ricoh Co Ltd'
     device   = 'SD Bus Host Adapter'
     class    = base peripheral
none3_at_pci2:1:2: class=0x088000 card=0x01d81028 chip=0x08431180 rev=0x01 hdr=0x00
     vendor   = 'Ricoh Co Ltd'
     class    = base peripheral
none4_at_pci2:1:3: class=0x088000 card=0x01d81028 chip=0x05921180 rev=0x0a hdr=0x00
     vendor   = 'Ricoh Co Ltd'
     device   = 'Memory Stick Bus Host Adapter'
     class    = base peripheral
none5_at_pci2:1:4: class=0x088000 card=0x01d81028 chip=0x08521180 rev=0x05 hdr=0x00
     vendor   = 'Ricoh Co Ltd'
     class    = base peripheral


-- 
DE
Received on Wed Jul 12 2006 - 02:07:12 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:58 UTC