]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: add an error interrupt handler for the sgmii
authorTimur Tabi <timur@codeaurora.org>
Fri, 27 Jan 2017 22:43:48 +0000 (16:43 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jan 2017 00:07:02 +0000 (19:07 -0500)
commitf6bd08b9b2fcd29b022128e35e59e899367ac1d7
tree0dc31f4a8d67dbc675a99c5e7def5aa10f058ab2
parent33a6eb59cf9c330380d90d39f9d38acf5ef5427d
net: qcom/emac: add an error interrupt handler for the sgmii

The SGMII (internal PHY) can report decode errors via an interrupt.  It
can also report autonegotiation status changes, but we don't need to track
those.  The SGMII can recover automatically from most decode errors, so
we only reset the interface if we get multiple consecutive errors.

It's possible for bogus decode errors to be reported while the link is
being brought up.  The interrupt is registered when the interface is
opened, and it's enabled after the link is up.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-mac.c
drivers/net/ethernet/qualcomm/emac/emac-sgmii.c
drivers/net/ethernet/qualcomm/emac/emac-sgmii.h
drivers/net/ethernet/qualcomm/emac/emac.c