Skip to content

Commit 77c42a3

Browse files
IoanaCiorneidavem330
authored andcommitted
dpaa2-switch: add ENDPOINT_CHANGED to the irq_mask
Commit 84cba72 ("dpaa2-switch: integrate the MAC endpoint support") added support for MAC endpoints in the dpaa2-switch driver but omitted to add the ENDPOINT_CHANGED irq to the list of interrupt sources. Fix this by extending the list of events which can raise an interrupt by extending the mask passed to the dpsw_set_irq_mask() firmware API. There is no user visible impact even without this patch since whenever a switch interface is connected/disconnected from an endpoint both events are set (LINK_CHANGED and ENDPOINT_CHANGED) and, luckily, the LINK_CHANGED event could actually raise the interrupt and thus get the MAC/PHY SW configuration started. Even with this, it's better to just not rely on undocumented firmware behavior which can change. Signed-off-by: Ioana Ciornei <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d50b1a8 commit 77c42a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,9 +1550,9 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
15501550

15511551
static int dpaa2_switch_setup_irqs(struct fsl_mc_device *sw_dev)
15521552
{
1553+
u32 mask = DPSW_IRQ_EVENT_LINK_CHANGED | DPSW_IRQ_EVENT_ENDPOINT_CHANGED;
15531554
struct device *dev = &sw_dev->dev;
15541555
struct ethsw_core *ethsw = dev_get_drvdata(dev);
1555-
u32 mask = DPSW_IRQ_EVENT_LINK_CHANGED;
15561556
struct fsl_mc_device_irq *irq;
15571557
int err;
15581558

0 commit comments

Comments
 (0)