summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2005-04-22 13:05:53 +0000
committermux <mux@FreeBSD.org>2005-04-22 13:05:53 +0000
commitc5baa061e7e1aee4739ed1fa82f370c66c137c2f (patch)
treec3b2cb911369ee9376a8058cad31c25ade6a77b2 /sys/dev/fxp
parent13322eaf9bf51b3cb07a19237fea84cdd013e9e1 (diff)
downloadFreeBSD-src-c5baa061e7e1aee4739ed1fa82f370c66c137c2f.zip
FreeBSD-src-c5baa061e7e1aee4739ed1fa82f370c66c137c2f.tar.gz
Be more conservative when enabling extended features. There are fxp(4)
NICs out there that have an utterly bogus revision ID. Reported by: Denis Shaposhnikov <dsh@vlink.ru>
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c6
-rw-r--r--sys/dev/fxp/if_fxpreg.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 1a702de..57f197f 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -579,7 +579,9 @@ fxp_attach(device_t dev)
* too, but that's already enabled by the code above.
* Be careful to do this only on the right devices.
*/
- if (sc->revision >= FXP_REV_82550) {
+ if (sc->revision == FXP_REV_82550 || sc->revision == FXP_REV_82550_C ||
+ sc->revision == FXP_REV_82551_E || sc->revision == FXP_REV_82551_F
+ || sc->revision == FXP_REV_82551_10) {
sc->rfa_size = sizeof (struct fxp_rfa);
sc->tx_cmd = FXP_CB_COMMAND_IPCBXMIT;
sc->flags |= FXP_FLAG_EXT_RFA;
@@ -2643,7 +2645,7 @@ struct ucode {
D102_B_CPUSAVER_DWORD, D102_B_CPUSAVER_BUNDLE_MAX_DWORD },
{ FXP_REV_82550_C, UCODE(fxp_ucode_d102c),
D102_C_CPUSAVER_DWORD, D102_C_CPUSAVER_BUNDLE_MAX_DWORD },
- { FXP_REV_82551, UCODE(fxp_ucode_d102e),
+ { FXP_REV_82551_F, UCODE(fxp_ucode_d102e),
D102_E_CPUSAVER_DWORD, D102_E_CPUSAVER_BUNDLE_MAX_DWORD },
{ 0, NULL, 0, 0, 0 }
};
diff --git a/sys/dev/fxp/if_fxpreg.h b/sys/dev/fxp/if_fxpreg.h
index 9981475..e6bb98b 100644
--- a/sys/dev/fxp/if_fxpreg.h
+++ b/sys/dev/fxp/if_fxpreg.h
@@ -468,4 +468,6 @@ struct fxp_stats {
#define FXP_REV_82559S_A 9 /* 82559S A stepping */
#define FXP_REV_82550 12
#define FXP_REV_82550_C 13 /* 82550 C stepping */
-#define FXP_REV_82551 15 /* 82551 */
+#define FXP_REV_82551_E 14 /* 82551 */
+#define FXP_REV_82551_F 15 /* 82551 */
+#define FXP_REV_82551_10 16 /* 82551 */
OpenPOWER on IntegriCloud