summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@rum.normnet.org>2002-02-08 08:27:49 -0500
committerJeff Garzik <jgarzik@rum.normnet.org>2002-02-08 08:27:49 -0500
commit786ceeafd316d60da2cd02c3531feae88f88b23d (patch)
tree0f65a5f48c3b8cdc5f0ccba039ed39827d30a8f1 /drivers
parent4dae3030779696859b449262488b8e24b72c1c18 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/Config.help11
-rw-r--r--drivers/net/Config.in3
-rw-r--r--drivers/net/natsemi.c4
3 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/Config.help b/drivers/net/Config.help
index d34d5ca4569f..fe7ba7ec616a 100644
--- a/drivers/net/Config.help
+++ b/drivers/net/Config.help
@@ -1154,6 +1154,17 @@ CONFIG_NATSEMI
More specific information and updates are available from
<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
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
diff --git a/drivers/net/Config.in b/drivers/net/Config.in
index 818dabe64263..8e0c833cad1e 100644
--- a/drivers/net/Config.in
+++ b/drivers/net/Config.in
@@ -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 ' Myson MTD-8xx PCI Ethernet support' CONFIG_FEALNX $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 ' 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
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index a94d694536b6..15a766522949 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -394,7 +394,11 @@ enum register_offsets {
SDCFG = 0xF8
};
/* the values for the 'magic' registers above (PGSEL=1) */
+#ifdef CONFIG_NATSEMI_CABLE_MAGIC
+#define PMDCSR_VAL 0x1898
+#else
#define PMDCSR_VAL 0x189C
+#endif
#define TSTDAT_VAL 0x0
#define DSPCFG_VAL 0x5040
#define SDCFG_VAL 0x008c