diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2020-09-09 17:25:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-09 14:22:41 -0700 |
commit | b4b17714c3775bd4d5d0d3852b32d862eea0e1e9 (patch) | |
tree | 2e86dba2eb72857ddc9647b4946b39bc6551f6b9 /drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | |
parent | net: mvpp2: rename mis-named "link status" interrupt (diff) | |
download | linux-dev-b4b17714c3775bd4d5d0d3852b32d862eea0e1e9.tar.xz linux-dev-b4b17714c3775bd4d5d0d3852b32d862eea0e1e9.zip |
net: mvpp2: check first level interrupt status registers
Check the first level interrupt status registers to determine how to
further process the port interrupt. We will need this to know whether
to invoke the link status processing and/or the PTP processing for
both XLG and GMAC.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index d85ba26ba886..8a1f03f9d5d7 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -3039,14 +3039,23 @@ static void mvpp2_isr_handle_gmac_internal(struct mvpp2_port *port) static irqreturn_t mvpp2_port_isr(int irq, void *dev_id) { struct mvpp2_port *port = (struct mvpp2_port *)dev_id; + u32 val; mvpp22_gop_mask_irq(port); if (mvpp2_port_supports_xlg(port) && mvpp2_is_xlg(port->phy_interface)) { - mvpp2_isr_handle_xlg(port); + /* Check the external status register */ + val = readl(port->base + MVPP22_XLG_EXT_INT_STAT); + if (val & MVPP22_XLG_EXT_INT_STAT_XLG) + mvpp2_isr_handle_xlg(port); } else { - mvpp2_isr_handle_gmac_internal(port); + /* If it's not the XLG, we must be using the GMAC. + * Check the summary status. + */ + val = readl(port->base + MVPP22_GMAC_INT_SUM_STAT); + if (val & MVPP22_GMAC_INT_SUM_STAT_INTERNAL) + mvpp2_isr_handle_gmac_internal(port); } mvpp22_gop_unmask_irq(port); |