Skip to content

Commit

Permalink
net: stmmac: rename GMAC_INT_DEFAULT_MASK for dwmac4
Browse files Browse the repository at this point in the history
GMAC_INT_DEFAULT_MASK is written to the interrupt enable register.
In previous versions of the IP (e.g. dwmac1000), this register was
instead an interrupt mask register.
To improve clarity and reflect reality, rename GMAC_INT_DEFAULT_MASK
to GMAC_INT_DEFAULT_ENABLE.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Niklas Cassel authored and David S. Miller committed Feb 9, 2018
1 parent 1b84ca1 commit e879b7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/dwmac4.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
#define GMAC_PCS_IRQ_DEFAULT (GMAC_INT_RGSMIIS | GMAC_INT_PCS_LINK | \
GMAC_INT_PCS_ANE)

#define GMAC_INT_DEFAULT_MASK (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN)
#define GMAC_INT_DEFAULT_ENABLE (GMAC_INT_PMT_EN | GMAC_INT_LPI_EN)

enum dwmac4_irq_status {
time_stamp_irq = 0x00001000,
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ static void dwmac4_core_init(struct mac_device_info *hw,

writel(value, ioaddr + GMAC_CONFIG);

/* Mask GMAC interrupts */
value = GMAC_INT_DEFAULT_MASK;
/* Enable GMAC interrupts */
value = GMAC_INT_DEFAULT_ENABLE;
if (hw->pmt)
value |= GMAC_INT_PMT_EN;
if (hw->pcs)
Expand Down

0 comments on commit e879b7a

Please sign in to comment.