sky2: fix missing register reset on error path in sky2_test_msi()
PATCH 1/1 sky2: fix missing register reset on error path in sky2_test_msi()
In sky2_test_msi() the temporarily set SW IRQ in B0 register is not reset in case that request_irq() fails.
With this patch we only set the interrupt mask if request_irq() was successful.
---
This applies against 3.3
drivers/net/ethernet/marvell/sky2.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/marvell/sky2.c +2 -2
@@ -4795,14 +4795,14 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)init_waitqueue_head (&hw->msi_wait); -sky2_write32 (hw,B0_IMSK ,Y2_IS_IRQ_SW ); - err =request_irq (pdev->irq, sky2_test_intr,0 ,DRV_NAME , hw);if (err) {dev_err (&pdev->dev,"cannot assign irq %d\n" , pdev->irq);return err; } +sky2_write32 (hw,B0_IMSK ,Y2_IS_IRQ_SW ); +sky2_write8 (hw,B0_CTST ,CS_ST_SW_IRQ );sky2_read8 (hw,B0_CTST );
Signature · 1 line
1.5.6.5
David Miller
maintainerFrom: Lino Sanfilippo <[email protected]>
Date: Fri, 30 Mar 2012 19:36:16 +0200
Quoted 5 lines
In
sky2_test_msi()the temporarily set SW IRQ in B0 register is not reset in case thatrequest_irq()fails.
With this patch we only set the interrupt mask ifrequest_irq()was successful.Signed-off-by Lino Sanfilippo <[email protected]>
Stephen, ping?
Quoted 5 lines · On Fri, 30 Mar 2012 19:36:16 +0200 Lino Sanfilippo <[email protected]>…
In
sky2_test_msi()the temporarily set SW IRQ in B0 register is not reset in case thatrequest_irq()fails.
With this patch we only set the interrupt mask ifrequest_irq()was successful.Signed-off-by Lino Sanfilippo <[email protected]>
Ok, but this is a non-serious error case. If request_irq() fails here, the driver is going to fail to load and on the failure path of sky2_probe will reset the chip on the way out.
Quoted 4 lines · Stephen Hemminger
Ok, but this is a non-serious error case. If
request_irq()fails here, the driver is going to fail to load and on the failure path ofsky2_probewill reset the chip on the way out.
Youre right, this is more a cosmetic change than a fix for a real bug.
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Tue, 3 Apr 2012 11:55:47 -0700
Quoted 7 lines
Quoted 4 lines · On Fri, 30 Mar 2012 19:36:16 +0200 Lino Sanfilippo <[email protected]>…
In
sky2_test_msi()the temporarily set SW IRQ in B0 register is not reset in case thatrequest_irq()fails.
With this patch we only set the interrupt mask ifrequest_irq()was successful.
Quoted 5 lines
Quoted 1 line
Signed-off-by Lino Sanfilippo <[email protected]>Ok, but this is a non-serious error case. If
request_irq()fails here, the driver is going to fail to load and on the failure path ofsky2_probewill reset the chip on the way out.
So, ACK for net-next? Toss it? What?
Quoted 10 lines · On Tue, 03 Apr 2012 16:30:08 -0400 (EDT) David Miller <[email protected]>…
From: Stephen Hemminger <[email protected]>
Date: Tue, 3 Apr 2012 11:55:47 -0700Quoted 7 lines
Quoted 4 lines · On Fri, 30 Mar 2012 19:36:16 +0200 Lino Sanfilippo <[email protected]>…
In
sky2_test_msi()the temporarily set SW IRQ in B0 register is not reset in case thatrequest_irq()fails.
With this patch we only set the interrupt mask ifrequest_irq()was successful.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Lino Sanfilippo <[email protected]>Ok, but this is a non-serious error case. If
request_irq()fails here, the driver is going to fail to load and on the failure path ofsky2_probewill reset the chip on the way out.So, ACK for net-next? Toss it? What?
Put it in net-next, no need for net or stable.
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Tue, 3 Apr 2012 13:59:54 -0700
Quoted 15 lines
Quoted 12 lines · On Tue, 03 Apr 2012 16:30:08 -0400 (EDT) David Miller <[email protected]>…
From: Stephen Hemminger <[email protected]>
Date: Tue, 3 Apr 2012 11:55:47 -0700Quoted 9 lines
Quoted 5 lines · On Fri, 30 Mar 2012 19:36:16 +0200 Lino Sanfilippo <[email protected]>…
In
sky2_test_msi()the temporarily set SW IRQ in B0 register is not reset in case thatrequest_irq()fails.
With this patch we only set the interrupt mask ifrequest_irq()was successful.Signed-off-by Lino Sanfilippo <[email protected]>
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Ok, but this is a non-serious error case. If
request_irq()fails here, the driver is going to fail to load and on the failure path ofsky2_probewill reset the chip on the way out.So, ACK for net-next? Toss it? What?
Put it in net-next, no need for net or stable.
Done, thanks.