diff options
author | David S. Miller <davem@davemloft.net> | 2018-02-09 14:23:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-09 14:23:04 -0500 |
commit | 909ebd5840d158670eb88b2f73e9d38a894f28e2 (patch) | |
tree | ebec54574b541a88c0465c9a2b59ce45ace5faa1 | |
parent | faefaa97215a0c05105d7ae180fe1a3b5979ad1f (diff) | |
parent | 1029117127540fef4edcf4f0887dc3e1f7d5adb2 (diff) |
Merge branch 'stmmac-irq-fixes-cleanups'
Niklas Cassel says:
====================
stmmac irq fixes/cleanups
A couple of small stmmac irq fixes/cleanups.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 13 |
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c index 540d21786a43..ef10baf14186 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | |||
@@ -74,8 +74,6 @@ static void dwmac1000_core_init(struct mac_device_info *hw, | |||
74 | /* Mask GMAC interrupts */ | 74 | /* Mask GMAC interrupts */ |
75 | value = GMAC_INT_DEFAULT_MASK; | 75 | value = GMAC_INT_DEFAULT_MASK; |
76 | 76 | ||
77 | if (hw->pmt) | ||
78 | value &= ~GMAC_INT_DISABLE_PMT; | ||
79 | if (hw->pcs) | 77 | if (hw->pcs) |
80 | value &= ~GMAC_INT_DISABLE_PCS; | 78 | value &= ~GMAC_INT_DISABLE_PCS; |
81 | 79 | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 789dad8a07b5..7761a26ec9c5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h | |||
@@ -98,7 +98,7 @@ | |||
98 | #define GMAC_PCS_IRQ_DEFAULT (GMAC_INT_RGSMIIS | GMAC_INT_PCS_LINK | \ | 98 | #define GMAC_PCS_IRQ_DEFAULT (GMAC_INT_RGSMIIS | GMAC_INT_PCS_LINK | \ |
99 | GMAC_INT_PCS_ANE) | 99 | GMAC_INT_PCS_ANE) |
100 | 100 | ||
101 | #define GMAC_INT_DEFAULT_MASK (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN) | 101 | #define GMAC_INT_DEFAULT_ENABLE (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN) |
102 | 102 | ||
103 | enum dwmac4_irq_status { | 103 | enum dwmac4_irq_status { |
104 | time_stamp_irq = 0x00001000, | 104 | time_stamp_irq = 0x00001000, |
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c index ed222b20fcf1..63795ecafc8d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | |||
@@ -61,10 +61,9 @@ static void dwmac4_core_init(struct mac_device_info *hw, | |||
61 | 61 | ||
62 | writel(value, ioaddr + GMAC_CONFIG); | 62 | writel(value, ioaddr + GMAC_CONFIG); |
63 | 63 | ||
64 | /* Mask GMAC interrupts */ | 64 | /* Enable GMAC interrupts */ |
65 | value = GMAC_INT_DEFAULT_MASK; | 65 | value = GMAC_INT_DEFAULT_ENABLE; |
66 | if (hw->pmt) | 66 | |
67 | value |= GMAC_INT_PMT_EN; | ||
68 | if (hw->pcs) | 67 | if (hw->pcs) |
69 | value |= GMAC_PCS_IRQ_DEFAULT; | 68 | value |= GMAC_PCS_IRQ_DEFAULT; |
70 | 69 | ||
@@ -572,10 +571,12 @@ static int dwmac4_irq_status(struct mac_device_info *hw, | |||
572 | struct stmmac_extra_stats *x) | 571 | struct stmmac_extra_stats *x) |
573 | { | 572 | { |
574 | void __iomem *ioaddr = hw->pcsr; | 573 | void __iomem *ioaddr = hw->pcsr; |
575 | u32 intr_status; | 574 | u32 intr_status = readl(ioaddr + GMAC_INT_STATUS); |
575 | u32 intr_enable = readl(ioaddr + GMAC_INT_EN); | ||
576 | int ret = 0; | 576 | int ret = 0; |
577 | 577 | ||
578 | intr_status = readl(ioaddr + GMAC_INT_STATUS); | 578 | /* Discard disabled bits */ |
579 | intr_status &= intr_enable; | ||
579 | 580 | ||
580 | /* Not used events (e.g. MMC interrupts) are not handled. */ | 581 | /* Not used events (e.g. MMC interrupts) are not handled. */ |
581 | if ((intr_status & mmc_tx_irq)) | 582 | if ((intr_status & mmc_tx_irq)) |