netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: mvmdio: fix driver probe on missing irq
@ 2020-03-19  1:29 Marek Behún
  2020-03-19  2:00 ` Chris Packham
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Behún @ 2020-03-19  1:29 UTC (permalink / raw)
  To: netdev; +Cc: Marek Behún, Chris Packham, Andrew Lunn

Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
return -ENXIO when interrupt is missing. Handle this as non-error,
otherwise the driver won't probe.

Fixes: e1f550dc44a4 ("net: mvmdio: avoid error message for optional...")
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/ethernet/marvell/mvmdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index d2e2dc538428..f9f09da57031 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -364,7 +364,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
 		writel(MVMDIO_ERR_INT_SMI_DONE,
 			dev->regs + MVMDIO_ERR_INT_MASK);
 
-	} else if (dev->err_interrupt < 0) {
+	} else if (dev->err_interrupt < 0 && dev->err_interrupt != -ENXIO) {
 		ret = dev->err_interrupt;
 		goto out_mdio;
 	}
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvmdio: fix driver probe on missing irq
  2020-03-19  1:29 [PATCH net-next] net: mvmdio: fix driver probe on missing irq Marek Behún
@ 2020-03-19  2:00 ` Chris Packham
  2020-03-19  4:21   ` Marek Behun
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2020-03-19  2:00 UTC (permalink / raw)
  To: netdev, marek.behun; +Cc: andrew

Hi Marek,

On Thu, 2020-03-19 at 02:29 +0100, Marek Behún wrote:
> Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
> return -ENXIO when interrupt is missing. Handle this as non-error,
> otherwise the driver won't probe.

This has already been fixed in net/master by reverting e1f550dc44a4 and
replacing it with fa2632f74e57bbc869c8ad37751a11b6147a3acc.

> 
> Fixes: e1f550dc44a4 ("net: mvmdio: avoid error message for optional...")
> Signed-off-by: Marek Behún <marek.behun@nic.cz>
> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Andrew Lunn <andrew@lunn.ch>
> ---
>  drivers/net/ethernet/marvell/mvmdio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
> index d2e2dc538428..f9f09da57031 100644
> --- a/drivers/net/ethernet/marvell/mvmdio.c
> +++ b/drivers/net/ethernet/marvell/mvmdio.c
> @@ -364,7 +364,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
>  		writel(MVMDIO_ERR_INT_SMI_DONE,
>  			dev->regs + MVMDIO_ERR_INT_MASK);
>  
> -	} else if (dev->err_interrupt < 0) {
> +	} else if (dev->err_interrupt < 0 && dev->err_interrupt != -ENXIO) {
>  		ret = dev->err_interrupt;
>  		goto out_mdio;
>  	}

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvmdio: fix driver probe on missing irq
  2020-03-19  2:00 ` Chris Packham
@ 2020-03-19  4:21   ` Marek Behun
  2020-03-19  4:27     ` Chris Packham
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Behun @ 2020-03-19  4:21 UTC (permalink / raw)
  To: Chris Packham; +Cc: netdev, andrew

On Thu, 19 Mar 2020 02:00:57 +0000
Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> Hi Marek,
> 
> On Thu, 2020-03-19 at 02:29 +0100, Marek Behún wrote:
> > Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
> > return -ENXIO when interrupt is missing. Handle this as non-error,
> > otherwise the driver won't probe.  
> 
> This has already been fixed in net/master by reverting e1f550dc44a4 and
> replacing it with fa2632f74e57bbc869c8ad37751a11b6147a3acc.

:( It isn't in net-next. I've spent like an hour debugging it :-D

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvmdio: fix driver probe on missing irq
  2020-03-19  4:21   ` Marek Behun
@ 2020-03-19  4:27     ` Chris Packham
  2020-03-19  4:36       ` Marek Behun
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Packham @ 2020-03-19  4:27 UTC (permalink / raw)
  To: marek.behun; +Cc: netdev, andrew

On Thu, 2020-03-19 at 05:21 +0100, Marek Behun wrote:
> On Thu, 19 Mar 2020 02:00:57 +0000
> Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> 
> > Hi Marek,
> > 
> > On Thu, 2020-03-19 at 02:29 +0100, Marek Behún wrote:
> > > Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
> > > return -ENXIO when interrupt is missing. Handle this as non-error,
> > > otherwise the driver won't probe.  
> > 
> > This has already been fixed in net/master by reverting e1f550dc44a4 and
> > replacing it with fa2632f74e57bbc869c8ad37751a11b6147a3acc.
> 
> :( It isn't in net-next. I've spent like an hour debugging it :-D

I can only offer my humble apologies and promise to do better next
time. I did test the first minimally correct change, but clearly
stuffed up on v2.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvmdio: fix driver probe on missing irq
  2020-03-19  4:27     ` Chris Packham
@ 2020-03-19  4:36       ` Marek Behun
  2020-03-19  8:58         ` Andrew Lunn
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Behun @ 2020-03-19  4:36 UTC (permalink / raw)
  To: Chris Packham; +Cc: netdev, andrew

On Thu, 19 Mar 2020 04:27:56 +0000
Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:

> On Thu, 2020-03-19 at 05:21 +0100, Marek Behun wrote:
> > On Thu, 19 Mar 2020 02:00:57 +0000
> > Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> >   
> > > Hi Marek,
> > > 
> > > On Thu, 2020-03-19 at 02:29 +0100, Marek Behún wrote:  
> > > > Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
> > > > return -ENXIO when interrupt is missing. Handle this as non-error,
> > > > otherwise the driver won't probe.    
> > > 
> > > This has already been fixed in net/master by reverting e1f550dc44a4 and
> > > replacing it with fa2632f74e57bbc869c8ad37751a11b6147a3acc.  
> > 
> > :( It isn't in net-next. I've spent like an hour debugging it :-D  
> 
> I can only offer my humble apologies and promise to do better next
> time. I did test the first minimally correct change, but clearly
> stuffed up on v2.

That's ok, but this should be also in net-next as well. Has Dave
forgotten to apply it there, or is there some other plan?
Marek

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] net: mvmdio: fix driver probe on missing irq
  2020-03-19  4:36       ` Marek Behun
@ 2020-03-19  8:58         ` Andrew Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2020-03-19  8:58 UTC (permalink / raw)
  To: Marek Behun; +Cc: Chris Packham, netdev

On Thu, Mar 19, 2020 at 05:36:59AM +0100, Marek Behun wrote:
> On Thu, 19 Mar 2020 04:27:56 +0000
> Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> 
> > On Thu, 2020-03-19 at 05:21 +0100, Marek Behun wrote:
> > > On Thu, 19 Mar 2020 02:00:57 +0000
> > > Chris Packham <Chris.Packham@alliedtelesis.co.nz> wrote:
> > >   
> > > > Hi Marek,
> > > > 
> > > > On Thu, 2020-03-19 at 02:29 +0100, Marek Behún wrote:  
> > > > > Commit e1f550dc44a4 made the use of platform_get_irq_optional, which can
> > > > > return -ENXIO when interrupt is missing. Handle this as non-error,
> > > > > otherwise the driver won't probe.    
> > > > 
> > > > This has already been fixed in net/master by reverting e1f550dc44a4 and
> > > > replacing it with fa2632f74e57bbc869c8ad37751a11b6147a3acc.  
> > > 
> > > :( It isn't in net-next. I've spent like an hour debugging it :-D  
> > 
> > I can only offer my humble apologies and promise to do better next
> > time. I did test the first minimally correct change, but clearly
> > stuffed up on v2.
> 
> That's ok, but this should be also in net-next as well. Has Dave
> forgotten to apply it there, or is there some other plan?

It probably went into net. It then takes around a week before net is
merged into net-next.

       Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-19  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19  1:29 [PATCH net-next] net: mvmdio: fix driver probe on missing irq Marek Behún
2020-03-19  2:00 ` Chris Packham
2020-03-19  4:21   ` Marek Behun
2020-03-19  4:27     ` Chris Packham
2020-03-19  4:36       ` Marek Behun
2020-03-19  8:58         ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).