--- /dev/null
+--- diag-ether/alta-diag.c.org 2004-02-22 21:23:41.000000000 +0000
++++ diag-ether/alta-diag.c 2004-02-22 21:28:03.000000000 +0000
+@@ -36,38 +36,37 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:ab:cd
+- Set a new hardware station address. Typically diabled,
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
+-
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:ab:cd\n"
++" Set a new hardware station address. Typically diabled,\n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
+ #warning See the last lines of the source file.
+@@ -84,7 +83,7 @@
+
+ /* The following are required only with unaligned field accesses. */
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
++// #include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
--- /dev/null
+--- diag-ether/diag-example.c.org 2004-02-22 22:21:09.000000000 +0000
++++ diag-ether/diag-example.c 2004-02-22 22:22:20.000000000 +0000
+@@ -37,42 +37,42 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type (with '-p'), use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -F, --new-interface N Set the default transceiver type.
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:89:ab
+- Set a new hardware station address. Typically disabled for safety.
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+- To read and write the boot BIOS extension Flash ROM
+- -B Show the first few bytes of the ROM
+- -L FILE Load the Flash from FILE.
+- -S FILE Store the Flash image to FILE.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type (with '-p'), use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -F, --new-interface N Set the default transceiver type.\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:89:ab\n"
++" Set a new hardware station address. Typically disabled for safety.\n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++" To read and write the boot BIOS extension Flash ROM\n"
++" -B Show the first few bytes of the ROM\n"
++" -L FILE Load the Flash from FILE.\n"
++" -S FILE Store the Flash image to FILE.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
+@@ -91,7 +91,6 @@
+
+ /* The following are required only with unaligned field accesses. */
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
--- /dev/null
+--- diag-ether/eepro100-diag.c.org 2004-02-22 21:31:11.000000000 +0000
++++ diag-ether/eepro100-diag.c 2004-02-22 21:33:36.000000000 +0000
+@@ -34,37 +34,36 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type (with '-p'), use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:89:ab
+- Set a new hardware station address. Typically disabled for safety.
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type (with '-p'), use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:89:ab\n"
++" Set a new hardware station address. Typically disabled for safety.\n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
--- /dev/null
+--- diag-ether/ether-wake.c.org 2004-02-22 22:32:08.000000000 +0000
++++ diag-ether/ether-wake.c 2004-02-22 22:32:52.000000000 +0000
+@@ -6,30 +6,30 @@
+ "usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
+ " Use '-u' to see the complete set of options.\n";
+ static char usage_msg[] =
+-"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55
+-
+- This program generates and transmits a Wake-On-LAN (WOL)
+- \"Magic Packet\", used for restarting machines that have been
+- soft-powered-down (ACPI D3-warm state).
+- It currently generates the standard AMD Magic Packet format, with
+- an optional password appended.
+-
+- The single required parameter is the Ethernet MAC (station) address
+- of the machine to wake or a host ID with known NSS 'ethers' entry.
+- The MAC address may be found with the 'arp' program while the target
+- machine is awake.
+-
+- Options:
+- -b Send wake-up packet to the broadcast address.
+- -D Increase the debug level.
+- -i ifname Use interface IFNAME instead of the default 'eth0'.
+- -p <pw> Append the four or six byte password PW to the packet.
+- A password is only required for a few adapter types.
+- The password may be specified in ethernet hex format
+- or dotted decimal (Internet address)
+- -p 00:22:44:66:88:aa
+- -p 192.168.1.1
+-";
++"usage: ether-wake [-i <ifname>] [-p aa:bb:cc:dd[:ee:ff]] 00:11:22:33:44:55\n"
++"\n"
++" This program generates and transmits a Wake-On-LAN (WOL)\n"
++" \"Magic Packet\", used for restarting machines that have been\n"
++" soft-powered-down (ACPI D3-warm state).\n"
++" It currently generates the standard AMD Magic Packet format, with\n"
++" an optional password appended.\n"
++"\n"
++" The single required parameter is the Ethernet MAC (station) address\n"
++" of the machine to wake or a host ID with known NSS 'ethers' entry.\n"
++" The MAC address may be found with the 'arp' program while the target\n"
++" machine is awake.\n"
++"\n"
++" Options:\n"
++" -b Send wake-up packet to the broadcast address.\n"
++" -D Increase the debug level.\n"
++" -i ifname Use interface IFNAME instead of the default 'eth0'.\n"
++" -p <pw> Append the four or six byte password PW to the packet.\n"
++" A password is only required for a few adapter types.\n"
++" The password may be specified in ethernet hex format\n"
++" or dotted decimal (Internet address)\n"
++" -p 00:22:44:66:88:aa\n"
++" -p 192.168.1.1\n"
++"\n";
+
+ /*
+ This program generates and transmits a Wake-On-LAN (WOL) "Magic Packet",
--- /dev/null
+--- diag-ether/mii-diag.c.org 2004-02-22 22:16:38.000000000 +0000
++++ diag-ether/mii-diag.c 2004-02-22 22:17:58.000000000 +0000
+@@ -37,46 +37,46 @@
+ static const char usage_msg[] =
+ "Usage: %s [--help] [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n";
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.
+-
+- This program configures and monitors the transceiver management registers
+- for network interfaces. It uses the Media Independent Interface (MII)
+- standard with additional Linux-specific controls to communicate with the
+- underlying device driver. The MII registers control and report network
+- link settings and errors. Examples are link speed, duplex, capabilities
+- advertised to the link partner, status LED indications and link error
+- counters.
+-
+- The common usage is
+- mii-diag eth0
+-
+- The default interface is \"eth0\".
+- Frequently used options are
+- -A --advertise <speed|setting>
+- -F --fixed-speed <speed>
+- Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD,
+- 10baseT, 10baseT-FD, 10baseT-HD
+- -s --status Return exit status 2 if there is no link beat.
+-
+- Less frequently used options are
+- -a --all-interfaces Show the status all interfaces
+- (Not recommended with options that change settings.)
+- -D --debug
+- -g --read-parameters Get driver-specific parameters.
+- -G --set-parameters PARMS Set driver-specific parameters.
+- Parameters are comma separated, missing elements retain existing value.
+- -M --msg-level LEVEL Set the driver message bit map.
+- -p --phy ADDR Set the PHY (MII address) to report.
+- -r --restart Restart the link autonegotiation.
+- -R --reset Reset the transceiver.
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+- -w --watch Continuously monitor the transceiver and report changes.
+-
+- This command returns success (zero) if the interface information can be
+- read. If the --status option is passed, a zero return means that the
+- interface has link beat.
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [--watch] <interface>.\n"
++"\n"
++" This program configures and monitors the transceiver management registers\n"
++" for network interfaces. It uses the Media Independent Interface (MII)\n"
++" standard with additional Linux-specific controls to communicate with the\n"
++" underlying device driver. The MII registers control and report network\n"
++" link settings and errors. Examples are link speed, duplex, capabilities\n"
++" advertised to the link partner, status LED indications and link error\n"
++" counters.\n"
++"\n"
++" The common usage is\n"
++" mii-diag eth0\n"
++"\n"
++" The default interface is \"eth0\".\n"
++" Frequently used options are\n"
++" -A --advertise <speed|setting>\n"
++" -F --fixed-speed <speed>\n"
++" Speed is one of: 100baseT4, 100baseTx, 100baseTx-FD, 100baseTx-HD,\n"
++" 10baseT, 10baseT-FD, 10baseT-HD\n"
++" -s --status Return exit status 2 if there is no link beat.\n"
++"\n"
++" Less frequently used options are\n"
++" -a --all-interfaces Show the status all interfaces\n"
++" (Not recommended with options that change settings.)\n"
++" -D --debug\n"
++" -g --read-parameters Get driver-specific parameters.\n"
++" -G --set-parameters PARMS Set driver-specific parameters.\n"
++" Parameters are comma separated, missing elements retain existing value.\n"
++" -M --msg-level LEVEL Set the driver message bit map.\n"
++" -p --phy ADDR Set the PHY (MII address) to report.\n"
++" -r --restart Restart the link autonegotiation.\n"
++" -R --reset Reset the transceiver.\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++" -w --watch Continuously monitor the transceiver and report changes.\n"
++"\n"
++" This command returns success (zero) if the interface information can be\n"
++" read. If the --status option is passed, a zero return means that the\n"
++" interface has link beat.\n"
++"\n";
+
+ #include <unistd.h>
+ #include <stdlib.h>
--- /dev/null
+--- diag-ether/myson-diag.c.org 2004-02-22 22:28:14.000000000 +0000
++++ diag-ether/myson-diag.c 2004-02-22 22:30:46.000000000 +0000
+@@ -35,37 +35,37 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:ab:cd
+- Set a new hardware station address. Typically diabled,
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:ab:cd\n"
++" Set a new hardware station address. Typically diabled, \n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
+@@ -82,7 +82,6 @@
+
+ /* The following are required only with unaligned field accesses. */
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
+@@ -825,17 +824,17 @@
+ }
+
+
+-static char davicom_msg[] = "
+- Your EEPROM has been misprogrammed from the factory!
+-
+- It contains the EEPROM programming for a Davicom 9102 chip, not the
+- configuration for the Myson 800 series part.
+- This results incorrect operation, and no Wake-On-LAN feature.
+- Contact your vendor for a fix or replacement board.
+-
+- You may, at your own risk, attempt to use the '-E' Emergency rewrite
+- option to correct the EEPROM contents.
+-";
++static char davicom_msg[] =
++" Your EEPROM has been misprogrammed from the factory!\n"
++"\n"
++" It contains the EEPROM programming for a Davicom 9102 chip, not the\n"
++" configuration for the Myson 800 series part.\n"
++" This results incorrect operation, and no Wake-On-LAN feature.\n"
++" Contact your vendor for a fix or replacement board.\n"
++"\n"
++" You may, at your own risk, attempt to use the '-E' Emergency rewrite\n"
++" option to correct the EEPROM contents.\n"
++"\n";
+
+ static void myson_eeprom(unsigned short *ee_data)
+ {
--- /dev/null
+--- diag-ether/natsemi-diag.c.org 2004-02-22 21:40:26.000000000 +0000
++++ diag-ether/natsemi-diag.c 2004-02-22 21:43:40.000000000 +0000
+@@ -37,41 +37,41 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" natsemi-diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:ab:cd\n"
++" Set a new hardware station address. Typically diabled, \n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++" To read and write the boot BIOS extension Flash ROM\n"
++" -B Show the first few bytes of the ROM\n"
++" -L FILE Load the Flash from FILE.\n"
++" -S FILE Store the Flash image to FILE.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n";
+
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- natsemi-diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:ab:cd
+- Set a new hardware station address. Typically diabled,
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+- To read and write the boot BIOS extension Flash ROM
+- -B Show the first few bytes of the ROM
+- -L FILE Load the Flash from FILE.
+- -S FILE Store the Flash image to FILE.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
+@@ -90,7 +90,7 @@
+
+ /* The following are required only with unaligned field accesses. */
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
++//#include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
--- /dev/null
+--- diag-ether/ne2k-pci-diag.c.bak 2004-02-22 21:11:23.000000000 +0000
++++ diag-ether/ne2k-pci-diag.c 2004-02-22 21:14:39.000000000 +0000
+@@ -767,35 +767,34 @@
+ p[23] & 8 ? "no link beat required" : "autoselect by link beat",
+ winbond_rom[p[23]>>5]);
+ if (ee_data[9] == 0x8c4a)
+- printf("
+-This board has bogus information written into the configuration EEPROM.
+-The configuration table is for a Realtek chip, but this board is using
+-a Winbond 89c940 chip. This misprogramming usually results in an invalid
+-station address, and prevents the board from being detected by standard
+-drivers.
+-
+-To reprogram the configuration EEPROM select a new station address such as
+-40:00:00:12:34:56 and run this diagnostic with the options
+- --write-EEPROM --emergency-rewrite --new-hwaddr 40:00:00:12:34:56
+-");
++ printf(
++"This board has bogus information written into the configuration EEPROM.\n"
++"The configuration table is for a Realtek chip, but this board is using\n"
++"a Winbond 89c940 chip. This misprogramming usually results in an invalid\n"
++"station address, and prevents the board from being detected by standard\n"
++"drivers.\n"
++"\n"
++"To reprogram the configuration EEPROM select a new station address such as\n"
++"40:00:00:12:34:56 and run this diagnostic with the options\n"
++" --write-EEPROM --emergency-rewrite --new-hwaddr 40:00:00:12:34:56\n"
++);
+
+ return;
+ }
+
+-static char unknown_eeprom_message[] = "
+- No information is known about how to read or write the configuration
+- EEPROM of this NIC board. It is likely that this NIC is using a common
+- chip with a unique PCI ID. It may be possible to read the EEPROM by
+- explicitly specifying the chip type and I/O address:
+- ne2k-pci-diag -t 1 -p <ioaddr> # For Realtek rtl8029 chip
+- ne2k-pci-diag -t 2 -p <ioaddr> # For Winbond 89C940 chip
+- ne2k-pci-diag -t 3 -p <ioaddr> # For Holtek HT80229 chip
+- If one of these is required, please send a report to becker@scyld.com.
+-";
+-static char no_rewrite_msg[] = "
+-*** Emergency EEPROM rewrite is not yet available for this chip type.
+- ** See the Scyld diagnostic web page for updates and more information.
+- ** http://www.scyld.com/diag/index.html";
++static char unknown_eeprom_message[] =
++" No information is known about how to read or write the configuration\n"
++" EEPROM of this NIC board. It is likely that this NIC is using a common\n"
++" chip with a unique PCI ID. It may be possible to read the EEPROM by\n"
++" explicitly specifying the chip type and I/O address:\n"
++" ne2k-pci-diag -t 1 -p <ioaddr> # For Realtek rtl8029 chip\n"
++" ne2k-pci-diag -t 2 -p <ioaddr> # For Winbond 89C940 chip\n"
++" ne2k-pci-diag -t 3 -p <ioaddr> # For Holtek HT80229 chip\n"
++" If one of these is required, please send a report to becker@scyld.com.\n" ;
++static char no_rewrite_msg[] =
++"*** Emergency EEPROM rewrite is not yet available for this chip type.\n"
++" ** See the Scyld diagnostic web page for updates and more information.\n"
++" ** http://www.scyld.com/diag/index.html";
+
+ /* The examples below have 00:11:22:33:44:55 as the station address. */
+ static unsigned short winbond_default_eeprom[] = {
--- /dev/null
+--- diag-ether/Makefile~ 2002-08-02 00:00:00.000000000 +0000
++++ diag-ether/Makefile 2004-02-22 22:11:18.000000000 +0000
+@@ -16,7 +16,8 @@
+ # Diagnostics that can use libmii.
+ MDIAGS=alta-diag eepro100-diag epic-diag myson-diag\
+ natsemi-diag ns820-diag pcnet-diag rtl8139-diag starfire-diag tulip-diag \
+- via-diag vortex-diag winbond-diag yellowfin-diag
++ vortex-diag winbond-diag yellowfin-diag
++#via-diag
+ # Note: hamachi-diag and intel1000-diag require a kernel mechanism to map
+ # PCI memory regions into user-level diagnostics, and thus are not distributed.
+
--- /dev/null
+--- diag-ether/ns820-diag.c.org 2002-12-02 00:00:00.000000000 +0000
++++ diag-ether/ns820-diag.c 2004-02-22 21:46:46.000000000 +0000
+@@ -36,37 +36,37 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- ns820-diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:ab:cd
+- Set a new hardware station address. Typically diabled,
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" ns820-diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:ab:cd\n"
++" Set a new hardware station address. Typically diabled, \n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
+@@ -84,7 +84,7 @@
+
+ /* The following are required only with unaligned field accesses. */
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
++//#include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
--- /dev/null
+--- diag-ether/pci-config.c.org 2004-02-22 22:13:59.000000000 +0000
++++ diag-ether/pci-config.c 2004-02-22 22:15:14.000000000 +0000
+@@ -28,33 +28,32 @@
+ static char *usage_msg =
+ "Usage: pci-config [-aDfSvVW] [-# <device_index>]\n";
+
+-static char *long_usage_msg ="
+-
+- This program shows the contents of PCI configuration space.
+- It reads the hardware registers, and thus must be run as 'root'.
+-
+- Running this program with no options shows the installed PCI devices.
+- Each line is prefixed by its index which may be used with -#<index>
+- e.g. \"pci-config -#3\" to specify the device to operate on.
+-
+- Commonly use options are
+- -# <device-index> Operate only on DEVICE-INDEX e.g -#3
+-
+- The operations on the selected device are
+- -a --show-addresses Show PCI address registers.
+- -S --sleep Put device to sleep (ACPI D3 state)
+- -W --wake Wake a sleeping device (ACPI D0 state)
+-
+- Less commonly used options are
+- -B <bus> --bus <bus> Show only devices on BUS.
+- -A <addr> --set-addresses Set PCI address register 1 to the ADDR.
+- -D --debug Show details of operations
+- -f --force Override checks and perform the operation
+- -u --usage Show this long usage message
+- -v --verbose Verbose mode
+- -V --version Display this program's version information
+-
+-";
++static char *long_usage_msg =
++"\n"
++" This program shows the contents of PCI configuration space.\n"
++" It reads the hardware registers, and thus must be run as 'root'.\n"
++"\n"
++" Running this program with no options shows the installed PCI devices.\n"
++" Each line is prefixed by its index which may be used with -#<index>\n"
++" e.g. \"pci-config -#3\" to specify the device to operate on.\n"
++"\n"
++" Commonly use options are\n"
++" -# <device-index> Operate only on DEVICE-INDEX e.g -#3\n"
++"\n"
++" The operations on the selected device are\n"
++" -a --show-addresses Show PCI address registers.\n"
++" -S --sleep Put device to sleep (ACPI D3 state)\n"
++" -W --wake Wake a sleeping device (ACPI D0 state)\n"
++"\n"
++" Less commonly used options are\n"
++" -B <bus> --bus <bus> Show only devices on BUS.\n"
++" -A <addr> --set-addresses Set PCI address register 1 to the ADDR.\n"
++" -D --debug Show details of operations\n"
++" -f --force Override checks and perform the operation\n"
++" -u --usage Show this long usage message\n"
++" -v --verbose Verbose mode\n"
++" -V --version Display this program's version information\n"
++"\n";
+
+ #include <unistd.h>
+ #include <stdio.h>
--- /dev/null
+--- diag-ether/pcnet-diag.c.org 2004-02-22 21:49:17.000000000 +0000
++++ diag-ether/pcnet-diag.c 2004-02-22 21:49:32.000000000 +0000
+@@ -47,7 +47,7 @@
+ #include <errno.h>
+
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
++//#include <asm/unaligned.h>
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h>
--- /dev/null
+--- diag-ether/rtl8139-diag.c.org 2003-12-03 15:53:00.000000000 +0000
++++ diag-ether/rtl8139-diag.c 2004-02-22 21:54:11.000000000 +0000
+@@ -36,41 +36,41 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:89:ab
+- Set a new hardware station address. Typically disabled for safety.
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+- To read and write the boot BIOS extension Flash ROM
+- -B Show the first few bytes of the ROM
+- -L FILE Load the Flash from FILE.
+- -S FILE Store the Flash image to FILE.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:89:ab\n"
++" Set a new hardware station address. Typically disabled for safety.\n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++" To read and write the boot BIOS extension Flash ROM\n"
++" -B Show the first few bytes of the ROM\n"
++" -L FILE Load the Flash from FILE.\n"
++" -S FILE Store the Flash image to FILE.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!
--- /dev/null
+--- diag-ether/tulip-diag.c.org 2004-02-22 21:55:34.000000000 +0000
++++ diag-ether/tulip-diag.c 2004-02-22 22:01:59.000000000 +0000
+@@ -91,7 +91,7 @@
+ #include <ctype.h>
+
+ #include <asm/types.h>
+-#include <asm/unaligned.h>
++#define get_unaligned(ptr) (*(ptr))
+
+ #if defined(__linux__) && __GNU_LIBRARY__ == 1
+ #include <asm/io.h> /* Newer libraries use <sys/io.h> instead. */
--- /dev/null
+--- diag-ether/winbond-diag.c.org 2004-02-22 22:11:32.000000000 +0000
++++ diag-ether/winbond-diag.c 2004-02-22 22:12:29.000000000 +0000
+@@ -36,41 +36,41 @@
+ " For details and other options see http://www.scyld.com/diag/index.html\n";
+
+ static const char long_usage_msg[] =
+-"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]
+-
+- Show the internal state of a network adapter.
+-
+- The common usage is
+- diag -aem
+-
+- Frequently used options are
+- -a --show_all_registers Print all registers.
+- -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.
+- -m --show_mii Print the MII transceiver state
+- Using -mm monitors the link.
+- -f --force Perform operation, even on a running NIC.
+-
+- To operate on a single NIC, or one that hasn't been automatically found:
+- -# --card_num INDEX Operate on the specified card index.
+- -p --port-base IOADDR Assume an adapter at the specified I/O address.
+- -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.
+-
+- To change the persistent EEPROM settings
+- -G --parameters PARMS Set adapter-specific parameters.
+- -H --new-hwaddr 01:23:45:67:ab:cd
+- Set a new hardware station address. Typically diabled,
+- -w --write-EEPROM Actually write the new settings into the EEPROM.
+- To read and write the boot BIOS extension Flash ROM
+- -B Show the first few bytes of the ROM
+- -L FILE Load the Flash from FILE.
+- -S FILE Store the Flash image to FILE.
+-
+- -D --debug
+- -v --verbose Report each action taken.
+- -V --version Emit version information.
+-
+- -A --advertise <speed|setting> (See the mii-diag manual page.)
+-";
++"Usage: %s [-aDfrRvVw] [-AF <speed+duplex>] [-#<BoardNum>]\n"
++"\n"
++" Show the internal state of a network adapter.\n"
++"\n"
++" The common usage is\n"
++" diag -aem\n"
++"\n"
++" Frequently used options are\n"
++" -a --show_all_registers Print all registers.\n"
++" -e --show-eeprom Dump EEPROM contents, \"-ee\" shows the details.\n"
++" -m --show_mii Print the MII transceiver state\n"
++" Using -mm monitors the link.\n"
++" -f --force Perform operation, even on a running NIC.\n"
++"\n"
++" To operate on a single NIC, or one that hasn't been automatically found:\n"
++" -# --card_num INDEX Operate on the specified card index.\n"
++" -p --port-base IOADDR Assume an adapter at the specified I/O address.\n"
++" -t --chip-type TYPE Specify adapter type with '-p', use '-1' to list.\n"
++"\n"
++" To change the persistent EEPROM settings\n"
++" -G --parameters PARMS Set adapter-specific parameters.\n"
++" -H --new-hwaddr 01:23:45:67:ab:cd\n"
++" Set a new hardware station address. Typically diabled, \n"
++" -w --write-EEPROM Actually write the new settings into the EEPROM.\n"
++" To read and write the boot BIOS extension Flash ROM\n"
++" -B Show the first few bytes of the ROM\n"
++" -L FILE Load the Flash from FILE.\n"
++" -S FILE Store the Flash image to FILE.\n"
++"\n"
++" -D --debug\n"
++" -v --verbose Report each action taken.\n"
++" -V --version Emit version information.\n"
++"\n"
++" -A --advertise <speed|setting> (See the mii-diag manual page.)\n"
++"\n";
+
+ #if ! defined(__OPTIMIZE__)
+ #warning You must compile this program with the correct options!