summaryrefslogtreecommitdiffstats
path: root/sys/dev/fxp
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2012-03-28 01:52:38 +0000
committeryongari <yongari@FreeBSD.org>2012-03-28 01:52:38 +0000
commit8dfcea07d74063103692073cbd25f2a0eef4319f (patch)
tree22a81651dd788ea042c2c016a8f0f15a6db554c9 /sys/dev/fxp
parent58e81052f33ee5383a25ab4bf3808931829d996a (diff)
downloadFreeBSD-src-8dfcea07d74063103692073cbd25f2a0eef4319f.zip
FreeBSD-src-8dfcea07d74063103692073cbd25f2a0eef4319f.tar.gz
Remove unnecessary #if as the software workaround for PCI protocol
violation should be activated unless the system is cold-booted after updating EEPROM. The PCI protocol violation happens only when established link is 10Mbps so the workaround should be updated whenever link state change is detected. Previously the workaround was activated only when user checks current media status with ifconfig(8).
Diffstat (limited to 'sys/dev/fxp')
-rw-r--r--sys/dev/fxp/if_fxp.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 96060bf..f8154c6 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -592,13 +592,11 @@ fxp_attach(device_t dev)
"EEPROM checksum @ 0x%x: 0x%x -> 0x%x\n",
i, sc->eeprom[i], cksum);
sc->eeprom[i] = cksum;
-#if 1
/*
* If the user elects to continue, try the software
* workaround, as it is better than nothing.
*/
sc->flags |= FXP_FLAG_CU_RESUME_BUG;
-#endif
}
}
@@ -2611,12 +2609,6 @@ fxp_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
mii_pollstat(mii);
ifmr->ifm_active = mii->mii_media_active;
ifmr->ifm_status = mii->mii_media_status;
-
- if (IFM_SUBTYPE(ifmr->ifm_active) == IFM_10_T &&
- sc->flags & FXP_FLAG_CU_RESUME_BUG)
- sc->cu_resume_bug = 1;
- else
- sc->cu_resume_bug = 0;
FXP_UNLOCK(sc);
}
@@ -2809,6 +2801,11 @@ fxp_miibus_statchg(device_t dev)
(IFM_AVALID | IFM_ACTIVE))
return;
+ if (IFM_SUBTYPE(mii->mii_media_active) == IFM_10_T &&
+ sc->flags & FXP_FLAG_CU_RESUME_BUG)
+ sc->cu_resume_bug = 1;
+ else
+ sc->cu_resume_bug = 0;
/*
* Call fxp_init_body in order to adjust the flow control settings.
* Note that the 82557 doesn't support hardware flow control.
OpenPOWER on IntegriCloud