Oops. Sorry Donald... Re: Help with tulip driver...

Paul Kronenwetter kronenpj@twcny.rr.com
Sat Dec 18 22:50:13 1999


This is a multi-part message in MIME format.
--------------4F94376FDAE6E3A4F9E95372
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I just found this list (or remembered it existed) after sending Donald a
plea for help:

      I'm having problems with a version of your tulip driver currently
      being distributed with David Hinds's PCMCIA package.  I'll just
ask if
      you can help me figure out what is going wrong.  I've attached a
file
      with captured data which will hopefully help.  I'm willing to dig
into
      the code, but I don't have the driver experience so I'm a little
lost
      right now.

      Thanks for any help!
      -Paul

The tulip_cb (heavily modified from the "standard" tulip.c v0.91) driver
from pcmcia-3.0.14 marginally works on my box.  I understand that it's
been changed, but I'm looking for guidance on why the receive thread
keeps getting suspended and why it appears that the transmit thread
doesn't send stuff out for minutes.

Thanks!
-Paul

--------------4F94376FDAE6E3A4F9E95372
Content-Type: text/plain; charset=us-ascii;
 name="interesting.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="interesting.txt"

[root@pc diag]# cat /etc/pcmcia/config.opts
#
# Local PCMCIA Configuration File
#
# System resources available for PCMCIA devices
#
include port 0x100-0x4ff, port 0x1000-0x17ff
include memory 0xc0000-0xfffff
include memory 0xa0000000-0xa0ffffff, memory 0x60000000-0x60ffffff
#
# Extra port range for IBM Token Ring
#
#include port 0xa00-0xaff
#
# Resources we should not use, even if they appear to be available
#
# First built-in serial port
exclude irq 4
# Second built-in serial port
#exclude irq 3
# First built-in parallel port
exclude irq 7
#
# Examples of options for loadable modules
#
# To fix sluggish network with IBM ethernet adapter...
#module "pcnet_cs" opts "mem_speed=600"
#
# Options for Xircom Netwave driver...
#module "netwave_cs" opts "domain=0x100 scramble_key=0x0"
#
# Options for IBM Token Ring adapters
#module "ibmtr_cs" opts "mmiobase=0xd0000 srambase=0xd4000"

# ThinkPad 600 stuff
include port 0x100-0x7ff, port 0x1000-0x17ff
include memory 0xd0000-0xdffff, memory 0xa0000000-0xa0ffffff
# First built-in serial port
exclude irq 4
# Second built-in serial port
exclude irq 3
# First built-in parallel port
exclude irq 7
exclude port 0x2f8-0x2ff
exclude port 0x230-0x233
exclude irq 5
module "tulip_cb" opts "debug=255"

[root@pc diag]# cat /etc/conf.modules
alias parport_lowlevel parport_pc
pre-install pcmcia_core /etc/rc.d/init.d/pcmcia start
keep
path[pcmcia]=/lib/modules/default
path[pcmcia]=/lib/modules/preferred

alias sound-slot-0 cs4232
alias sound-service-0-0 cs4232
alias sound cs4232
alias midi opl3
options opl3 io=0x388
options cs4232 io=0x530 irq=5 dma=1 dma2=0 mpuio=0x330 mpuirq=5 synthirq=-1 synthio=-1

[root@pc diag]# ./tulip-diag  -p 0x1000     
tulip-diag.c:v1.19 10/2/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Assuming a Digital Tulip, unknown type adapter at 0x1000.
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Suspended -- no Rx buffers'.
  The Tx process state is 'Idle'.
  The transmit threshold is 256.
 MII PHY found at address 0, status 0x782d.
 MII PHY #0 transceiver registers:
   3100 782d 0300 e54a 01e1 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0140 0005 0000 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 Basic mode status register 0x782d ... 782d.
   Link status: established.
   Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Vendor ID is 00:c0:39:--:--:--, model 20 rev. 10.
   Vendor/Part: TDK transceiver (unknown type).
 I'm advertising 01e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 0000:.
   Negotiation did not complete.
  TDK 78q2120 extra registers:
    Vendor specific register 16 is 0x0140.
      Link polarity is detected as normal.
    Vendor specific register 18 is 0x0100.
      Auto-negotiation complete, 10Mbps half duplex.
      Rx link in fail state, PLL locked.
    Vendor specific register 17 is 0x0000.
      Events since last read:

[root@pc diag]# ./tulip-diag  -p 0x1000 -e
tulip-diag.c:v1.19 10/2/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Assuming a Digital Tulip, unknown type adapter at 0x1000.
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Suspended -- no Rx buffers'.
  The Tx process state is 'Idle'.
  The transmit threshold is 256.
EEPROM size is 6.
  * An old-style EEPROM layout was found.
  * The old-style layout does not contain transceiver control information.
  * This board may not work, or may work only with a subset of transceiver
  * options or data rates.

[root@pc diag]# ./mii-diag -v
Using the default interface 'eth0'.
mii-diag.c:v1.07 10/14/99  Donald Becker (becker@cesdis.gsfc.nasa.gov)
 MII PHY #0 transceiver registers:
   3100 782d 0300 e54a 01e1 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0140 0000 0100 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 You have link beat, and everything is working OK.
   This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Your link partner does not do autonegotiation, and this transceiver type
  does not report the sensed link speed.
 MII PHY #0 transceiver registers:
   3100 782d 0300 e54a 01e1 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0140 0000 0100 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 Basic mode status register 0x782d ... 782d.
   Link status: established.
   Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Vendor ID is 00:c0:39:--:--:--, model 20 rev. 10.
   Vendor/Part: TDK transceiver (unknown type).
 I'm advertising 01e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 0000:.
   Negotiation did not complete.
  TDK 78q2120 extra registers:
    Vendor specific register 16 is 0x0140.
      Link polarity is detected as normal.
    Vendor specific register 18 is 0x0100.
      Auto-negotiation complete, 10Mbps half duplex.
      Rx link in fail state, PLL locked.
    Vendor specific register 17 is 0x0000.
      Events since last read:

/etc/pcmcia/config entry

card "IBM 10/100 EtherJet CardBus Adapter with 56K Modem"
  manfid 0x00a4, 0x0103
  bind "tulip_cb" to 0, "serial_cb" to 1

Unusual ping behavior:
[pc](8:33pm) {~} % ping -i 30 gw
PING gw (192.168.0.1) from 192.168.0.11 : 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=255 time=5.1 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=255 time=1.4 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=255 time=2.8 ms
64 bytes from 192.168.0.1: icmp_seq=0 ttl=255 time=89993.6 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=255 time=6.4 ms
64 bytes from 192.168.0.1: icmp_seq=6 ttl=255 time=2.9 ms
64 bytes from 192.168.0.1: icmp_seq=7 ttl=255 time=0.5 ms
64 bytes from 192.168.0.1: icmp_seq=8 ttl=255 time=11.6 ms
64 bytes from 192.168.0.1: icmp_seq=9 ttl=255 time=11.5 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=255 time=0.5 ms
64 bytes from 192.168.0.1: icmp_seq=11 ttl=255 time=9.9 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=255 time=216543.8 ms
>From pc (192.168.0.11): Destination Host Unreachable
>From pc (192.168.0.11): Destination Host Unreachable
>From pc (192.168.0.11): Destination Host Unreachable
>From pc (192.168.0.11): Destination Host Unreachable

--- gw ping statistics ---
23 packets transmitted, 12 packets received, +8 errors, 47% packet loss
round-trip min/avg/max = 0.5/25549.1/216543.8 ms
(Restarted pcmcia services)
[pc](8:44pm) {~} % ping -i 30 gw
PING gw (192.168.0.1) from 192.168.0.11 : 56(84) bytes of data.
>From pc (192.168.0.11): Destination Host Unreachable
>From pc (192.168.0.11): Destination Host Unreachable
64 bytes from 192.168.0.1: icmp_seq=2 ttl=255 time=7.4 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=255 time=2.6 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=255 time=9.9 ms
>From pc (192.168.0.11): Destination Host Unreachable
64 bytes from 192.168.0.1: icmp_seq=7 ttl=255 time=0.5 ms
64 bytes from 192.168.0.1: icmp_seq=8 ttl=255 time=10.0 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=255 time=102994.2 ms
64 bytes from 192.168.0.1: icmp_seq=9 ttl=255 time=14.0 ms
64 bytes from 192.168.0.1: icmp_seq=10 ttl=255 time=1.1 ms
64 bytes from 192.168.0.1: icmp_seq=11 ttl=255 time=0.5 ms
64 bytes from 192.168.0.1: icmp_seq=12 ttl=255 time=0.5 ms

[root@pc diag]# tail /var/log/messages
Dec 17 20:31:24 pc pcmcia: Starting PCMCIA services:
Dec 17 20:31:24 pc pcmcia:  modules
Dec 17 20:31:24 pc kernel: Linux PCMCIA Card Services 3.0.14
Dec 17 20:31:24 pc kernel:   kernel build: 2.2.13 #3 Sun Oct 31 23:18:16 EST 1999
Dec 17 20:31:24 pc kernel:   options:  [pci] [cardbus] [apm]
Dec 17 20:31:24 pc kernel: Intel PCIC probe:
Dec 17 20:31:24 pc kernel:   TI 1250A PCI-to-CardBus at bus 0 slot 2, mem 0x20301000, 2 sockets
Dec 17 20:31:24 pc kernel:     host opts [0]: [ring] [pwr save] [isa irq] [no pci irq] [lat 168/176] [bus 1/3]
Dec 17 20:31:24 pc kernel:     host opts [1]: [ring] [pwr save] [isa irq] [no pci irq] [lat 168/176] [bus 4/6]
Dec 17 20:31:24 pc kernel:     ISA irqs (scanned) = 3,4,7,9,10 status change on irq 10
Dec 17 20:31:25 pc pcmcia:  cardmgr.
Dec 17 20:31:25 pc cardmgr[352]: starting, version is 3.0.14
Dec 17 20:31:25 pc cardmgr[352]: watching 2 sockets
Dec 17 20:31:25 pc kernel: cs: IO port probe 0x1000-0x17ff: excluding 0x15e8-0x15ef
Dec 17 20:31:25 pc kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x220-0x22f 0x388-0x38f 0x4d0-0x4d7
Dec 17 20:31:25 pc cardmgr[352]: could not adjust resource: IO ports 0x1000-0x17ff: Device or resource busy
Dec 17 20:31:25 pc cardmgr[352]: could not adjust resource: IO ports 0x100-0x7ff: Device or resource busy
Dec 17 20:31:25 pc cardmgr[352]: could not adjust resource: memory 0xa0000000-0xa0ffffff: Device or resource busy
Dec 17 20:31:25 pc cardmgr[352]: could not adjust resource: memory 0xd0000-0xdffff: Device or resource busy
Dec 17 20:31:25 pc rc: Starting pcmcia succeeded
Dec 17 20:32:11 pc cardmgr[352]: initializing socket 1
Dec 17 20:32:11 pc cardmgr[352]: socket 1: IBM 10/100 EtherJet CardBus Adapter with 56K Modem
Dec 17 20:32:11 pc cardmgr[352]: executing: 'insmod /lib/modules/2.2.13/pcmcia/cb_enabler.o'
Dec 17 20:32:11 pc cardmgr[352]: executing: 'insmod /lib/modules/2.2.13/pcmcia/tulip_cb.o debug=255'
Dec 17 20:32:11 pc cardmgr[352]: executing: 'insmod /lib/modules/2.2.13/pcmcia/serial_cb.o'
Dec 17 20:32:11 pc kernel: cs: cb_config(bus 4): vendor 0x115d, device 0x0003
Dec 17 20:32:11 pc kernel:   fn 0 bar 2: mem 0x60017000-0x600177ff
Dec 17 20:32:11 pc kernel:   fn 0 bar 3: mem 0x60016000-0x600167ff
Dec 17 20:32:11 pc kernel:   fn 1 bar 1: io 0x1080-0x1087
Dec 17 20:32:11 pc kernel:   fn 1 bar 2: mem 0x60015000-0x600157ff
Dec 17 20:32:11 pc kernel:   fn 1 bar 3: mem 0x60014000-0x600147ff
Dec 17 20:32:11 pc kernel:   fn 0 bar 1: io 0x1000-0x107f
Dec 17 20:32:11 pc kernel:   fn 0 rom: mem 0x60010000-0x60013fff
Dec 17 20:32:11 pc kernel:   fn 1 rom: mem 0x6000c000-0x6000ffff
Dec 17 20:32:11 pc kernel: tulip_attach(bus 4, function 0)
Dec 17 20:32:11 pc kernel: tulip.c:v0.91 4/14/99 becker@cesdis.gsfc.nasa.gov (modified by danilo@cs.uni-magdeburg.de for XIRCOM CBE, fixed by Doug Ledford)
Dec 17 20:32:11 pc kernel: eth0: Xircom Cardbus Adapter (DEC 21143 compatible mode) rev 3 at 0x1000, 00:04:AC:64:7E:65, IRQ 9.
Dec 17 20:32:11 pc kernel: eth0:  MII transceiver #0 config 3100 status 7809 advertising 01e1.
Dec 17 20:32:11 pc kernel: XIRCOM init
Dec 17 20:32:11 pc kernel: serial_attach(bus 4, fn 1)
Dec 17 20:32:11 pc kernel: tty02 at 0x1080 (irq = 9) is a 16550A
Dec 17 20:32:11 pc kernel: eth0: The transmitter stopped.  CSR5 is 60678006, CSR6 320c2002, new CSR6 b2020000.
Dec 17 20:32:11 pc kernel: eth0: The transmitter stopped.  CSR5 is 60678106, CSR6 320c2002, new CSR6 b2020000.
Dec 17 20:32:11 pc last message repeated 4 times
Dec 17 20:32:11 pc cardmgr[352]: executing: './serial start ttyS2'
Dec 17 20:32:16 pc kernel: eth0: 21143 negotiation status 000000c2, 10baseT.
Dec 17 20:33:16 pc kernel: eth0: 21143 negotiation status 000000c2, 10baseT. 
Dec 17 20:34:16 pc kernel: eth0: 21143 negotiation status 000000c2, 10baseT. 
Dec 17 20:36:16 pc last message repeated 2 times
Dec 17 20:38:16 pc last message repeated 2 times
Dec 17 20:40:16 pc last message repeated 2 times
Dec 17 20:42:16 pc last message repeated 2 times
Dec 17 20:44:16 pc last message repeated 2 times
Dec 17 20:45:00 pc kernel: eth0: The transmitter stopped.  CSR5 is 60698186, CSR6 320c6002, new CSR6 b2024000.
Dec 17 20:45:08 pc cardmgr[352]: executing: './network check eth0'
Dec 17 20:45:08 pc cardmgr[352]: executing: './serial check ttyS2'
Dec 17 20:45:09 pc cardmgr[352]: shutting down socket 1
Dec 17 20:45:09 pc cardmgr[352]: executing: './network stop eth0'
Dec 17 20:45:09 pc cardmgr[352]: executing: './serial stop ttyS2'
Dec 17 20:45:09 pc kernel: tulip_detach(eth0)
Dec 17 20:45:09 pc kernel: tty02 unloaded
Dec 17 20:45:09 pc cardmgr[352]: executing: 'rmmod tulip_cb'
Dec 17 20:45:09 pc cardmgr[352]: executing: 'rmmod serial_cb'
Dec 17 20:45:09 pc cardmgr[352]: executing: 'rmmod cb_enabler'
Dec 17 20:45:13 pc cardmgr[352]: exiting
Dec 17 20:45:15 pc kernel: unloading PCMCIA Card Services
Dec 17 20:45:31 pc kernel: Linux PCMCIA Card Services 3.0.14
Dec 17 20:45:31 pc kernel:   kernel build: 2.2.13 #3 Sun Oct 31 23:18:16 EST 1999
Dec 17 20:45:31 pc kernel:   options:  [pci] [cardbus] [apm]
Dec 17 20:45:31 pc kernel: Intel PCIC probe:
Dec 17 20:45:31 pc kernel:   TI 1250A PCI-to-CardBus at bus 0 slot 2, mem 0x20301000, 2 sockets
Dec 17 20:45:31 pc kernel:     host opts [0]: [ring] [pwr save] [isa irq] [no pci irq] [lat 168/176] [bus 1/3]
Dec 17 20:45:31 pc kernel:     host opts [1]: [ring] [pwr save] [isa irq] [no pci irq] [lat 168/176] [bus 4/6]
Dec 17 20:45:31 pc kernel:     ISA irqs (scanned) = 3,4,7,9,10 status change on irq 10
Dec 17 20:45:31 pc cardmgr[1015]: starting, version is 3.0.14
Dec 17 20:45:31 pc cardmgr[1015]: watching 2 sockets
Dec 17 20:45:31 pc kernel: cs: IO port probe 0x1000-0x17ff: excluding 0x15e8-0x15ef
Dec 17 20:45:31 pc kernel: cs: IO port probe 0x0100-0x04ff: excluding 0x220-0x22f 0x388-0x38f 0x4d0-0x4d7
Dec 17 20:45:31 pc cardmgr[1015]: could not adjust resource: IO ports 0x1000-0x17ff: Device or resource busy
Dec 17 20:45:31 pc cardmgr[1015]: could not adjust resource: IO ports 0x100-0x7ff: Device or resource busy
Dec 17 20:45:31 pc cardmgr[1015]: could not adjust resource: memory 0xa0000000-0xa0ffffff: Device or resource busy
Dec 17 20:45:31 pc cardmgr[1015]: could not adjust resource: memory 0xd0000-0xdffff: Device or resource busy
Dec 17 20:45:31 pc cardmgr[1015]: initializing socket 1
Dec 17 20:45:31 pc cardmgr[1015]: socket 1: IBM 10/100 EtherJet CardBus Adapter with 56K Modem
Dec 17 20:45:31 pc cardmgr[1015]: executing: 'insmod /lib/modules/2.2.13/pcmcia/cb_enabler.o'
Dec 17 20:45:31 pc cardmgr[1015]: executing: 'insmod /lib/modules/2.2.13/pcmcia/tulip_cb.o debug=255'
Dec 17 20:45:32 pc kernel: cs: cb_config(bus 4): vendor 0x115d, device 0x0003
Dec 17 20:45:32 pc kernel:   fn 0 bar 2: mem 0x60017000-0x600177ff
Dec 17 20:45:32 pc kernel:   fn 0 bar 3: mem 0x60016000-0x600167ff
Dec 17 20:45:32 pc kernel:   fn 1 bar 1: io 0x1080-0x1087
Dec 17 20:45:32 pc kernel:   fn 1 bar 2: mem 0x60015000-0x600157ff
Dec 17 20:45:32 pc kernel:   fn 1 bar 3: mem 0x60014000-0x600147ff
Dec 17 20:45:32 pc kernel:   fn 0 bar 1: io 0x1000-0x107f
Dec 17 20:45:32 pc kernel:   fn 0 rom: mem 0x60010000-0x60013fff
Dec 17 20:45:32 pc kernel:   fn 1 rom: mem 0x6000c000-0x6000ffff
Dec 17 20:45:32 pc kernel: tulip_attach(bus 4, function 0)
Dec 17 20:45:32 pc kernel: tulip.c:v0.91 4/14/99 becker@cesdis.gsfc.nasa.gov (modified by danilo@cs.uni-magdeburg.de for XIRCOM CBE, fixed by Doug Ledford)
Dec 17 20:45:32 pc kernel: eth0: Xircom Cardbus Adapter (DEC 21143 compatible mode) rev 3 at 0x1000, 00:04:AC:64:7E:65, IRQ 9.
Dec 17 20:45:32 pc kernel: eth0:  MII transceiver #0 config 3100 status 7809 advertising 01e1.
Dec 17 20:45:32 pc kernel: XIRCOM init
Dec 17 20:45:32 pc cardmgr[1015]: executing: './network start eth0'
Dec 17 20:45:32 pc kernel: eth0: The transmitter stopped.  CSR5 is 60678006, CSR6 320c2002, new CSR6 b2020000.
Dec 17 20:45:32 pc kernel: eth0: The transmitter stopped.  CSR5 is 60678106, CSR6 320c2002, new CSR6 b2020000.
Dec 17 20:45:32 pc last message repeated 4 times
Dec 17 20:45:37 pc kernel: eth0: 21143 negotiation status 000000c2, 10baseT.
Dec 17 20:46:37 pc kernel: eth0: 21143 negotiation status 000000c2, 10baseT.
Dec 17 20:48:37 pc last message repeated 2 times
Dec 17 20:50:37 pc last message repeated 2 times


--------------4F94376FDAE6E3A4F9E95372--