diff options
author | np <np@FreeBSD.org> | 2015-01-18 20:38:38 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2015-01-18 20:38:38 +0000 |
commit | 4c190cd51e944f0c9765ff16440dc2e5258946c7 (patch) | |
tree | 762f5cd0d8d3c8ef6ebc366720415217ce95a74f /sys/dev/cxgb/common/cxgb_aq100x.c | |
parent | 7fe8fbec77343dc12cd90833d80eb7f721248bc7 (diff) | |
download | FreeBSD-src-4c190cd51e944f0c9765ff16440dc2e5258946c7.zip FreeBSD-src-4c190cd51e944f0c9765ff16440dc2e5258946c7.tar.gz |
MFC r276959:
cxgb: replace r273280 with a more comprehensive fix.
Poll for link state when the link is down, even for interrupt capable
PHYs.
Allow PHYs to report a dubious "partial" link. If this state is seen 3
consecutive times (each check is ~1s apart) then reset the PHY. This is
a workaround for a situation where repeatedly toggling the link from the
peer gets the AEL2005 PHY into a state where it never establishes a PCS
block lock even when everything is in order.
Diffstat (limited to 'sys/dev/cxgb/common/cxgb_aq100x.c')
-rw-r--r-- | sys/dev/cxgb/common/cxgb_aq100x.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/cxgb/common/cxgb_aq100x.c b/sys/dev/cxgb/common/cxgb_aq100x.c index d36d07a..b253e67 100644 --- a/sys/dev/cxgb/common/cxgb_aq100x.c +++ b/sys/dev/cxgb/common/cxgb_aq100x.c @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy, int speed, int duplex) } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } |