linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
@ 2020-03-16  7:49 Chris Packham
  2020-03-16  7:49 ` [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ" Chris Packham
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Chris Packham @ 2020-03-16  7:49 UTC (permalink / raw)
  To: davem, andrew, josua; +Cc: netdev, linux-kernel, Chris Packham

I've gone ahead an sent a revert. This is the same as the original v1 except
I've added Andrew's review to the commit message.

Chris Packham (2):
  Revert "net: mvmdio: avoid error message for optional IRQ"
  net: mvmdio: avoid error message for optional IRQ

 drivers/net/ethernet/marvell/mvmdio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1


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

* [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ"
  2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
@ 2020-03-16  7:49 ` Chris Packham
  2020-03-17 14:25   ` Andrew Lunn
  2020-03-16  7:49 ` [PATCH v3 2/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Chris Packham @ 2020-03-16  7:49 UTC (permalink / raw)
  To: davem, andrew, josua; +Cc: netdev, linux-kernel, Chris Packham

This reverts commit e1f550dc44a4d535da4e25ada1b0eaf8f3417929.
platform_get_irq_optional() will still return -ENXIO when no interrupt
is provided so the additional error handling caused the driver prone to
fail when no interrupt was specified. Revert the change so we can apply
the correct minimal fix.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---
 drivers/net/ethernet/marvell/mvmdio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index d2e2dc538428..0b9e851f3da4 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
 	}
 
 
-	dev->err_interrupt = platform_get_irq_optional(pdev, 0);
+	dev->err_interrupt = platform_get_irq(pdev, 0);
 	if (dev->err_interrupt > 0 &&
 	    resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
 		dev_err(&pdev->dev,
@@ -364,8 +364,8 @@ 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) {
-		ret = dev->err_interrupt;
+	} else if (dev->err_interrupt == -EPROBE_DEFER) {
+		ret = -EPROBE_DEFER;
 		goto out_mdio;
 	}
 
-- 
2.25.1


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

* [PATCH v3 2/2] net: mvmdio: avoid error message for optional IRQ
  2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
  2020-03-16  7:49 ` [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ" Chris Packham
@ 2020-03-16  7:49 ` Chris Packham
  2020-03-17 14:24 ` [PATCH v3 0/2] " Andrew Lunn
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Chris Packham @ 2020-03-16  7:49 UTC (permalink / raw)
  To: davem, andrew, josua; +Cc: netdev, linux-kernel, Chris Packham

Per the dt-binding the interrupt is optional so use
platform_get_irq_optional() instead of platform_get_irq(). Since
commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()") platform_get_irq() produces an error message

  orion-mdio f1072004.mdio: IRQ index 0 not found

which is perfectly normal if one hasn't specified the optional property
in the device tree.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
---

Notes:
    Changes in v3:
    - return to minimal fix
    
    Changes in v2:
    - Add review from Andrew
    - Clean up error handling case

 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 0b9e851f3da4..d14762d93640 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -347,7 +347,7 @@ static int orion_mdio_probe(struct platform_device *pdev)
 	}
 
 
-	dev->err_interrupt = platform_get_irq(pdev, 0);
+	dev->err_interrupt = platform_get_irq_optional(pdev, 0);
 	if (dev->err_interrupt > 0 &&
 	    resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
 		dev_err(&pdev->dev,
-- 
2.25.1


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

* Re: [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
  2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
  2020-03-16  7:49 ` [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ" Chris Packham
  2020-03-16  7:49 ` [PATCH v3 2/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
@ 2020-03-17 14:24 ` Andrew Lunn
  2020-03-18  3:54 ` David Miller
  2020-04-08  1:19 ` Matteo Croce
  4 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2020-03-17 14:24 UTC (permalink / raw)
  To: Chris Packham; +Cc: davem, josua, netdev, linux-kernel

On Mon, Mar 16, 2020 at 08:49:05PM +1300, Chris Packham wrote:
> I've gone ahead an sent a revert. This is the same as the original v1 except
> I've added Andrew's review to the commit message.

Hi Chris

Thanks for keeping at this.

I took a look at the core code. It would of been better to call this
_nowarn, not _optional :-(

	 Andrew

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

* Re: [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ"
  2020-03-16  7:49 ` [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ" Chris Packham
@ 2020-03-17 14:25   ` Andrew Lunn
  0 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2020-03-17 14:25 UTC (permalink / raw)
  To: Chris Packham; +Cc: davem, josua, netdev, linux-kernel

On Mon, Mar 16, 2020 at 08:49:06PM +1300, Chris Packham wrote:
> This reverts commit e1f550dc44a4d535da4e25ada1b0eaf8f3417929.
> platform_get_irq_optional() will still return -ENXIO when no interrupt
> is provided so the additional error handling caused the driver prone to
> fail when no interrupt was specified. Revert the change so we can apply
> the correct minimal fix.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
  2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
                   ` (2 preceding siblings ...)
  2020-03-17 14:24 ` [PATCH v3 0/2] " Andrew Lunn
@ 2020-03-18  3:54 ` David Miller
  2020-04-08  1:19 ` Matteo Croce
  4 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2020-03-18  3:54 UTC (permalink / raw)
  To: chris.packham; +Cc: andrew, josua, netdev, linux-kernel

From: Chris Packham <chris.packham@alliedtelesis.co.nz>
Date: Mon, 16 Mar 2020 20:49:05 +1300

> I've gone ahead an sent a revert. This is the same as the original v1 except
> I've added Andrew's review to the commit message.

Applied, thanks Chris.

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

* Re: [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
  2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
                   ` (3 preceding siblings ...)
  2020-03-18  3:54 ` David Miller
@ 2020-04-08  1:19 ` Matteo Croce
  2020-04-08  1:44   ` Chris Packham
  4 siblings, 1 reply; 9+ messages in thread
From: Matteo Croce @ 2020-04-08  1:19 UTC (permalink / raw)
  To: Chris Packham; +Cc: davem, andrew, josua, netdev, linux-kernel, Luka Perkov

On Mon, 16 Mar 2020 20:49:05 +1300
Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:

> I've gone ahead an sent a revert. This is the same as the original v1
> except I've added Andrew's review to the commit message.
> 
> Chris Packham (2):
>   Revert "net: mvmdio: avoid error message for optional IRQ"
>   net: mvmdio: avoid error message for optional IRQ
> 
>  drivers/net/ethernet/marvell/mvmdio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Hi all,

I have a Macchiatobin board and the 10G port stopped working in net-next.
I suspect that these two patches could be involved.
The phy is correctly detected now (I mean no errors and the device is
registered) but no traffic can be sent or received:

root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd081]
[    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[    0.062798] libphy: Fixed MDIO Bus: probed
[    1.132552] armada8k-pcie f2600000.pcie: Phy link never came up
[    2.553464] libphy: orion_mdio_bus: probed
[    2.558045] libphy: orion_mdio_bus: probed
[    2.564037] mvpp2 f2000000.ethernet: using 8 per-cpu buffers
[    2.588754] mvpp2 f2000000.ethernet eth0: Using random mac address 1e:a6:ce:39:8d:22
[    2.599980] mvpp2 f4000000.ethernet: using 8 per-cpu buffers
[    2.623293] mvpp2 f4000000.ethernet eth1: Using random mac address aa:ad:b5:91:8c:1e
[    2.626535] mvpp2 f4000000.ethernet eth2: Using random mac address 6e:39:fb:74:09:6e
[    2.629600] mvpp2 f4000000.ethernet eth3: Using random mac address 16:ec:bf:9e:11:0f
[    2.952063] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-mii:00] driver [Marvell 88E1510] (irq=POLL)
[    2.953251] mvpp2 f4000000.ethernet eth2: configuring for phy/sgmii link mode
[    7.122899] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full - flow control rx/tx
[   25.727756] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-mii:00] driver [mv88x3310] (irq=POLL)
[   25.746711] mvpp2 f2000000.ethernet eth0: configuring for phy/10gbase-r link mode
[   27.842712] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full - flow control off


The only way to have it working is to unplug the power, boot an old
kernel, e.g. 5.3.0:

root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd081]
[    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
[    0.083647] libphy: Fixed MDIO Bus: probed
[    0.152788] armada8k-pcie f2600000.pcie: Failed to initialize PHY(s) (-22)
[    1.429643] libphy: orion_mdio_bus: probed
[    1.439109] libphy: orion_mdio_bus: probed
[    1.450989] mvpp2 f2000000.ethernet eth0: Using random mac address 5a:09:5f:97:aa:cc
[    1.476692] mvpp2 f4000000.ethernet eth1: Using random mac address f2:e2:c1:77:fa:23
[    1.479688] mvpp2 f4000000.ethernet eth2: Using random mac address b2:33:c0:2f:da:ba
[    1.482296] mvpp2 f4000000.ethernet eth3: Using random mac address 6a:38:79:2e:96:8c
[    1.814163] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-mii:00] driver [Marvell 88E1510]
[    1.814170] mvpp2 f4000000.ethernet eth2: phy: setting supported 00,00000000,000066ef advertising 00,00000000,000066ef
[    1.826025] mvpp2 f4000000.ethernet eth2: configuring for phy/sgmii link mode
[    1.826030] mvpp2 f4000000.ethernet eth2: phylink_mac_config: mode=phy/sgmii/Unknown/Unknown adv=00,00000000,000066ef pause=10 link=0 an=1
[    1.827683] mvpp2 f4000000.ethernet eth2: phy link down sgmii/1Gbps/Half
[    6.002304] mvpp2 f4000000.ethernet eth2: phy link up sgmii/1Gbps/Full
[    6.002313] mvpp2 f4000000.ethernet eth2: phylink_mac_config: mode=phy/sgmii/1Gbps/Full adv=00,00000000,00000000 pause=0f link=1 an=0
[    6.002332] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full - flow control rx/tx
[   33.186689] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-mii:00] driver [mv88x3310]
[   33.194739] mvpp2 f2000000.ethernet eth0: phy: setting supported 00,00008000,0000706f advertising 00,00008000,0000706f
[   33.218029] mvpp2 f2000000.ethernet eth0: configuring for phy/10gbase-kr link mode
[   33.225637] mvpp2 f2000000.ethernet eth0: phylink_mac_config: mode=phy/10gbase-kr/Unknown/Unknown adv=00,00008000,0000706f pause=10 link=0 an=1
[   33.241341] mvpp2 f2000000.ethernet eth0: phy link down 10gbase-kr/Unknown/Unknown
[   35.362160] mvpp2 f2000000.ethernet eth0: phy link up 10gbase-kr/10Gbps/Full
[   35.369243] mvpp2 f2000000.ethernet eth0: phylink_mac_config: mode=phy/10gbase-kr/10Gbps/Full adv=00,00000000,00000000 pause=00 link=1 an=0
[   35.381836] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full - flow control off


And then do a soft reboot to net-next which works.
By rebooting the board multiple times it works, until I unplug the power.

Any hint?
Bye,

-- 
Matteo Croce
per aspera ad upstream


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

* Re: [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
  2020-04-08  1:19 ` Matteo Croce
@ 2020-04-08  1:44   ` Chris Packham
  2020-04-10 13:46     ` Matteo Croce
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Packham @ 2020-04-08  1:44 UTC (permalink / raw)
  To: mcroce; +Cc: davem, netdev, linux-kernel, andrew, josua, luka.perkov

Hi Matteo,

On Wed, 2020-04-08 at 03:19 +0200, Matteo Croce wrote:
> On Mon, 16 Mar 2020 20:49:05 +1300
> Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> 
> > I've gone ahead an sent a revert. This is the same as the original
> > v1
> > except I've added Andrew's review to the commit message.
> > 
> > Chris Packham (2):
> >   Revert "net: mvmdio: avoid error message for optional IRQ"
> >   net: mvmdio: avoid error message for optional IRQ
> > 
> >  drivers/net/ethernet/marvell/mvmdio.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> Hi all,
> 
> I have a Macchiatobin board and the 10G port stopped working in net-
> next.
> I suspect that these two patches could be involved.
> The phy is correctly detected now (I mean no errors and the device is
> registered) but no traffic can be sent or received:
> 
> root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
> [    0.000000] Booting Linux on physical CPU 0x0000000000
> [0x410fd081]
> [    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
> [    0.062798] libphy: Fixed MDIO Bus: probed
> [    1.132552] armada8k-pcie f2600000.pcie: Phy link never came up
> [    2.553464] libphy: orion_mdio_bus: probed
> [    2.558045] libphy: orion_mdio_bus: probed
> [    2.564037] mvpp2 f2000000.ethernet: using 8 per-cpu buffers
> [    2.588754] mvpp2 f2000000.ethernet eth0: Using random mac address
> 1e:a6:ce:39:8d:22
> [    2.599980] mvpp2 f4000000.ethernet: using 8 per-cpu buffers
> [    2.623293] mvpp2 f4000000.ethernet eth1: Using random mac address
> aa:ad:b5:91:8c:1e
> [    2.626535] mvpp2 f4000000.ethernet eth2: Using random mac address
> 6e:39:fb:74:09:6e
> [    2.629600] mvpp2 f4000000.ethernet eth3: Using random mac address
> 16:ec:bf:9e:11:0f
> [    2.952063] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-
> mii:00] driver [Marvell 88E1510] (irq=POLL)
> [    2.953251] mvpp2 f4000000.ethernet eth2: configuring for
> phy/sgmii link mode
> [    7.122899] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full
> - flow control rx/tx
> [   25.727756] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-
> mii:00] driver [mv88x3310] (irq=POLL)
> [   25.746711] mvpp2 f2000000.ethernet eth0: configuring for
> phy/10gbase-r link mode
> [   27.842712] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full
> - flow control off
> 
> 
> The only way to have it working is to unplug the power, boot an old
> kernel, e.g. 5.3.0:
> 
> root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
> [    0.000000] Booting Linux on physical CPU 0x0000000000
> [0x410fd081]
> [    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
> [    0.083647] libphy: Fixed MDIO Bus: probed
> [    0.152788] armada8k-pcie f2600000.pcie: Failed to initialize
> PHY(s) (-22)
> [    1.429643] libphy: orion_mdio_bus: probed
> [    1.439109] libphy: orion_mdio_bus: probed
> [    1.450989] mvpp2 f2000000.ethernet eth0: Using random mac address
> 5a:09:5f:97:aa:cc
> [    1.476692] mvpp2 f4000000.ethernet eth1: Using random mac address
> f2:e2:c1:77:fa:23
> [    1.479688] mvpp2 f4000000.ethernet eth2: Using random mac address
> b2:33:c0:2f:da:ba
> [    1.482296] mvpp2 f4000000.ethernet eth3: Using random mac address
> 6a:38:79:2e:96:8c
> [    1.814163] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-
> mii:00] driver [Marvell 88E1510]
> [    1.814170] mvpp2 f4000000.ethernet eth2: phy: setting supported
> 00,00000000,000066ef advertising 00,00000000,000066ef
> [    1.826025] mvpp2 f4000000.ethernet eth2: configuring for
> phy/sgmii link mode
> [    1.826030] mvpp2 f4000000.ethernet eth2: phylink_mac_config:
> mode=phy/sgmii/Unknown/Unknown adv=00,00000000,000066ef pause=10
> link=0 an=1
> [    1.827683] mvpp2 f4000000.ethernet eth2: phy link down
> sgmii/1Gbps/Half
> [    6.002304] mvpp2 f4000000.ethernet eth2: phy link up
> sgmii/1Gbps/Full
> [    6.002313] mvpp2 f4000000.ethernet eth2: phylink_mac_config:
> mode=phy/sgmii/1Gbps/Full adv=00,00000000,00000000 pause=0f link=1
> an=0
> [    6.002332] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full
> - flow control rx/tx
> [   33.186689] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-
> mii:00] driver [mv88x3310]
> [   33.194739] mvpp2 f2000000.ethernet eth0: phy: setting supported
> 00,00008000,0000706f advertising 00,00008000,0000706f
> [   33.218029] mvpp2 f2000000.ethernet eth0: configuring for
> phy/10gbase-kr link mode
> [   33.225637] mvpp2 f2000000.ethernet eth0: phylink_mac_config:
> mode=phy/10gbase-kr/Unknown/Unknown adv=00,00008000,0000706f pause=10
> link=0 an=1
> [   33.241341] mvpp2 f2000000.ethernet eth0: phy link down 10gbase-
> kr/Unknown/Unknown
> [   35.362160] mvpp2 f2000000.ethernet eth0: phy link up 10gbase-
> kr/10Gbps/Full
> [   35.369243] mvpp2 f2000000.ethernet eth0: phylink_mac_config:
> mode=phy/10gbase-kr/10Gbps/Full adv=00,00000000,00000000 pause=00
> link=1 an=0
> [   35.381836] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full
> - flow control off
> 
> 
> And then do a soft reboot to net-next which works.
> By rebooting the board multiple times it works, until I unplug the
> power.
> 
> Any hint?
> Bye,
> 

Well certainly the first change that got applied commit e1f550dc44a4
("net: mvmdio: avoid error message for optional IRQ") would cause a
problem. But the revert and the corrected change commit fa2632f74e57
("net: mvmdio: avoid error message for optional IRQ") should result in
no behaviour changing (other than the spurious log message.

There is a pre-existing problem that any error other than -EPROBE_DEFER
will be silently ignored (that was what the initial attempt was trying
to handle but got it wrong). So there could be an error that might be
trying to tell you that something went wrong.

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

* Re: [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ
  2020-04-08  1:44   ` Chris Packham
@ 2020-04-10 13:46     ` Matteo Croce
  0 siblings, 0 replies; 9+ messages in thread
From: Matteo Croce @ 2020-04-10 13:46 UTC (permalink / raw)
  To: Chris Packham; +Cc: davem, netdev, linux-kernel, andrew, josua, luka.perkov

On Wed, Apr 8, 2020 at 3:45 AM Chris Packham
<Chris.Packham@alliedtelesis.co.nz> wrote:
>
> Hi Matteo,
>
> On Wed, 2020-04-08 at 03:19 +0200, Matteo Croce wrote:
> > On Mon, 16 Mar 2020 20:49:05 +1300
> > Chris Packham <chris.packham@alliedtelesis.co.nz> wrote:
> >
> > > I've gone ahead an sent a revert. This is the same as the original
> > > v1
> > > except I've added Andrew's review to the commit message.
> > >
> > > Chris Packham (2):
> > >   Revert "net: mvmdio: avoid error message for optional IRQ"
> > >   net: mvmdio: avoid error message for optional IRQ
> > >
> > >  drivers/net/ethernet/marvell/mvmdio.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> >
> > Hi all,
> >
> > I have a Macchiatobin board and the 10G port stopped working in net-
> > next.
> > I suspect that these two patches could be involved.
> > The phy is correctly detected now (I mean no errors and the device is
> > registered) but no traffic can be sent or received:
> >
> > root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
> > [    0.000000] Booting Linux on physical CPU 0x0000000000
> > [0x410fd081]
> > [    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
> > [    0.062798] libphy: Fixed MDIO Bus: probed
> > [    1.132552] armada8k-pcie f2600000.pcie: Phy link never came up
> > [    2.553464] libphy: orion_mdio_bus: probed
> > [    2.558045] libphy: orion_mdio_bus: probed
> > [    2.564037] mvpp2 f2000000.ethernet: using 8 per-cpu buffers
> > [    2.588754] mvpp2 f2000000.ethernet eth0: Using random mac address
> > 1e:a6:ce:39:8d:22
> > [    2.599980] mvpp2 f4000000.ethernet: using 8 per-cpu buffers
> > [    2.623293] mvpp2 f4000000.ethernet eth1: Using random mac address
> > aa:ad:b5:91:8c:1e
> > [    2.626535] mvpp2 f4000000.ethernet eth2: Using random mac address
> > 6e:39:fb:74:09:6e
> > [    2.629600] mvpp2 f4000000.ethernet eth3: Using random mac address
> > 16:ec:bf:9e:11:0f
> > [    2.952063] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-
> > mii:00] driver [Marvell 88E1510] (irq=POLL)
> > [    2.953251] mvpp2 f4000000.ethernet eth2: configuring for
> > phy/sgmii link mode
> > [    7.122899] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full
> > - flow control rx/tx
> > [   25.727756] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-
> > mii:00] driver [mv88x3310] (irq=POLL)
> > [   25.746711] mvpp2 f2000000.ethernet eth0: configuring for
> > phy/10gbase-r link mode
> > [   27.842712] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full
> > - flow control off
> >
> >
> > The only way to have it working is to unplug the power, boot an old
> > kernel, e.g. 5.3.0:
> >
> > root@macchiatobin:~# dmesg |grep -i -e phy -e mvpp2
> > [    0.000000] Booting Linux on physical CPU 0x0000000000
> > [0x410fd081]
> > [    0.000000] arch_timer: cp15 timer(s) running at 25.00MHz (phys).
> > [    0.083647] libphy: Fixed MDIO Bus: probed
> > [    0.152788] armada8k-pcie f2600000.pcie: Failed to initialize
> > PHY(s) (-22)
> > [    1.429643] libphy: orion_mdio_bus: probed
> > [    1.439109] libphy: orion_mdio_bus: probed
> > [    1.450989] mvpp2 f2000000.ethernet eth0: Using random mac address
> > 5a:09:5f:97:aa:cc
> > [    1.476692] mvpp2 f4000000.ethernet eth1: Using random mac address
> > f2:e2:c1:77:fa:23
> > [    1.479688] mvpp2 f4000000.ethernet eth2: Using random mac address
> > b2:33:c0:2f:da:ba
> > [    1.482296] mvpp2 f4000000.ethernet eth3: Using random mac address
> > 6a:38:79:2e:96:8c
> > [    1.814163] mvpp2 f4000000.ethernet eth2: PHY [f212a200.mdio-
> > mii:00] driver [Marvell 88E1510]
> > [    1.814170] mvpp2 f4000000.ethernet eth2: phy: setting supported
> > 00,00000000,000066ef advertising 00,00000000,000066ef
> > [    1.826025] mvpp2 f4000000.ethernet eth2: configuring for
> > phy/sgmii link mode
> > [    1.826030] mvpp2 f4000000.ethernet eth2: phylink_mac_config:
> > mode=phy/sgmii/Unknown/Unknown adv=00,00000000,000066ef pause=10
> > link=0 an=1
> > [    1.827683] mvpp2 f4000000.ethernet eth2: phy link down
> > sgmii/1Gbps/Half
> > [    6.002304] mvpp2 f4000000.ethernet eth2: phy link up
> > sgmii/1Gbps/Full
> > [    6.002313] mvpp2 f4000000.ethernet eth2: phylink_mac_config:
> > mode=phy/sgmii/1Gbps/Full adv=00,00000000,00000000 pause=0f link=1
> > an=0
> > [    6.002332] mvpp2 f4000000.ethernet eth2: Link is Up - 1Gbps/Full
> > - flow control rx/tx
> > [   33.186689] mvpp2 f2000000.ethernet eth0: PHY [f212a600.mdio-
> > mii:00] driver [mv88x3310]
> > [   33.194739] mvpp2 f2000000.ethernet eth0: phy: setting supported
> > 00,00008000,0000706f advertising 00,00008000,0000706f
> > [   33.218029] mvpp2 f2000000.ethernet eth0: configuring for
> > phy/10gbase-kr link mode
> > [   33.225637] mvpp2 f2000000.ethernet eth0: phylink_mac_config:
> > mode=phy/10gbase-kr/Unknown/Unknown adv=00,00008000,0000706f pause=10
> > link=0 an=1
> > [   33.241341] mvpp2 f2000000.ethernet eth0: phy link down 10gbase-
> > kr/Unknown/Unknown
> > [   35.362160] mvpp2 f2000000.ethernet eth0: phy link up 10gbase-
> > kr/10Gbps/Full
> > [   35.369243] mvpp2 f2000000.ethernet eth0: phylink_mac_config:
> > mode=phy/10gbase-kr/10Gbps/Full adv=00,00000000,00000000 pause=00
> > link=1 an=0
> > [   35.381836] mvpp2 f2000000.ethernet eth0: Link is Up - 10Gbps/Full
> > - flow control off
> >
> >
> > And then do a soft reboot to net-next which works.
> > By rebooting the board multiple times it works, until I unplug the
> > power.
> >
> > Any hint?
> > Bye,
> >
>
> Well certainly the first change that got applied commit e1f550dc44a4
> ("net: mvmdio: avoid error message for optional IRQ") would cause a
> problem. But the revert and the corrected change commit fa2632f74e57
> ("net: mvmdio: avoid error message for optional IRQ") should result in
> no behaviour changing (other than the spurious log message.
>
> There is a pre-existing problem that any error other than -EPROBE_DEFER
> will be silently ignored (that was what the initial attempt was trying
> to handle but got it wrong). So there could be an error that might be
> trying to tell you that something went wrong.

Indeed, it was caused by this one:

commit c9cc1c815d36f9d5723e369d662f238bc3b35d83
Author: Russell King <rmk+kernel@armlinux.org.uk>
Date:   Tue Mar 3 18:08:45 2020 +0000

    net: phy: marvell10g: place in powersave mode at probe

Thanks,
-- 
Matteo Croce
per aspera ad upstream


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

end of thread, other threads:[~2020-04-10 13:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16  7:49 [PATCH v3 0/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
2020-03-16  7:49 ` [PATCH v3 1/2] Revert "net: mvmdio: avoid error message for optional IRQ" Chris Packham
2020-03-17 14:25   ` Andrew Lunn
2020-03-16  7:49 ` [PATCH v3 2/2] net: mvmdio: avoid error message for optional IRQ Chris Packham
2020-03-17 14:24 ` [PATCH v3 0/2] " Andrew Lunn
2020-03-18  3:54 ` David Miller
2020-04-08  1:19 ` Matteo Croce
2020-04-08  1:44   ` Chris Packham
2020-04-10 13:46     ` Matteo Croce

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).