# These utils will give you info about your NIC. Run all of them as root,
# but install and build them as whoever you like.
cd ~/src
mkdir -p ethercard
cd ethercard
# pci-config
# ==========
# PCI Configuration and Power Setting
# Run 'pci-config -u' (as root) for usage
wget -N ftp://ftp.scyld.com/pub/diag/pci-config.c
gcc -O -Wall -o pci-config pci-config.c
# libmii
# ======
# Grab libmii.c to link diagnostic programs against it
wget -N ftp://ftp.scyld.com/pub/diag/libmii.c
# libflash
# ========
# Grab libflash.c to link diagnostic programs against it
wget -N ftp://ftp.scyld.com/pub/diag/libflash.c
# mii-diag
# ========
# MII link status report and diagnostics
# Run 'mii-diag --help' for usage
wget -N ftp://ftp.scyld.com/pub/diag/mii-diag.c
gcc -Wall -Wstrict-prototypes -O mii-diag.c -DLIBMII libmii.c -o mii-diag
# tulip-diag
# ==========
# Intel/Digital Tulip (DC21040 series) and the many Tulip work-alikes:
# Lite-On PNIC, STMicro, ADMtek Comet, Macronix MXIC, Davicom DM9101
# (I have a LinkSys NIC that uses this chip)
wget -N ftp://ftp.scyld.com/pub/diag/tulip-diag.c
cc -O -Wall -Wstrict-prototypes -o tulip-diag tulip-diag.c \
-DLIBMII libmii.c -DLIBFLASH libflash.c
# ne2k-pci-diag
# =============
# Winbond W89c940 (I have a LinkSys NIC that uses this chip):
wget -N ftp://ftp.scyld.com/pub/diag/ne2k-pci-diag.c
cc -O -Wall -o ne2k-pci-diag ne2k-pci-diag.c
# Run them as root to get the full details
# Example:
# su -c "./mii-diag"
# su -c "./tulip-diag -aem | less"
# If you want to install them somewhere:
su
test -x pci-config && install -s pci-config /usr/local/bin/
test -x mii-diag && install -s mii-diag /usr/local/bin/
test -x vortex-diag && install -s vortex-diag /usr/local/bin/
test -x tulip-diag && install -s tulip-diag /usr/local/bin/
test -x ne2k-pci-diag && install -s ne2k-pci-diag /usr/local/bin/
exit