Subject: kern/23276: aic7xxx patch for cards without SEEPROM
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wileyc@rezrov.net>
List: netbsd-bugs
Date: 10/26/2003 12:42:34
>Number:         23276
>Category:       kern
>Synopsis:       aic7xxx driver tries to use leftover (bogus) BIOS settings for cards without SEEPROM.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 26 03:43:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Christopher SEKIYA
>Release:        NetBSD 1.6ZD
>Organization:

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)
>Environment:
	
	
System: NetBSD random 1.6ZD NetBSD 1.6ZD (GENERIC_IP32) #0: Sun Oct 26 11:08:41 JST 2003 wileyc@izu:/usr/builder/stable/sys/arch/sgimips/compile/GENERIC_IP32 sgimips
Architecture: mipseb
Machine: sgimips
>Description:

	ahc_check_extport() doesn't seem to do the right thing regarding
	cards without SEEPROMs -- it sets AHC_USEDEFAULTS, but does not
	set AHC_NO_BIOS_INIT.  This results in the driver attempting to
	use leftover BIOS settings, which (on the O2, at least) results in
	async/8.  fvdl states that it's probably safe to assume that cards
	without SEEPROMs also are without BIOS.  The attached one-line patch
	addresses the problem.
>How-To-Repeat:
	Compile a stock kernel from -current for the O2.
>Fix:
	This patch seems to DTRT:


Index: aic7xxx_seeprom.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/aic7xxx_seeprom.c,v
retrieving revision 1.8
diff -u -r1.8 aic7xxx_seeprom.c
--- aic7xxx_seeprom.c	2 May 2003 19:12:19 -0000	1.8
+++ aic7xxx_seeprom.c	26 Oct 2003 01:27:07 -0000
@@ -198,7 +198,7 @@
 	if (!have_seeprom) {
 		if (bootverbose)
 			printf("%s: No SEEPROM available.\n", ahc_name(ahc));
-		ahc->flags |= AHC_USEDEFAULTS;
+		ahc->flags |= AHC_USEDEFAULTS | AHC_NO_BIOS_INIT;
 		free(ahc->seep_config, M_DEVBUF);
 		ahc->seep_config = NULL;
 		sc = NULL;
>Release-Note:
>Audit-Trail:
>Unformatted: