Subject: Re: kern/31245: Adaptec 1460 pcmcia support (aic) broken
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Martin Husemann <martin@duskware.de>
List: netbsd-bugs
Date: 08/22/2007 10:45:02
The following reply was made to PR kern/31245; it has been noted by GNATS.

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/31245: Adaptec 1460 pcmcia support (aic) broken
Date: Wed, 22 Aug 2007 12:43:53 +0200

 On Wed, Aug 22, 2007 at 12:05:07AM +0000, djb_netbsd@charter.net wrote:
 >  This simple patch to pccbb.c can be used instead:
 >  
 >  --- dev/pci/pccbb.c.orig	2007-08-21 17:54:01.000000000 -0500
 >  +++ dev/pci/pccbb.c	2007-08-21 17:52:20.000000000 -0500
 >  @@ -1975,7 +1981,7 @@
 >   #if rbus
 >   	rbus_tag_t rb;
 >   #endif
 >  -	if (align == 0) {
 >  +	if ((align == 0) || (align == 0x400)) {
 >   		align = size;	       /* XXX: funny??? */
 >   	}
 
 Wouldn't something like
 
 	if (start != 0)
 		align &= 0x3ff;
 
 and leaving the test == 0 be better? The code only seems to maks to 10 bits
 if start != 0.
 
 Martin