Subject: Re: AIC7899-related problems in 1.5.2 & -current
To: Johnny Lam <jlam@jgrind.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: netbsd-help
Date: 11/30/2001 17:27:20
--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Fri, Nov 30, 2001 at 05:15:05AM -0800, Johnny Lam wrote:
> Hi,
> 
> 	I have a Dell PowerEdge 1550 on which I'm unable to install NetBSD
> 1.5.2.  The machine has two AIC-7899 SCSI adapters, and on the first is an
> UltraWide SCSI backplane (SCSI ID 6) that connects to three SCSI drives
> (SCSI IDs 1-3); the second adapter doesn't connect to anything.  During the
> boot of the install kernel on the 1.5.2 installation CD (from the ISO image
> from the NetBSD FTP server), the two SCSI adapters aren't attached properly.
> I've included a copy of the dmesg from the 1.5.2 INSTALL kernel below.
> Note the two ahc* lines that return with an error that looks like:
> 
> 	ahc1 at pci3 dev 5 function 0: unable to map registers

This is a known problem with the Serverworks chipset (I think it's a chipset
bug, a flag being set to 0 in a config register when it should be 1 or
something like this) which is solved in -current.
The fix is quite simple and it may already have been pulled up
to the 1.5 branch. Patch attached (note that I didn't try it on the 1.5 branch
though :)

> 
> The FreeBSD 4.4 installation CD and the MS Windows 2000 Server Installation
> CD are both able to boot and attach the three drives.
> 
> 	I've also included the dmesg from booting the installation floppies
> from the 20011111-1.5Y i386 snapshot.  That, too has some odd lines
> concerning the attaching of the three SCSI drives that look like:
> 
> 	probe(ahc1:0:0:1): invalid return code from adapter: 3

This seems to be when probing the nonexitent LUNs of the device.
I don't know where this comes from but I think it's harmless (these
disks may just have an uncommon behavior when talking to LUNs other
than 0, that the ahc driver doesn't handle very well).

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--

--45Z9DzgjV8m4Oswq
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pchb.diff"

Index: pchb.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/i386/pci/pchb.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- pchb.c	2001/09/10 10:54:46	1.25
+++ pchb.c	2001/09/12 08:25:17	1.26
@@ -1,4 +1,4 @@
-/*	$NetBSD: pchb.c,v 1.25 2001/09/10 10:54:46 fvdl Exp $	*/
+/*	$NetBSD: pchb.c,v 1.26 2001/09/12 08:25:17 fvdl Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1998, 2000 The NetBSD Foundation, Inc.
@@ -113,10 +113,11 @@
 	pcireg_t bcreg;
 	u_char bdnum, pbnum;
 	pcitag_t tag;
-	int doattach;
+	int doattach, attachflags;
 
 	printf("\n");
 	doattach = 0;
+	attachflags = pa->pa_flags;
 
 	/*
 	 * Print out a description, and configure certain chipsets which
@@ -138,6 +139,16 @@
 		 * 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,7 +259,7 @@
 		pba.pba_memt = pa->pa_memt;
 		pba.pba_dmat = pa->pa_dmat;
 		pba.pba_bus = pbnum;
-		pba.pba_flags = pa->pa_flags;
+		pba.pba_flags = attachflags;
 		pba.pba_pc = pa->pa_pc;
 		config_found(self, &pba, pchb_print);
 	}

--45Z9DzgjV8m4Oswq--