Subject: Re: SMC8216C - 10BaseT Problem Still Unresolved
To: Graham Jenkins <c714553@vus415.telstra.com.au>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 04/29/1999 19:20:00
On Fri, 30 Apr 1999 11:58:03 +1000 
 c714553@vus415.telstra.com.au (Graham Jenkins) wrote:

 > 1) ifconfig blah blah blah media 10BaseT/UTP .. doesn't work ..
 >    and nor does .. 10baseT/UTP, 10baseT, UTP .. etc.  The response is
 >    always: ifconfig: SIOCSIFMEDIA: Device not configured

Right.

Okay, so I wrote the current "we" front-end to the dp8390 driver.  Here is
the core with those cards...

All of the WD/SMC chips support, in the ASIC that sits between the bus
and the dp8390 Ethernet chip, support exactly two media types: BNC and AUI.

Boards based on this design have a variety of media connector types, BNC,
AUI, BNC/AUI, BNC/AUI/UTP, etc.

Software has NO way of knowing which media type is present on the card.

Now, on ALL of the cards that have UTP, UTP is enabled when AUI is
enabled.  Put another way, BNC is enabled by powering on the built-in
transciever by raising a general purpose output line (one of two, depending
on if the ASIC is a '790 or not).  When this GPO line is low, the
transciever is off, and so the AUI gets the output.  The UTP cards have
the UTP port wired up to this output.

Since there is no way for software to know if UTP is present, or if the
default media is UTP, it just uses "enable AUI" to enable that port.

 > 2) Depending on the machine, the time of day (network traffic?), etc. .. the
 >    card with a cable in its UTP port is auto-detected as 10base5/AUI or
 >    10base2/BNC.  Either way, it takes several minutes for an address to be
 >    assigned by DHCP - and the connection is unreliable - requiring an
 >    'ifconfig we1 down'/ 'ifconfig we1 up' sequence to make it go again.
 >    I have RedHat Linux 5.1 on another partition on this machine - and it
 >    correctly recognises the UTP connection and works without trauma.

How, precisely, does it autodetect?  When you reboot the machine?  It is
possible that there is some "detect on reset" logic in some of these ASICs,
but I don't know about it if there is.

In any case, the connection being unreliable may be a completely different
problem.  Can you please try my previous suggestion of using "aui" (or
"10base5") to configure the card to UTP?  Then please tell me how reliable
or unreliable it is.

 > 3) Jason - I didn't understand your comment about autoselection. Does the
 >    kernel have a separate driver for SMC-Ultra - and is there some way I
 >    can force use of that instead?  Or perhaps the kernel could be modified
 >    to try an SMC-Ultra first?

The "we" driver supports all WD/SMC cards based on the dp8390 chipset.  There
is no separate driver for the SMC-Ultra.  It asks the card what type it is
and Does The Right Thing With It.

My comment about autodetection boils down to: these cards have no logic
to detect the network type.  This must be done entirely in software.  This
is done by transmitting packets and checking status.  (Usually MAC-level
test packets, which are supposed to be echoed back).

I don't really have any of these cards anymore, so I can't exactly test
the code necessary to do this :-)  This means that I'm not really inclined to
write it :-)  (Besides, I have loads of other things to do :-)

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>