Skip to content

Commit f6da276

Browse files
IoanaCiorneidavem330
authored andcommitted
dpaa2-switch: do not clear any interrupts automatically
The DPSW object has multiple event sources multiplexed over the same IRQ. The driver has the capability to configure only some of these events to trigger the IRQ. The dpsw_get_irq_status() can clear events automatically based on the value stored in the 'status' variable passed to it. We don't want that to happen because we could get into a situation when we are clearing more events than we actually handled. Just resort to manually clearing the events that we handled. Also, since status is not used on the out path we remove its initialization to zero. This change does not have a user-visible effect because the dpaa2-switch driver enables and handles all the DPSW events which exist at the moment. Signed-off-by: Ioana Ciornei <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 77c42a3 commit f6da276

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,9 +1509,9 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
15091509
struct device *dev = (struct device *)arg;
15101510
struct ethsw_core *ethsw = dev_get_drvdata(dev);
15111511
struct ethsw_port_priv *port_priv;
1512-
u32 status = ~0;
15131512
int err, if_id;
15141513
bool had_mac;
1514+
u32 status;
15151515

15161516
err = dpsw_get_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle,
15171517
DPSW_IRQ_INDEX_IF, &status);
@@ -1539,12 +1539,12 @@ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
15391539
dpaa2_switch_port_connect_mac(port_priv);
15401540
}
15411541

1542-
out:
15431542
err = dpsw_clear_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle,
15441543
DPSW_IRQ_INDEX_IF, status);
15451544
if (err)
15461545
dev_err(dev, "Can't clear irq status (err %d)\n", err);
15471546

1547+
out:
15481548
return IRQ_HANDLED;
15491549
}
15501550

0 commit comments

Comments
 (0)