]> git.neil.brown.name Git - history.git/commitdiff
Add config option to enable natsemi net driver hardware bug workaround.
authorJeff Garzik <jgarzik@rum.normnet.org>
Fri, 8 Feb 2002 13:27:49 +0000 (08:27 -0500)
committerJeff Garzik <jgarzik@rum.normnet.org>
Fri, 8 Feb 2002 13:27:49 +0000 (08:27 -0500)
"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

drivers/net/Config.help
drivers/net/Config.in
drivers/net/natsemi.c

index d34d5ca4569fe618fd3733275f8581b84b491d27..fe7ba7ec616af4b47f7acab0ed3f2c5a19ce1522 100644 (file)
@@ -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
index 818dabe642638a603562e2cf1ef5965f84205db6..8e0c833cad1e53b3c469e5d93a666bcb2ecfd031 100644 (file)
@@ -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
index a94d694536b62a536b8ba9710a2fdf9ca4e16100..15a76652294903092a5a5e4add5624f51d4cb721 100644 (file)
@@ -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