RE: [PATCH 2/3] powerpc/dts/fsl: t4240rdb: use the Cortina PHY driver compatible

2019-01-08 Thread Camelia Alexandra Groza
> -Original Message-
> From: Scott Wood 
> Sent: Saturday, December 22, 2018 06:07
> To: Camelia Alexandra Groza ;
> robh...@kernel.org; mark.rutl...@arm.com; b...@kernel.crashing.org
> Cc: devicet...@vger.kernel.org; linux-ker...@vger.kernel.org;
> pau...@samba.org; linuxppc-dev@lists.ozlabs.org
> Subject: Re: [PATCH 2/3] powerpc/dts/fsl: t4240rdb: use the Cortina PHY
> driver compatible
> 
> On Wed, 2018-07-18 at 14:46 +0300, Camelia Groza wrote:
> > The Cortina PHY requires the use of the dedicated Cortina PHY driver
> > instead of the generic one.
> >
> > Signed-off-by: Camelia Groza 
> > ---
> >  arch/powerpc/boot/dts/fsl/t4240rdb.dts | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> > b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> > index 15eb0a3..a56a705 100644
> > --- a/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> > +++ b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> > @@ -267,22 +267,22 @@
> >
> > mdio@fd000 {
> > xfiphy1: ethernet-phy@10 {
> > -   compatible = "ethernet-phy-
> ieee802.3-
> > c45";
> > +   compatible = "ethernet-phy-
> > id13e5.1002";
> > reg = <0x10>;
> > };
> >
> > xfiphy2: ethernet-phy@11 {
> > -   compatible = "ethernet-phy-
> ieee802.3-
> > c45";
> > +   compatible = "ethernet-phy-
> > id13e5.1002";
> > reg = <0x11>;
> > };
> >
> > xfiphy3: ethernet-phy@13 {
> > -   compatible = "ethernet-phy-
> ieee802.3-
> > c45";
> > +   compatible = "ethernet-phy-
> > id13e5.1002";
> > reg = <0x13>;
> > };
> >
> > xfiphy4: ethernet-phy@12 {
> > -   compatible = "ethernet-phy-
> ieee802.3-
> > c45";
> > +   compatible = "ethernet-phy-
> > id13e5.1002";
> > reg = <0x12>;
> > };
> > };
> 
> I get crashes on boot when using a dtb with this change:

Hi

Sorry for the late replay. I was on vacation. I'm looking into it.

Regards,
Camelia


Re: [PATCH 2/3] powerpc/dts/fsl: t4240rdb: use the Cortina PHY driver compatible

2018-12-21 Thread Scott Wood
On Wed, 2018-07-18 at 14:46 +0300, Camelia Groza wrote:
> The Cortina PHY requires the use of the dedicated Cortina PHY driver
> instead of the generic one.
> 
> Signed-off-by: Camelia Groza 
> ---
>  arch/powerpc/boot/dts/fsl/t4240rdb.dts | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> index 15eb0a3..a56a705 100644
> --- a/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> +++ b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
> @@ -267,22 +267,22 @@
>  
>   mdio@fd000 {
>   xfiphy1: ethernet-phy@10 {
> - compatible = "ethernet-phy-ieee802.3-
> c45";
> + compatible = "ethernet-phy-
> id13e5.1002";
>   reg = <0x10>;
>   };
>  
>   xfiphy2: ethernet-phy@11 {
> - compatible = "ethernet-phy-ieee802.3-
> c45";
> + compatible = "ethernet-phy-
> id13e5.1002";
>   reg = <0x11>;
>   };
>  
>   xfiphy3: ethernet-phy@13 {
> - compatible = "ethernet-phy-ieee802.3-
> c45";
> + compatible = "ethernet-phy-
> id13e5.1002";
>   reg = <0x13>;
>   };
>  
>   xfiphy4: ethernet-phy@12 {
> - compatible = "ethernet-phy-ieee802.3-
> c45";
> + compatible = "ethernet-phy-
> id13e5.1002";
>   reg = <0x12>;
>   };
>   };

I get crashes on boot when using a dtb with this change:

libphy: Fixed MDIO Bus: probed
iommu: Adding device ffe488000.port to group 61
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4e1000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe489000.port to group 63
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4e3000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe48a000.port to group 64
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4e5000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe48b000.port to group 65
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4e7000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe48c000.port to group 66
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4e9000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe48d000.port to group 67
libphy: Freescale XGMAC MDIO Bus: probed
mdio_bus ffe4eb000: Error while reading PHY0 reg at 3.3
iommu: Adding device ffe49.port to group 68
libphy: Freescale XGMAC MDIO Bus: probed
iommu: Adding device ffe491000.port to group 69
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
libphy: Freescale XGMAC MDIO Bus: probed
BUG: Kernel NULL pointer dereference at 0x
Faulting instruction address: 0xc0842c1c
Oops: Kernel access of bad area, sig: 11 [#1]
BE SMP NR_CPUS=24 CoreNet Generic
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc2+ #25
NIP:  c0842c1c LR: c063426c CTR: c06341e8
REGS: c002ef1626b0 TRAP: 0300   Not tainted  (4.20.0-rc2+)
MSR:  80029000   CR: 24008482  XER: 2000
DEAR:  ESR:  IRQMASK: 0 
GPR00: c054810c c002ef162940 c0f73a00 c002ef1629b4 
GPR04:  c002ed64d128 c002ed64d128  
GPR08:   c002ef158000 0001 
GPR12: 84008488 c10f3000 c0002464  
GPR16:    0010 
GPR20: c0cad9c0 c0c8c5e0 f000 c0c8c600 
GPR24: c0a38db8   c002ec4ab748 
GPR28: c10e3b70 c0e81540  c002ec4ab400 
NIP [c0842c1c] .ethtool_convert_link_mode_to_legacy_u32+0x0/0x10
LR [c063426c] .phy_probe+0x84/0x320
Call Trace:
[c002ef162940] [c002ec4ab410] 0xc002ec4ab410 (unreliable)
[c002ef1629f0] [c054810c] .really_probe+0x268/0x3d0
[c002ef162a90] [c0545798] .bus_for_each_drv+0x7c/0xdc
[c002ef162b30] [c0547e58] .__device_attach+0x108/0x14c
[c002ef162bd0] [c0546db4] .bus_probe_device+0xcc/0xd8
[c002ef162c60] [c0543ffc] .device_add+0x4f8/0x6f8
[c002ef162d30] [c0633894] .phy_device_register+0x68/0xc8
[c002ef162db0] [c07be7a0] .of_mdiobus_register_phy+0x150/0x1dc
[c002ef162e50] [c07beea8] .of_mdiobus_register+0x14c/0x37c
[c002ef162f40]