Skip to content

Commit b2ddc48

Browse files
ffainellidavem330
authored andcommitted
net: dsa: b53: Do not fail when IRQ are not initialized
When the Device Tree is not providing the per-port interrupts, do not fail during b53_srab_irq_enable() but instead bail out gracefully. The SRAB driver is used on the BCM5301X (Northstar) platforms which do not yet have the SRAB interrupts wired up. Fixes: 1699437 ("net: dsa: b53: Make SRAB driver manage port interrupts") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8bb83b7 commit b2ddc48

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/net/dsa/b53/b53_srab.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,13 @@ static int b53_srab_irq_enable(struct b53_device *dev, int port)
415415
{
416416
struct b53_srab_priv *priv = dev->priv;
417417
struct b53_srab_port_priv *p = &priv->port_intrs[port];
418-
int ret;
418+
int ret = 0;
419+
420+
/* Interrupt is optional and was not specified, do not make
421+
* this fatal
422+
*/
423+
if (p->irq == -ENXIO)
424+
return ret;
419425

420426
ret = request_threaded_irq(p->irq, b53_srab_port_isr,
421427
b53_srab_port_thread, 0,

0 commit comments

Comments
 (0)