Subject: qfe, dual wm not working in pc164, any ideas?
To: None <port-alpha@netbsd.org, port-sparc@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: port-sparc
Date: 01/16/2005 18:37:06
i figured i'd add a qfe card (a sun pci card that's a ppb with four
hme interfaces on it) and a dual gig ether (2 x wm) to my alpha, since
i need more interfaces. sadly, neither of them works too well.
after adding DEBUG_EXTENT and a few of my own printfs, i got this
output from dmesg:
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
ppb0 at pci0 dev 6 function 0: Digital Equipment DC21153 PCI-PCI Bridge (rev. 0x04)
pci1 at ppb0 bus 1
pci1: memory space enabled, rd/line, wr/inv ok
ebus0 at pci1 dev 0 function 0: Sun Microsystems PCIO Ebus2, revision 0x01
hme0 at pci1 dev 0 function 1: Sun Happy Meal Ethernet, rev. 1
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 0, 8000, 0, 0xfffffc00001833c0) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x0 to 0x7fff
mem: need dense, need sparse
../../../../dev/pci/pci_map.c:299: bus_space_map() succeeded
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 89000000, 1000000, 5, 0xfffffc00001833c0) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x89000000 to 0x89ffffff
mem: need dense, want sparse
../../../../dev/pci/pci_map.c:299: bus_space_map() succeeded
mem: freeing handle 0xfffffc8689000000 for 0x1000000
mem: it's at 0x89000000 (dense, sparse)
hme0: interrupting at eb164 irq 0
hme0: hme_stop: reset failed
hme0: Ethernet address 08:00:20:c7:7c:34
ebus1 at pci1 dev 1 function 0: Sun Microsystems PCIO Ebus2, revision 0x01
hme1 at pci1 dev 1 function 1: Sun Happy Meal Ethernet, rev. 1
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 0, 8000, 0, 0xfffffc00001833c0) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x0 to 0x7fff
mem: need dense, need sparse
mem: failed to get dense (35)
mem: failed to get sparse (35)
mem: failed
extent `cia_swiz_bus_dmem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x100000000 - 0xfffffffffffffffe
extent `cia_swiz_bus_smem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x4000000 - 0x7fffffff
0xa8000000 - 0xfffffffffffffffe
hme1: unable to map device registers
ebus2 at pci1 dev 2 function 0: Sun Microsystems PCIO Ebus2, revision 0x01
hme2 at pci1 dev 2 function 1: Sun Happy Meal Ethernet, rev. 1
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 0, 8000, 0, 0xfffffc00001833c0) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x0 to 0x7fff
mem: need dense, need sparse
mem: failed to get dense (35)
mem: failed to get sparse (35)
mem: failed
extent `cia_swiz_bus_dmem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x100000000 - 0xfffffffffffffffe
extent `cia_swiz_bus_smem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x4000000 - 0x7fffffff
0xa8000000 - 0xfffffffffffffffe
hme2: unable to map device registers
ebus3 at pci1 dev 3 function 0: Sun Microsystems PCIO Ebus2, revision 0x01
hme3 at pci1 dev 3 function 1: Sun Happy Meal Ethernet, rev. 1
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 0, 8000, 0, 0xfffffc00001833c0) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x0 to 0x7fff
mem: need dense, need sparse
mem: failed to get dense (35)
mem: failed to get sparse (35)
mem: failed
extent `cia_swiz_bus_dmem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x100000000 - 0xfffffffffffffffe
extent `cia_swiz_bus_smem' (0x0 - 0xffffffffffffffff), flags = 0x1
0x0 - 0x7fff
0x4000000 - 0x7fffffff
0xa8000000 - 0xfffffffffffffffe
hme3: unable to map device registers
wm0 at pci0 dev 7 function 0: Intel i82546EB 1000BASE-T Ethernet, rev. 1
../../../../dev/pci/pci_map.c:290: [0] got tag fffffc00006c6478, calling bus_space_map(0xfffffc00006c6478, 8c020000, 20000, 0, 0xfffffc0000183860) -> 0xfffffc00005a4ff0(0xfffffc00006c62f8)
mem: allocating 0x8c020000 to 0x8c03ffff
mem: need dense, need sparse
../../../../dev/pci/pci_map.c:299: bus_space_map() succeeded
../../../../dev/pci/pci_map.c:290: [1] got tag fffffc00006c6300, calling bus_space_map(0xfffffc00006c6300, 10080, 40, 0, 0xfffffc0000183860) -> 0xfffffc00005a3690(0xfffffc00006c62f8)
io: allocating 0x10080 to 0x100bf
../../../../dev/pci/pci_map.c:299: bus_space_map() succeeded
wm0: interrupting at eb164 irq 1
wm0: Ethernet address 00:07:e9:17:fd:60
makphy0 at wm0 phy 1: Marvell 88E1011 Gigabit PHY, rev. 3
makphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
wm1 at pci0 dev 7 function 1: Intel i82546EB 1000BASE-T Ethernet, rev. 1
wm1: unable to map device registers
-------8<-------8<-------8<-------8<-------8<-------8<-------8<-------
so...it appears that bus_space_map() is called to map the same region
four times, once for each hme. given that none of them is unmapped,
it fails for the subsequent three interfaces.
fwiw, i was told that the alpha didn't need the ebus devices, so i
wrote a stub driver that merely matches and attaches them (but does
nothing else) so that i wouldn't get distracted by the "device not
configured" lines.
anyone got any ideas as to where the problem might be, or how to fix
it?
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
werdna@squooshy.com * "information is power -- share the wealth."