Subject: Problems with Xircom CreditCard Ethernet+Modem 33.6 (pcmcia)
To: None <current-users@netbsd.org>
From: Tuomas Silen <tuomas.silen@kolumbus.fi>
List: current-users
Date: 10/01/2001 01:24:28
Hi,

My Xircom CreditCard Ethernet+Modem 33.6 seems not to work on NetBSD.
(I've tried 1.5.2 and 1.5Y)

The product id of my card is 0x110c, which isn't on pcmciadevs.h,
but there is a similar card with id 0x110b, so i changed the id from
0x110b to 0x110c.. (not sure if it affected anything, tho)
The card and xi are found, but i guess it can't figure out or set
the media or something..

ifconfig xi0 says 'media: autodetect (none)' and when i try to set it
manually (ifconfig xi0 media 10baseT) it says 'SIOCSIFMEDIA: Invalid
argument'.

ifconfig xi -m says 'SIOCGIFFLAGS xi: Device not configured'

I also tried to hack the driver a bit and changed IFM_AUTO to
IFM_10_T (tried to force the media to 10baseT). I'm a poor programmer
and have no idea how that driver should work, so this might have broken
something else, but after this the card actually started working a bit
more.. I got the green light and ifconfig was able to set the ip, etc.
and said that the media was Ethernet 10baseT (none).
I was also able to ping the local ip, but when i tried to ping ie. my
gateway I only got xi0: device timeout and the card was reset..

So if somebody who knows how the driver works could try to figure out
what's wrong and maybe fix it or give some advice what to do, it would
be appreciated.


Thanks in advance,

Tuomas Silen
tuomas.silen@kolumbus.fi

-----------------------------------------------------------------------
Here is my dmesg, etc, when if_xi.c is still original:
(XIDEBUG, etc. are enabled.)

NetBSD 1.5Y (ASGARD) #0: Sun Sep 30 21:28:52 EEST 2001
    devastor@vasara:/usr/home/devastor/src/sys/arch/i386/compile/ASGARD
cpu0: Intel 486DX (486-class)
total memory = 8000 KB
avail memory = 5392 KB
using 125 buffers containing 500 KB of memory
mainbus0 (root)
isa0 at mainbus0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
wdc0 at isa0 port 0x1f0-0x1f7 irq 14
wd0 at wdc0 channel 0 drive 0: <TOSHIBA MK2326FCH>
wd0: drive supports 16-sector PIO transfers, chs addressing
wd0: 324 MB, 969 cyl, 14 head, 49 sec, 512 bytes/sect x 664734 sectors
vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
wsdisplay0 at vga0: console (80x25, vt100 emulation), using wskbd0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000-0xdffff
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has no sockets
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
pcic1 at isa0 port 0x3e2-0x3e3 iomem 0xe0000-0xe3fff
pcic1: controller 0 (Intel 82365SL Revision 1) has no sockets
pcic1: controller 1 (Intel 82365SL Revision 1) has no sockets
isapnp0: no ISA Plug 'n Play devices found
biomask ff6d netmask ff6d ttymask ffef
pcic0: controller 0 detecting irqs with mask 0xdeb8:..3..5..9..10
pcic0: using irq 3 for socket events
pcic1: using irq 5 for socket events
IPsec: Initialized Security Association Processing.
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: Xircom, CreditCard Ethernet+Modem 33.6, CEM33, 1.00
pcmcia0: Manufacturer code 0x105, product 0x110c
pcmcia0: function 0: network adapter, ccr addr 800 mask 3
pcmcia0: function 0, config table entry 1: I/O card; irq mask 8ebc; iomask
a, iospace 3f8-3ff; memspace 0-1fff; mwait_required rdybsy_active io8 io16
irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 2: I/O card; irq mask 8ebc; iomask
a, iospace 2f8-2ff; memspace 0-1fff; mwait_required rdybsy_active io8 io16
irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 35: I/O card; irq mask 8ebc;
iomask a, iospace 3e8-3ef; memspace 0-1fff; mwait_required rdybsy_active
io8 io16 irqpulse irqlevel powerdown
pcmcia0: function 0, config table entry 36: I/O card; irq mask 8ebc;
iomask a, iospace 2e8-2ef; memspace 0-1fff; mwait_required rdybsy_active
io8 io16 irqpulse irqlevel powerdown
xi0 at pcmcia0 function 0 port 0x400-0x40fxi_pcmcia_manfid_callback()
xi_pcmcia_manfid_callback()
xi_pcmcia_manfid_callback()
xi_pcmcia_manfid_callback()
xi_pcmcia_manfid_callback()
product=0x1144
: Xircom CreditCard Ethernet + Modem 33
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi_pcmcia_lan_nid_ciscallback()
xi0: Ethernet address 00:80:c7:be:54:99
xi_full_reset()
xi_cycle_power()
xi_set_address()
xi_mdi_read: phy 0 reg 1 -> 0
xi: bmsr 0
xi_mdi_read: phy 0 reg 1 -> 0
xi_mdi_read: phy 1 reg 1 -> 0
xi_mdi_read: phy 2 reg 1 -> 0
xi_mdi_read: phy 3 reg 1 -> 0
xi_mdi_read: phy 4 reg 1 -> 0
xi_mdi_read: phy 5 reg 1 -> 0
xi_mdi_read: phy 6 reg 1 -> 0
xi_mdi_read: phy 7 reg 1 -> 0
xi_mdi_read: phy 8 reg 1 -> 0
xi_mdi_read: phy 9 reg 1 -> 0
xi_mdi_read: phy 10 reg 1 -> 0
xi_mdi_read: phy 11 reg 1 -> 0
xi_mdi_read: phy 12 reg 1 -> 0
xi_mdi_read: phy 13 reg 1 -> 0
xi_mdi_read: phy 14 reg 1 -> 0
xi_mdi_read: phy 15 reg 1 -> 0
xi_mdi_read: phy 16 reg 1 -> 0
xi_mdi_read: phy 17 reg 1 -> 0
xi_mdi_read: phy 18 reg 1 -> 0
xi_mdi_read: phy 19 reg 1 -> 0
xi_mdi_read: phy 20 reg 1 -> 0
xi_mdi_read: phy 21 reg 1 -> 0
xi_mdi_read: phy 22 reg 1 -> 0
xi_mdi_read: phy 23 reg 1 -> 0
xi_mdi_read: phy 24 reg 1 -> 0
xi_mdi_read: phy 25 reg 1 -> 0
xi_mdi_read: phy 26 reg 1 -> 0
xi_mdi_read: phy 27 reg 1 -> 0
xi_mdi_read: phy 28 reg 1 -> 0
xi_mdi_read: phy 29 reg 1 -> 0
xi_mdi_read: phy 30 reg 1 -> 0
xi_mdi_read: phy 31 reg 1 -> 0
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
xi_ioctl()
xi_mediastatus()
xi_ioctl()
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0

(notice: there is no xi_init() )
-----------

# ifconfig xi0
xi0: flags=822<BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
xi_ioctl()
xi_ioctl()
	address: 00:80:c7:be:54:99
xi_ioctl()
xi_mediastatus()
xi_ioctl()
xi_mediastatus()
	media: Ethernet autoselect (none)

asgard# ifconfig xi0 media 10baseT
xi_ioctl()
xi_mediastatus()
xi_ioctl()
ifconfig: SIOCSIFMEDIA: Invalid argument

and here's the same with my 'hack':

dmesg:

----snip----
xi_mdi_read: phy 29 reg 1 -> 0
xi_mdi_read: phy 30 reg 1 -> 0
xi_mdi_read: phy 31 reg 1 -> 0
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs
xi_ioctl()
xi_mediastatus()
xi_ioctl()
xi_mediastatus()
xi_ioctl()
xi_ether_ioctl()
xi_init()
xi_pcmcia_enable()
pcmcia0: card irq 3
xi_full_reset()
xi_cycle_power()
xi_set_address()
xi_set_address()
xi_start()
xi_ioctl()
xi_set_address()
xi_ioctl()
xi_ether_ioctl()
xi_init()
xi_set_address()
xi_ioctl()
xi_set_address()
xi_ioctl()
xi_set_address()
xi_start()
xi_start()
xi0: device timeout
xi_reset()
xi_stop()
xi_full_reset()
xi_cycle_power()
xi_set_address()
xi_init()
xi_set_address()
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)
wsmux1: connecting to wsdisplay0
----snip----

--------------------
# ifconfig xi0
xi0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
xi_ioctl()
xi_ioctl()
	address: 00:80:c7:be:54:99
xi_ioctl()
xi_mediastatus()
xi_ioctl()
xi_mediastatus()
	media: Ethernet 10baseT (none)
	inet 192.168.0.26 netmask 0xffffff00 broadcast 192.168.0.255
	inet6 fe80::280:c7ff:febe:5499%xi0 prefixlen 64 scopeid 0x8

# ifconfig xi -m
ifconfig: SIOCGIFFLAGS xi: Device not configured

# ifconfig xi0 media 10baseT
xi_ioctl()
xi_mediastatus()
xi_ioctl()

# ifconfig xi0 media auto
xi_ioctl()
xi_mediastatus()
xi_ioctl()
ifconfig: SIOCSIFMEDIA: Invalid argument

# ping 192.168.0.1
xi_start()
xi0: device timeout
xi_reset()
xi_stop()
xi_full_reset()
xi_cycle_power()
xi_set_address()
xi_init()
xi_set_address()
xi_start()
xi0: device timeout
...