Subject: Re: wi0 hassles on Dell 5000e.
To: Hayakawa Koichi <haya@ilink.sony.co.jp>
From: Simon Burge <simonb@wasabisystems.com>
List: tech-kern
Date: 01/18/2001 14:37:19
Hayakawa Koichi wrote:

> From: Simon Burge <simonb@wasabisystems.com>
> 
>  > It did work however if a cardbus ethernet card was already inserted
>  > before inserting the WaveLan.  Enabling all the cardbus-type DEBUG
>  > options led to discovering that when the card worked its IO ports were
>  > mapped at 0x2100:
>  > 
>  > 	pccbb_pcmcia_do_io_map win 0 addr 0x2100 size 0x40 width 16
>  > 
>  > and when it failed they were mapped at 0x2400:
>  > 
>  > 	pccbb_pcmcia_do_io_map win 0 addr 0x2400 size 0x40 width 16
> 
> snip...
> 
>  > Anyone got any ideas on what is actually wrong (why it doesn't work
>  > at a different IO address) and how to fix it properly?
> 
> Maybe io space around 0x2400 has already been used by
> another device which is not configured by NetBSD kernel.
> Maybe this device is a Graphic Accelerator.  Would you check
> it using scanpci command with -v option?

I've added the output of scanpci -v below.  I can't see any reference
to 0x2400.  The only mention of IOBASE is for the Intel 82443BX AGP at
0x2000.  There's also the BASE* I/O lines, where we have

 Intel 82371AB PIIX4 IDE
  BASE4     0x00001051  addr 0x00001050  I/O
 Intel 82371AB PIIX4 USB
  BASE4     0x00001061  addr 0x00001060  I/O
 ESS Tech Maestro 2E PCI Audio Accelerator
  BASE0     0x00001401  addr 0x00001400  I/O
 ATI Mobility M3 (AGP)
  BASE1     0x00002001  addr 0x00002000  I/O
 Xircom X3201-3 Fast Ethernet Controller (21143)
  BASE0     0x00002301  addr 0x00002300  I/O
 (modem on Xircom combo card)
  BASE0     0x00000001  addr 0x00000000  I/O

Perhaps the next question is why it tries 0x2400 for the WaveLan.  I
don't have another cardbus card (that fits with the WaveLan), but on
Luke's 5000e with a NetGear cardbus ethernet card already inserted it
does map the WaveLan to 0x2100 - I don't know if his cardbus enet card
appears at 0x2400 or not.  Luke mentioned that if he inserts the NetGear
it doesn't show up on the output of "scanpci -v".

Also, with the CBB_DEBUG, RBUS_DEBUG, CARDBUS_DEBUG, CARDBUS_MAP_DEBUG
and CARDSLOT_DEBUG options, there's no mention of "240" in dmesg except
when the WaveLan is inserted...

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD CDs, Support and Service:    http://www.wasabisystems.com/

----------------------------- scanpci -v output -----------------------------
pci bus 0x0 cardnum 0x00 function 0x0000: vendor 0x8086 device 0x7190
 Intel 82443BX Host
  STATUS    0x2210  COMMAND 0x0106
  CLASS     0x06 0x00 0x00  REVISION 0x03
  HEADER    0x00  LATENCY 0x40

pci bus 0x0 cardnum 0x01 function 0x0000: vendor 0x8086 device 0x7191
 Intel 82443BX AGP
  STATUS    0x0220  COMMAND 0x001f
  CLASS     0x06 0x04 0x00  REVISION 0x03
  HEADER    0x01  LATENCY 0x80
  PRIBUS    0x00  SECBUS 0x01  SUBBUS 0x01  SECLT 0x40
  IOBASE    0x2000  IOLIM 0x2fff  SECSTATUS 0x22a0
  NOPREFETCH_MEMBASE 0xf4000000  MEMLIM 0xf40fffff
  PREFETCH_MEMBASE   0xf8000000  MEMLIM 0xfbffffff
  FAST_B2B NO_SEC_BUS_RST NO_M_ABRT VGA_EN ISA_EN NO_PERR_EN

pci bus 0x0 cardnum 0x04 function 0x0000: vendor 0x104c device 0xac1c
 Texas Instruments  Device unknown
  STATUS    0x0210  COMMAND 0x0007
  CLASS     0x06 0x07 0x00  REVISION 0x01
  HEADER    0x82  LATENCY 0x10

pci bus 0x0 cardnum 0x04 function 0x0001: vendor 0x104c device 0xac1c
 Texas Instruments  Device unknown
  STATUS    0x0210  COMMAND 0x0007
  CLASS     0x06 0x07 0x00  REVISION 0x01
  HEADER    0x82  LATENCY 0x10

pci bus 0x0 cardnum 0x07 function 0x0000: vendor 0x8086 device 0x7110
 Intel 82371AB PIIX4 ISA
  STATUS    0x0280  COMMAND 0x000f
  CLASS     0x06 0x80 0x00  REVISION 0x02
  HEADER    0x80  LATENCY 0x00

pci bus 0x0 cardnum 0x07 function 0x0001: vendor 0x8086 device 0x7111
 Intel 82371AB PIIX4 IDE
  STATUS    0x0280  COMMAND 0x0005
  CLASS     0x01 0x01 0x80  REVISION 0x01
  BIST      0x00  HEADER 0x00  LATENCY 0x40  CACHE 0x00
  BASE4     0x00001051  addr 0x00001050  I/O
  BYTE_0    0xa307a307  BYTE_1  0x00  BYTE_2  0x00  BYTE_3  0x00

pci bus 0x0 cardnum 0x07 function 0x0002: vendor 0x8086 device 0x7112
 Intel 82371AB PIIX4 USB
  STATUS    0x0280  COMMAND 0x0005
  CLASS     0x0c 0x03 0x00  REVISION 0x01
  BIST      0x00  HEADER 0x00  LATENCY 0x40  CACHE 0x00
  BASE4     0x00001061  addr 0x00001060  I/O
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x04  INT_LINE 0x05

pci bus 0x0 cardnum 0x07 function 0x0003: vendor 0x8086 device 0x7113
 Intel 82371AB PIIX4 ACPI
  STATUS    0x0280  COMMAND 0x0003
  CLASS     0x06 0x80 0x00  REVISION 0x03

pci bus 0x0 cardnum 0x08 function 0x0000: vendor 0x125d device 0x1978
 Device unknown
 CardVendor 0x14c0 card 0x0011 (Card unknown)
  STATUS    0x0290  COMMAND 0x0005
  CLASS     0x04 0x01 0x00  REVISION 0x10
  BIST      0x00  HEADER 0x00  LATENCY 0x40  CACHE 0x00
  BASE0     0x00001401  addr 0x00001400  I/O
  MAX_LAT   0x18  MIN_GNT 0x02  INT_PIN 0x01  INT_LINE 0x05
  BYTE_0    0x907f  BYTE_1  0x00  BYTE_2  0x00  BYTE_3  0x00

pci bus 0x1 cardnum 0x00 function 0x0000: vendor 0x1002 device 0x4c46
 ATI Rage 128 Mobility LF
 CardVendor 0x14c0 card 0x0011 (Card unknown)
  STATUS    0x02b0  COMMAND 0x0287
  CLASS     0x03 0x00 0x00  REVISION 0x02
  BIST      0x00  HEADER 0x00  LATENCY 0x42  CACHE 0x08
  BASE0     0xf8000008  addr 0xf8000000  MEM PREFETCHABLE
  BASE1     0x00002001  addr 0x00002000  I/O
  BASE2     0xf4000000  addr 0xf4000000  MEM
  MAX_LAT   0x00  MIN_GNT 0x08  INT_PIN 0x01  INT_LINE 0x0b

pci bus 0x2 cardnum 0x00 function 0x0000: vendor 0x115d device 0x0003
 Device unknown
 CardVendor 0x115d card 0x1181 (Card unknown)
  STATUS    0x0210  COMMAND 0x0005
  CLASS     0x02 0x00 0x00  REVISION 0x03
  BIST      0x00  HEADER 0x80  LATENCY 0x20  CACHE 0x00
  BASE0     0x00002301  addr 0x00002300  I/O
  MAX_LAT   0x28  MIN_GNT 0x14  INT_PIN 0x01  INT_LINE 0xff

pci bus 0x2 cardnum 0x00 function 0x0001: vendor 0x115d device 0x0103
 Device unknown
 CardVendor 0x115d card 0x1181 (Card unknown)
  STATUS    0x0210  COMMAND 0x0000
  CLASS     0x07 0x00 0x02  REVISION 0x03
  BIST      0x00  HEADER 0x80  LATENCY 0x00  CACHE 0x00
  BASE0     0x00000001  addr 0x00000000  I/O
  MAX_LAT   0x00  MIN_GNT 0x00  INT_PIN 0x01  INT_LINE 0xff