Subject: Re: kern/31245: Adaptec 1460 pcmcia support (aic) broken
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 08/21/2007 17:40:02
The following reply was made to PR kern/31245; it has been noted by GNATS.

From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/31245: Adaptec 1460 pcmcia support (aic) broken
Date: Tue, 21 Aug 2007 18:38:15 +0100

 On Tue, Aug 21, 2007 at 03:35:02AM +0000, djb_netbsd@charter.net wrote:
 > The following reply was made to PR kern/31245; it has been noted by GNATS.
 > 
 > From: <djb_netbsd@charter.net>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: kern/31245: Adaptec 1460 pcmcia support (aic) broken
 > Date: Mon, 20 Aug 2007 21:51:42 -0400
 > 
 >  Possible work around!
 >  
 >  around line 771 of dev/pcmcia/pcmcia.c function pcmcia_config_alloc
 >  
 >  If align is equal to or greater than 0x400 then the io allocation is busted.
 >  
 >  For the case with the 1460 scsi card:
 >  pcmcia_config_alloc: io 0 start=340 length=20 align=400 skew=340
 >  -- and  --
 >  pccbb_pcmcia_do_io_map win 0 addr 0x4400 size 20 width 0
 >  
 >  The card only decodes 10 bits and starts at 0x140 or 0x340 not 0.  Access to io address 0x4400 above do not hit the card since the card is really at 0x4340 or 0x4740.
 >  
 >  Since pccbb.c masks the address to 10 bits, any alignment of 10 bits or more are meaningless on the PC architecture.
 
 FWIW the following usually applies to ISA IO address (pre PCI):
 
 Most ISA cards only decode 10 ioaddr bits.
 0x0-0x1ff are motherboard IO, 0x200-0x3ff ISA cards.
 'Motherboard' IO addresses with the top 4 bits non-zero are used for the
 'slot addressed' feature of the EISA bus, the relevant connector pin is
 actually on the ISA part of the connector and can be (and was) used by
 some ISA cards.
 
 Since the 'normal' IO range is only 8 or 16 addresses, some cards used
 the upper bits (that would normally be address aliases) to select
 additional on-card peripherals without requiring large blocks of the
 limited IO space.
 
 	David
 
 -- 
 David Laight: david@l8s.co.uk