Subject: Re: ahc: unable to map registers
To: Michael K. Sanders <msanders@confusion.net>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: current-users
Date: 09/11/2001 22:46:35
On Tue, Sep 11, 2001 at 01:01:21AM -0700, Michael K. Sanders wrote:
> pchb1 at pci0 dev 17 function 0
> pchb1: ServerWorks PCIHB5 (rev. 0x03)
> pci1 at pchb1 bus 1
> pci1: memory space enabled
[...]
> ahc0 at pci2 dev 4 function 0: unable to map registers
> ahc1 at pci2 dev 5 function 0: unable to map registers
Could you try the following patch to sys/arch/i386/pci/pchb.c? It
is a variation on a patch suggested by bliss22@nebulous.org, who
had the same problem. I first suspected we did some bad bus
enumeration, but looks like it's a simpler problem.
Index: pchb.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/pci/pchb.c,v
retrieving revision 1.25
diff -c -r1.25 pchb.c
*** pchb.c 2001/09/10 10:54:46 1.25
--- pchb.c 2001/09/11 20:40:31
***************
*** 113,122 ****
pcireg_t bcreg;
u_char bdnum, pbnum;
pcitag_t tag;
! int doattach;
printf("\n");
doattach = 0;
/*
* Print out a description, and configure certain chipsets which
--- 113,123 ----
pcireg_t bcreg;
u_char bdnum, pbnum;
pcitag_t tag;
! int doattach, attachflags;
printf("\n");
doattach = 0;
+ attachflags = pa->pa_flags;
/*
* Print out a description, and configure certain chipsets which
***************
*** 138,143 ****
--- 139,154 ----
* Configure it.
*/
doattach = 1;
+ switch (PCI_PRODUCT(pa->pa_id)) {
+ case PCI_PRODUCT_SERVERWORKS_XX5:
+ case PCI_PRODUCT_SERVERWORKS_CNB20HE:
+ case PCI_PRODUCT_SERVERWORKS_CIOB20:
+ if ((attachflags &
+ (PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED)) ==
+ PCI_FLAGS_MEM_ENABLED)
+ attachflags |= PCI_FLAGS_IO_ENABLED;
+ break;
+ }
break;
case PCI_VENDOR_INTEL:
***************
*** 248,254 ****
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
pba.pba_bus = pbnum;
! pba.pba_flags = pa->pa_flags;
pba.pba_pc = pa->pa_pc;
config_found(self, &pba, pchb_print);
}
--- 259,265 ----
pba.pba_memt = pa->pa_memt;
pba.pba_dmat = pa->pa_dmat;
pba.pba_bus = pbnum;
! pba.pba_flags = attachflags;
pba.pba_pc = pa->pa_pc;
config_found(self, &pba, pchb_print);
}
--
Frank van der Linden fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service. http://www.wasabisystems.com/