Subject: ThunderLAN does not recognize media type; unable to TX/RX
To: None <port-macppc@netbsd.org>
From: Paulo Afonso Graner Fessel <pafessel@terra.com.br>
List: port-macppc
Date: 07/12/2001 11:57:25
Hello.

I'm trying to use a Performa 6360 as a firewall. After going into some
frustration with Linux, I've decided to give NetBSD a try.

The 6360 has only one PCI slot available; OTOH, I had the chance to buy
a Compaq Netelligent Dual board by a very reasonable price; this way I'd
be able to use the 6360 as a router/firewall.

The problem is: NetBSD does find the board, but appears not to be sure
about what PHY it should use. Here's an excerpt of the boot log:

pchb0 at pci0 dev 11 function
0                                                 
pchb0: Apple Computer Bandit Host-PCI Bridge (rev.
0x03)                        
ppb0 at pci0 dev 13 function 0: IBM 82351 PCI-PCI Bridge (rev.
0x01)            
pci1 at ppb0 bus
1                                                              
pci1: i/o space, memory space
enabled                                           
tl0 at pci1 dev 0 function
0                                                    
tl0: Compaq Dual Port Netelligent 10/100
TX                                     
tl0: Ethernet address
00:80:5f:a7:b2:3f                                         
tl0: interrupting at irq
23                                                     
ukphy0 at tl0 phy 1: Generic IEEE 802.3u media
interface                        
ukphy0: DP83840 10/100 media interface (OUI 0x1000e8, model 0x0000),
rev. 1     
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
auto                    
tlphy0 at tl0 phy 31: ThunderLAN 10baseT media interface, rev.
5                
tlphy0:
10base5                                                                 
tl1 at pci1 dev 1 function
0                                                    
tl1: Compaq Dual Port Netelligent 10/100
TX                                     
tl1: Ethernet address
00:80:5f:a7:b2:bf                                         
tl1: interrupting at irq
23                                                     
ukphy1 at tl1 phy 1: Generic IEEE 802.3u media
interface                        
ukphy1: DP83840 10/100 media interface (OUI 0x1000e8, model 0x0000),
rev. 1     
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
auto                    
tlphy1 at tl1 phy 31: ThunderLAN 10baseT media interface, rev.
5                
tlphy1: 10base5

Seems that the PHY being used is tlphy, right? But if I compile NetBSD
without ukphy, I get this:

pchb0 at pci0 dev 11 function 0
pchb0: Apple Computer Bandit Host-PCI Bridge (rev. 0x03)
ppb0 at pci0 dev 13 function 0: IBM 82351 PCI-PCI Bridge (rev. 0x01)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
tl0 at pci1 dev 0 function 0
tl0: Compaq Dual Port Netelligent 10/100 TX
tl0: Ethernet address 00:80:5f:a7:b2:3f
tl0: interrupting at irq 23
OUI 0x1000e8 model 0x0000 rev 1 at tl0 phy 1 not configured
tlphy0 at tl0 phy 31: ThunderLAN 10baseT media interface, rev. 5
tlphy0: 10base5
ifmedia_set: no match for 0x20/0xfffffff
panic: ifmedia_set
Stopped in pid 0 (swapper) at   cpu_Debugger+0x10:      lwz     r0, r1,
0x14,
db> continue
rebooting

EXIT called ok
0 >   ok

That is, the media is not set, the PHY at tl0 is not configured and I
get a panic. Seems like that my board's PHY is not being recognised...

Also, when I use the ukphy I get even a link, as ifconfig -a reports
(only tl0 is attached to my hub):

tl0: flags=8822<BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu
1500                
        address:
00:80:5f:a7:b2:3f                                              
        media: Ethernet autoselect
(10baseT)                                    
        status:
active                                                          
tl1: flags=8822<BROADCAST,NOTRAILERS,SIMPLEX,MULTICAST> mtu
1500                
        address:
00:80:5f:a7:b2:bf                                              
        media: Ethernet autoselect
(none)                                       
        status: no
carrier                                                      
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu
33220                                
        inet 127.0.0.1 netmask 0xff000000

But as soon as I try to ifconfig tl0 up I get these messages and the
link goes down:

Jul 12 10:26:18 performa /netbsd: tl0: check condition,
intvect=0x200000, ch_par
am=0x180005
Jul 12 10:26:24 performa last message repeated 11 times
Jul 12 10:26:24 performa /netbsd: tl0: device timeout

I've found now that the PHY of this board is a NS83840 chip, but I still
get some strange messages in the log and the board does not work,
exactly as before.

pchb0 at pci0 dev 11 function
0                                                 
pchb0: Apple Computer Bandit Host-PCI Bridge (rev.
0x03)                        
ppb0 at pci0 dev 13 function 0: IBM 82351 PCI-PCI Bridge (rev.
0x01)            
pci1 at ppb0 bus
1                                                              
pci1: i/o space, memory space
enabled                                           
tl0 at pci1 dev 0 function
0                                                    
tl0: Compaq Dual Port Netelligent 10/100
TX                                     
tl0: Ethernet address
00:80:5f:a7:b2:3f                                         
tl0: interrupting at irq
23                                                     
nsphy0 at tl0 phy 1: DP83840 10/100 media interface, rev.
1                     
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
auto                    
OUI 0x080028 model 0x0001 rev 5 at tl0 phy 31 not
configured                    
tl1 at pci1 dev 1 function
0                                                    
tl1: Compaq Dual Port Netelligent 10/100
TX                                     
tl1: Ethernet address
00:80:5f:a7:b2:bf                                         
tl1: interrupting at irq
23                                                     
nsphy1 at tl1 phy 1: DP83840 10/100 media interface, rev.
1                     
nsphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,
auto                    
OUI 0x080028 model 0x0001 rev 5 at tl1 phy 31 not configured

What is an "OUI 0x080028 model 0x0001 rev 5 at tl1 phy 31 not
configured"? Any clues?

Apple Macintosh Performa 6360, 40 MB RAM, Netelligent Dual Port 10/100
TX, NetBSD 1.5W (already tried NetBSD 1.5, same results).

TIA,
Paulo Fessel

-- 
Now I want you to remember that no bastard ever won a war by
dying for his country. He won it by making the other poor dumb 
bastard die for his country.

(Gen. George S. Patton Jr.)