summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/fxp/if_fxp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 1949f98..644ec2c 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -449,10 +449,19 @@ fxp_attach(device_t dev)
fxp_autosize_eeprom(sc);
/*
+ * Find out the chip revision; lump all 82557 revs together.
+ */
+ fxp_read_eeprom(sc, &data, 5, 1);
+ if ((data >> 8) == 1)
+ sc->revision = FXP_REV_82557;
+ else
+ sc->revision = pci_get_revid(dev);
+
+ /*
* Determine whether we must use the 503 serial interface.
*/
fxp_read_eeprom(sc, &data, 6, 1);
- if (sc->revision <= FXP_REV_82557 && (data & FXP_PHY_DEVICE_MASK) != 0
+ if (sc->revision == FXP_REV_82557 && (data & FXP_PHY_DEVICE_MASK) != 0
&& (data & FXP_PHY_SERIAL_ONLY))
sc->flags |= FXP_FLAG_SERIAL_MEDIA;
@@ -490,15 +499,6 @@ fxp_attach(device_t dev)
sc->rnr = 0;
/*
- * Find out the chip revision; lump all 82557 revs together.
- */
- fxp_read_eeprom(sc, &data, 5, 1);
- if ((data >> 8) == 1)
- sc->revision = FXP_REV_82557;
- else
- sc->revision = pci_get_revid(dev);
-
- /*
* Enable workarounds for certain chip revision deficiencies.
*
* Systems based on the ICH2/ICH2-M chip from Intel, and possibly
OpenPOWER on IntegriCloud