diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 1949f98df937..644ec2ce6998 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -448,11 +448,20 @@ 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; @@ -489,15 +498,6 @@ fxp_attach(device_t dev) "noflow", &sc->tunable_noflow); 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. *