linux/drivers/net/dsa
Florian Fainelli 4f101c4779 net: dsa: bcm_sf2: Fix race condition while unmasking interrupts
We kept shadow copies of which interrupt sources we have enabled and
disabled, but due to an order bug in how intrl2_mask_clear was defined,
we could run into the following scenario:

CPU0					CPU1
intrl2_1_mask_clear(..)
sets INTRL2_CPU_MASK_CLEAR
					bcm_sf2_switch_1_isr
					read INTRL2_CPU_STATUS and masks with stale
					irq1_mask value
updates irq1_mask value

Which would make us loop again and again trying to process and interrupt
we are not clearing since our copy of whether it was enabled before
still indicates it was not. Fix this by updating the shadow copy first,
and then unasking at the HW level.

Fixes: 246d7f773c ("net: dsa: add Broadcom SF2 switch driver")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-08-25 16:49:25 -07:00
..
b53 net: dsa: b53: Add missing ULL suffix for 64-bit constant 2016-08-06 00:11:08 -04:00
mv88e6xxx net: mv88e6xxx: Fix ingress rate removal for mv6131 chips 2016-08-23 16:57:33 -07:00
bcm_sf2_regs.h net: dsa: bcm_sf2: Add VLAN registers definitions 2016-06-09 22:12:49 -07:00
bcm_sf2.c net: dsa: bcm_sf2: Unwind errors in correct order 2016-07-30 23:14:52 -07:00
bcm_sf2.h net: dsa: bcm_sf2: Fix race condition while unmasking interrupts 2016-08-25 16:49:25 -07:00
Kconfig net: dsa: mv88e6xxx: move driver in its own folder 2016-06-25 11:29:47 -04:00
Makefile net: dsa: mv88e6xxx: move driver in its own folder 2016-06-25 11:29:47 -04:00
mv88e6060.c net: dsa: constify probed name 2016-04-17 18:54:14 -04:00
mv88e6060.h net: dsa: Keep the mii bus and address in the private structure 2016-04-13 18:15:23 -04:00