Skip to content

Commit 9a0a5c4

Browse files
ffainellidavem330
authored andcommitted
net: systemport: Fix ordering in intrl2_*_mask_clear macro
Since we keep shadow copies of which interrupt sources are enabled through the intrl2_*_mask_{set,clear} macros, make sure that the ordering in which we do these two operations: update the copy, then unmask the register is correct. This is not currently a problem because we actually do not use them, but we will in a subsequent patch optimizing register accesses, so better be safe here. Fixes: 80105be ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent eb60a8d commit 9a0a5c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bcmsysport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ BCM_SYSPORT_IO_MACRO(topctrl, SYS_PORT_TOPCTRL_OFFSET);
5858
static inline void intrl2_##which##_mask_clear(struct bcm_sysport_priv *priv, \
5959
u32 mask) \
6060
{ \
61-
intrl2_##which##_writel(priv, mask, INTRL2_CPU_MASK_CLEAR); \
6261
priv->irq##which##_mask &= ~(mask); \
62+
intrl2_##which##_writel(priv, mask, INTRL2_CPU_MASK_CLEAR); \
6363
} \
6464
static inline void intrl2_##which##_mask_set(struct bcm_sysport_priv *priv, \
6565
u32 mask) \

0 commit comments

Comments
 (0)