]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 23 Feb 2017 20:29:31 +0000 (14:29 -0600)
commit1f40844e02030862722db15c705106394d612fbb
tree14ffd48376e84c5795a4b7efdf2b90d28f8a5cbf
parent1b8b5151c98113d00fbd491418eead384dc73450
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>
(cherry picked from commit fd0e97b806f0331df95f5fc58cdd488d169efb7f)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
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