Skip to contentSkip to conversation

net: dsa: b53: Fix for failure when irq is not defined in dt

PATCH In review Arun Parameswaran 3 participants 3 messages Feb 8, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: b53: Fix for failure when irq is not defined in dt

Fixes the issues with non BCM58XX chips in the b53 driver failing, when the irq is not specified in the device tree.

Removed the check for BCM58XX in b53_srab_prepare_irq(), so the 'port->irq' will be set to '-EXIO' if the irq is not specified in the device tree.

Fixes 16994374a6fc ("net: dsa: b53: Make SRAB driver manage port interrupts")
Fixes b2ddc48a81b5 ("net: dsa: b53: Do not fail when IRQ are not initialized")
---
 drivers/net/dsa/b53/b53_srab.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/dsa/b53/b53_srab.c +0 -3
index 90f514252987..d9c56a779c08 100644
@@ -511,9 +511,6 @@ static void b53_srab_prepare_irq(struct platform_device *pdev)
 	/* Clear all pending interrupts */
 	writel(0xffffffff, priv->regs + B53_SRAB_INTR);
 
-	if (dev->pdata && dev->pdata->chip_id != BCM58XX_DEVICE_ID)
-		return;
-
 	for (i = 0; i < B53_N_PORTS; i++) {
 		port = &priv->port_intrs[i];
 
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arun Parameswaran

Fixes the issues with non BCM58XX chips in the b53 driver failing, when the irq is not specified in the device tree.

Removed the check for BCM58XX in b53_srab_prepare_irq(), so the 'port->irq' will be set to '-EXIO' if the irq is not specified in the device tree.

Fixes 16994374a6fc ("net: dsa: b53: Make SRAB driver manage port interrupts")
Fixes b2ddc48a81b5 ("net: dsa: b53: Do not fail when IRQ are not initialized")

Thanks Arun!

Quoted 19 lines
---
 drivers/net/dsa/b53/b53_srab.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/net/dsa/b53/b53_srab.c +0 -3
index 90f514252987..d9c56a779c08 100644
@@ -511,9 +511,6 @@ static void b53_srab_prepare_irq(struct platform_device *pdev)
 	/* Clear all pending interrupts */
 	writel(0xffffffff, priv->regs + B53_SRAB_INTR);
 
-	if (dev->pdata && dev->pdata->chip_id != BCM58XX_DEVICE_ID)
-		return;
-
 	for (i = 0; i < B53_N_PORTS; i++) {
 		port = &priv->port_intrs[i];
 
Signature · 1 line
Florian
maintainer
#2 lore raw
In reply to Arun Parameswaran

From: Arun Parameswaran <[email protected]>
Date: Thu, 7 Feb 2019 16:01:18 -0800

Quoted 10 lines

Fixes the issues with non BCM58XX chips in the b53 driver failing, when the irq is not specified in the device tree.

Removed the check for BCM58XX in b53_srab_prepare_irq(), so the 'port->irq' will be set to '-EXIO' if the irq is not specified in the device tree.

Fixes 16994374a6fc ("net: dsa: b53: Make SRAB driver manage port interrupts")
Fixes b2ddc48a81b5 ("net: dsa: b53: Do not fail when IRQ are not initialized")

Applied and queued up for -stable, thanks.