Failure to activate SMC9332DST in linux 2.2.2+ tulip driver

Jonathan Stanton jonathan@cs.jhu.edu
Wed Apr 28 12:51:03 1999


On Tue, Apr 27, 1999 at 10:40:49PM -0400, Donald Becker wrote:
> On Tue, 27 Apr 1999, Jonathan Stanton wrote:
> 
> > 	I have started having a problem with some Tulip based SMC9332
> > cards that we have used successfully at 100BTX for several years. They
> > work just great under 2.0. kernels and worked fine under the 2.1 series
> > whenever I tried it, but at 2.2.3 the tulip driver stopped detecting that
> > they were really SMC9332DST's when it couldn't find a MII. Here is a
> > successful boot in 2.0.36
> ...
> > eth0: Digital DS21140 Tulip at 0xe400, 00 00 c0 41 d6 ed, IRQ 9.
> > Here is what happens under 2.2.3+ (upto 2.2.6 which I just tried)
> > digital DS21140 Tulip rev 18 at 0xfc80, EEPROM not presenet, 
> 
> Ackk!  The I/O address has changed!
> I'm guessing that 2.2.3+ is doing something evil with the new PCI config
> code.
> 
> What does /proc/pci report as the I/O address?

I have some more information about this. I'm not sure if any of it is good
though. I rebooted into 2.0.36 to get a "working" /proc/pci however I
can't dupliate the 0xe400 address, it now always gets the 0xfc80 io
address (but it still works!) so here is a working /proc/pci from 2.0.36

PCI devices found:
  Bus  0, device  19, function  0:
    Ethernet controller: DEC DC21140 (rev 18).
      Medium devsel.  Fast back-to-back capable.  IRQ 9.  Master Capable.  Latency=66.  
      I/O at 0xfc80.
      Non-prefetchable 32 bit memory at 0xffbebc00.
  Bus  0, device  17, function  0:
    VGA compatible controller: Matrox Millennium (rev 1).
      Medium devsel.  Fast back-to-back capable.  IRQ 11.  
      Non-prefetchable 32 bit memory at 0xffbec000.
      Prefetchable 32 bit memory at 0xff000000.
  Bus  0, device   7, function  1:
    IDE interface: Intel 82371SB PIIX3 IDE (rev 0).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=64.  
      I/O at 0xffa0.
  Bus  0, device   7, function  0:
    ISA bridge: Intel 82371SB PIIX3 ISA (rev 1).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  No bursts.  
  Bus  0, device   0, function  0:
    Host bridge: Intel 82441FX Natoma (rev 2).
      Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=64.  

The tulip logs show the same as before except the io address is 0xfc80. 

> 
> > I am attaching a /proc/pci dump and the result of running the tulip-diag
> > program with options -f -e -e -a -m -m  as suggested on the debugging
> > web page.
> ..
> >   Bus  0, device  19, function  0:
> >     Ethernet controller: DEC DC21140 (rev 18).
> >       Medium devsel.  Fast back-to-back capable.  IRQ 9.  Master Capable.  Latency=66.  
> >       I/O at 0xfc80 [0xfc81].
> 
> Well, the I/O address matches the broken case above.
> What does it report with earlier kernels?

Now the bad news. I can't currently duplicate the working 2.2 kernel
behaivor. The machine I'm testing on right now fails with both a 2.2.0 and
2.2.2 kernel and tulip driver, even though I have had these cards work on
other machines in 2.2.2. I am including a log from an different machine
(that has the same configuration) from early april showing a working 2.2.2
boot with tulip:

Mar 30 13:20:01 ice2 kernel: klogd 1.3-3, log source = /proc/kmsg started.
Mar 30 13:20:02 ice2 kernel: Loaded 6497 symbols from
/usr/src/linux/System.map.
Mar 30 13:20:02 ice2 kernel: Symbols match kernel version 2.2.2.
Mar 30 13:20:02 ice2 kernel: Error seeking in /dev/kmem 
Mar 30 13:20:02 ice2 kernel: Error adding kernel module table entry. 
Mar 30 13:20:02 ice2 kernel: Linux version 2.2.2 (root@ice2.cnds.jhu.edu)
(gcc version 2.7.2.3) #2 Wed Mar 10 15:40:51 EST 1999
Mar 30 13:20:02 ice2 kernel: Detected 199434895 Hz processor.
Mar 30 13:20:02 ice2 kernel: Console: colour VGA+ 80x25
Mar 30 13:20:02 ice2 kernel: Calibrating delay loop... 199.07 BogoMIPS
Mar 30 13:20:02 ice2 kernel: Memory: 63328k/65536k available (848k kernel
code, 408k reserved, 916k data, 36k init)
Mar 30 13:20:02 ice2 kernel: CPU: Intel Pentium Pro stepping 07
Mar 30 13:20:02 ice2 kernel: Checking 386/387 coupling... OK, FPU using
exception 16 error reporting.
Mar 30 13:20:02 ice2 kernel: Checking 'hlt' instruction... OK.
Mar 30 13:20:02 ice2 kernel: POSIX conformance testing by UNIFIX
Mar 30 13:20:02 ice2 kernel: mtrr: v1.26 (19981001) Richard Gooch
(rgooch@atnf.csiro.au)
Mar 30 13:20:02 ice2 kernel: PCI: PCI BIOS revision 2.10 entry at 0xfd7a1
Mar 30 13:20:02 ice2 kernel: PCI: Using configuration type 1
Mar 30 13:20:02 ice2 kernel: PCI: Probing PCI hardware
Mar 30 13:20:02 ice2 kernel: PCI: 00:00 [8086/1237]: Passive release
enable (00)
Mar 30 13:20:02 ice2 kernel: Linux NET4.0 for Linux 2.2
Mar 30 13:20:02 ice2 kernel: Based upon Swansea University Computer
Society NET3.039
Mar 30 13:20:02 ice2 kernel: NET4: Unix domain sockets 1.0 for Linux
NET4.0.
Mar 30 13:20:02 ice2 kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Mar 30 13:20:02 ice2 kernel: IP Protocols: ICMP, UDP, TCP, IGMP
Mar 30 13:20:02 ice2 kernel: Initializing RT netlink socket
Mar 30 13:20:02 ice2 kernel: Starting kswapd v 1.5 
Mar 30 13:20:02 ice2 kernel: Detected PS/2 Mouse Port.
Mar 30 13:20:02 ice2 kernel: Serial driver version 4.27 with no serial
options enabled
Mar 30 13:20:02 ice2 kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A
Mar 30 13:20:02 ice2 kernel: ttyS01 at 0x02f8 (irq = 3) is a 16550A
Mar 30 13:20:02 ice2 kernel: pty: 256 Unix98 ptys configured
Mar 30 13:20:02 ice2 kernel: Real Time Clock Driver v1.09
Mar 30 13:20:02 ice2 kernel: PIIX3: IDE controller on PCI bus 00 dev 39
Mar 30 13:20:02 ice2 kernel: PIIX3: not 100ative mode: will probe irqs
later
Mar 30 13:20:02 ice2 kernel:     ide0: BM-DMA at 0xffa0-0xffa7, BIOS
settings: hda:pio, hdb:pio
Mar 30 13:20:02 ice2 kernel:     ide1: BM-DMA at 0xffa8-0xffaf, BIOS
settings: hdc:pio, hdd:pio
Mar 30 13:20:02 ice2 kernel: hda: WDC AC32500H, ATA DISK drive
Mar 30 13:20:02 ice2 kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Mar 30 13:20:02 ice2 kernel: hda: Disabling (U)DMA for WDC AC32500H
Mar 30 13:20:02 ice2 kernel: hda: DMA disabled
Mar 30 13:20:02 ice2 kernel: hda: WDC AC32500H, 2441MB w/128kB Cache,
CHS=620/128/63
Mar 30 13:20:02 ice2 kernel: Floppy drive(s): fd0 is 1.44M
Mar 30 13:20:02 ice2 kernel: FDC 0 is a National Semiconductor PC87306
Mar 30 13:20:02 ice2 kernel: Partition check:
Mar 30 13:20:02 ice2 kernel:  hda: hda1 hda2 < hda5 hda6 hda7 hda8 >
Mar 30 13:20:02 ice2 kernel: VFS: Mounted root (ext2 filesystem) readonly.
Mar 30 13:20:02 ice2 kernel: Freeing unused kernel memory: 36k freed
Mar 30 13:20:02 ice2 kernel: Adding Swap: 128988k swap-space (priority -1)
Mar 30 13:20:02 ice2 kernel: Adding Swap: 128988k swap-space (priority -2)
Mar 30 13:20:02 ice2 kernel: tulip.c:v0.89H 5/23/98
becker@cesdis.gsfc.nasa.gov
Mar 30 13:20:02 ice2 kernel: eth0: Digital DS21140 Tulip at 0xfc80, 00 00
c0 41 d6 ed, IRQ 10.
Mar 30 13:20:02 ice2 kernel: eth0: Old format EEPROM on 'SMC9332DST'
board.  Using substitute media control info.
Mar 30 13:20:02 ice2 kernel: eth0:  EEPROM default media type Autosense.
Mar 30 13:20:02 ice2 kernel: eth0:  Index #0 - Media 10baseT (#0)
described by a 21140 non-MII (0) block.
Mar 30 13:20:02 ice2 kernel: eth0:  Index #1 - Media 100baseTx (#3)
described by a 21140 non-MII (0) block.

The current machine only differed in boot output in the loading of
sound drivers, so I disabled the sound drivers and can get boot output in
my current machine which looks the same except the tulip doesn't work

Later today I'll try some more to get a working 2.2.2 kernel with tulip so
I can isolate the differences better.

> 
> > tulip-diag.c:v1.10 4/12/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
> > Index #1: Found a Digital DS21140 Tulip adapter at 0xfc80.
> > Digital DS21140 Tulip chip registers at 0xfc80:
> >   ffffffff 00000000 00000000 02f4f054 02f4f0d4 0001ebef ffffffff 0001ebef
> >   00fff0d8 00050000 034b0820 00fff0f8 7fffffff 00000000 7fffccff fcc00600
> 
> This is completely bogus -- it's as if there is memory mapped to this region
> instead of the Tulip.

Here is the tulip-diag output when the card is working under 2.0.36:

tulip-diag.c:v1.10 4/12/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a Digital DS21140 Tulip adapter at 0xfc80.
Digital DS21140 Tulip chip registers at 0xfc80:
  fff84800 ffffffff ffffffff 00fff028 00fff228 fc660000 e3842002 ffffebef
  fffe0000 fffc97ff ffffffff fffe0000 ffffffe9 ffffffff 1c09fdc0 fffffec8
 Port selection is 100mbps-SYM/PCS 100baseTx scrambler, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
EEPROM contents:
  0000 48c0 edd6 7f57 577f d6ed c048 0000
  0000 48c0 edd6 7f57 00ff aa55 00ff aa55
  0000 0000 0000 0000 0000 0000 0000 0000
  0000 0000 0000 0000 0000 0000 0000 0000
  0000 0000 0000 0000 0000 0000 0000 0000
  343a 0002 005a 0000 0000 0000 0000 0000
  c033 1034 8001 0000 0000 0000 0000 0000
  0000 0000 0000 0000 0000 0000 0000 0000
 ID CRC 0xfb (vs. 00), complete CRC 5ffb65b5.
  * 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.
   No MII transceivers found!

Thanks, tell me what else I can do to help,

Jonathan

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan@cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------