From: Divy Le Ray Date: Sat, 13 Feb 2010 09:44:35 +0000 (+0000) Subject: cxgb3: fix link flap X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e9449d85c67127d6f9d01aad8963d567ab02cb96;p=openwrt%2Fstaging%2Fblogic.git cxgb3: fix link flap The driver is expected to report that the link is up when the phy Rx signal is established and the mac has not detected a link fault. The code is however broken, the driver does not check the link fault status when the phy link status changes. The link fault status being checked within a short period of time, it leads to link up/link down events. Signed-off-by: Divy Le Ray Signed-off-by: David S. Miller --- diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index 032cfe065570..3ab9f51918aa 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c @@ -1262,7 +1262,8 @@ void t3_link_changed(struct adapter *adapter, int port_id) lc->fc = fc; } - t3_os_link_changed(adapter, port_id, link_ok, speed, duplex, fc); + t3_os_link_changed(adapter, port_id, link_ok && !pi->link_fault, + speed, duplex, fc); } void t3_link_fault(struct adapter *adapter, int port_id)