Commit 786ceeaf authored by Jeff Garzik's avatar Jeff Garzik

Add config option to enable natsemi net driver hardware bug workaround.

"some" systems with "some" cables see a large amount of errors,
due to a hardware bug.  This bug is (apparently) not probe-able;
however it only appears on rare reference boards and the like,
so we simply add a config option and default the option to OFF.

Further detail:
When CONFIG_NATSEMI_CABLE_MAGIC option is enabled, PMDCSR_VAL
register value becomes 0x1898, a value provided by a NatSemi
app note.  This enables a workaround for a hardware bug
which is (apparently) not probe-able.  Luckily the hardware bug
is (apparently) not common either, so we default to disabling
this workaround.

Contributor: Tim Hockin
parent 4dae3030
...@@ -1154,6 +1154,17 @@ CONFIG_NATSEMI ...@@ -1154,6 +1154,17 @@ CONFIG_NATSEMI
More specific information and updates are available from More specific information and updates are available from
<http://www.scyld.com/network/natsemi.html>. <http://www.scyld.com/network/natsemi.html>.
CONFIG_NATSEMI_CABLE_MAGIC
Some systems see lots of errors with NatSemi ethernet controllers
on certain cables. If you are seeing lots of errors, try turning
this option on. Some boards have incorrect values for supporting
resistors that can cause this change to break. If you turn this
option on and your network suddenly stops working, turn this
option off.
Say N unless you are certain you need this option.
Vendors should not enable this option by default.
CONFIG_SK_G16 CONFIG_SK_G16
If you have a network (Ethernet) card of this type, say Y and read If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from the Ethernet-HOWTO, available from
......
...@@ -171,6 +171,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then ...@@ -171,6 +171,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
dep_tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Mylex EISA LNE390A/B support (EXPERIMENTAL)' CONFIG_LNE390 $CONFIG_EISA $CONFIG_EXPERIMENTAL
dep_tristate ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI dep_tristate ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $CONFIG_PCI
dep_tristate ' National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI dep_tristate ' National Semiconductor DP8381x series PCI Ethernet support' CONFIG_NATSEMI $CONFIG_PCI
if [ "$CONFIG_NATSEMI" = "y" -o "$CONFIG_NATSEMI" = "m" ]; then
bool ' NatSemi workaround for high errors' CONFIG_NATSEMI_CABLE_MAGIC
fi
dep_tristate ' PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI dep_tristate ' PCI NE2000 and clones support (see help)' CONFIG_NE2K_PCI $CONFIG_PCI
dep_tristate ' Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Novell/Eagle/Microdyne NE3210 EISA support (EXPERIMENTAL)' CONFIG_NE3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
dep_tristate ' Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL dep_tristate ' Racal-Interlan EISA ES3210 support (EXPERIMENTAL)' CONFIG_ES3210 $CONFIG_EISA $CONFIG_EXPERIMENTAL
......
...@@ -394,7 +394,11 @@ enum register_offsets { ...@@ -394,7 +394,11 @@ enum register_offsets {
SDCFG = 0xF8 SDCFG = 0xF8
}; };
/* the values for the 'magic' registers above (PGSEL=1) */ /* the values for the 'magic' registers above (PGSEL=1) */
#ifdef CONFIG_NATSEMI_CABLE_MAGIC
#define PMDCSR_VAL 0x1898
#else
#define PMDCSR_VAL 0x189C #define PMDCSR_VAL 0x189C
#endif
#define TSTDAT_VAL 0x0 #define TSTDAT_VAL 0x0
#define DSPCFG_VAL 0x5040 #define DSPCFG_VAL 0x5040
#define SDCFG_VAL 0x008c #define SDCFG_VAL 0x008c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment