Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Chris Ruehl

On Thursday, April 19, 2018 09:34 AM, Chris Ruehl wrote:



On Thursday, April 19, 2018 09:21 AM, Chris Ruehl wrote:

On Wednesday, April 18, 2018 09:02 PM, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 02:56:01PM +0200, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 09:34:16AM +0800, Chris Ruehl wrote:

Hello,

I like to get your heads up at a regression introduced in 4.9.94
commitment lead to a kernel ops and make the network unusable on my MX6DL
customized board.

Race condition resume is called on startup and the phy not yet initialized.


Hi Chris

Please could you try

bfe72442578b ("net: phy: micrel: fix crash when statistic requested for 
KSZ9031 phy")


I don't think it is a complete fix. I suspect "Micrel KSZ8795",
"Micrel KSZ886X Switch", "Micrel KSZ8061", and "Micrel KS8737" will
still have problems.

Those four probably need a:

 .probe  = kszphy_probe,

Andrew



Indeed I have the
[    7.385851] Micrel KSZ9031 Gigabit PHY 2188000.ethernet-1:05: attached PHY 
driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet-1:05, 
irq=-1)


first I rollback to a non crashing stable kernel.

As "bfe72442578b" gonna fix it I check with the next update and verify its 
works for me.


Thanks
Chris


Andrew,

Change my mind. Find the patch you mentioned and will apply and test.

Chris


Andrew,

make a micro patch only and can confirm to add the .probe fix the ops.

But the imx serial is broken :-( ! have to have a look into it.

--- linux-4.9/drivers/net/phy/micrel.c.orig 2018-04-19 09:37:45.64800 
+0800
+++ linux-4.9/drivers/net/phy/micrel.c  2018-04-19 09:44:54.35600 +0800
@@ -974,6 +974,7 @@
.features   = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
.flags  = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
.driver_data= _type,
+   .probe  = kszphy_probe,
.config_init= ksz9021_config_init,
.config_aneg= genphy_config_aneg,
.read_status= genphy_read_status,
@@ -993,6 +994,7 @@
.features   = (PHY_GBIT_FEATURES | SUPPORTED_Pause),
.flags  = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
.driver_data= _type,
+   .probe  = kszphy_probe,
.config_init= ksz9031_config_init,
.config_aneg= genphy_config_aneg,
.read_status= ksz9031_read_status,

[7.219735] Micrel KSZ9031 Gigabit PHY 2188000.ethernet-1:04: attached PHY 
driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet-1:04, irq=-1)




Regards
Chris



--
GTSYS Limited RFID Technology
9/F, Unit E, R07, Kwai Shing Industrial Building Phase 2,
42-46 Tai Lin Pai Road, Kwai Chung, N.T., Hong Kong
Tel (852) 9079 9521

Disclaimer: https://www.gtsys.com.hk/email/classified.html


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Chris Ruehl



On Thursday, April 19, 2018 09:21 AM, Chris Ruehl wrote:

On Wednesday, April 18, 2018 09:02 PM, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 02:56:01PM +0200, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 09:34:16AM +0800, Chris Ruehl wrote:

Hello,

I like to get your heads up at a regression introduced in 4.9.94
commitment lead to a kernel ops and make the network unusable on my MX6DL
customized board.

Race condition resume is called on startup and the phy not yet initialized.


Hi Chris

Please could you try

bfe72442578b ("net: phy: micrel: fix crash when statistic requested for 
KSZ9031 phy")


I don't think it is a complete fix. I suspect "Micrel KSZ8795",
"Micrel KSZ886X Switch", "Micrel KSZ8061", and "Micrel KS8737" will
still have problems.

Those four probably need a:

 .probe  = kszphy_probe,

Andrew



Indeed I have the
[    7.385851] Micrel KSZ9031 Gigabit PHY 2188000.ethernet-1:05: attached PHY 
driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet-1:05, 
irq=-1)


first I rollback to a non crashing stable kernel.

As "bfe72442578b" gonna fix it I check with the next update and verify its works 
for me.


Thanks
Chris


Andrew,

Change my mind. Find the patch you mentioned and will apply and test.

Chris


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Chris Ruehl

On Wednesday, April 18, 2018 09:02 PM, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 02:56:01PM +0200, Andrew Lunn wrote:

On Wed, Apr 18, 2018 at 09:34:16AM +0800, Chris Ruehl wrote:

Hello,

I like to get your heads up at a regression introduced in 4.9.94
commitment lead to a kernel ops and make the network unusable on my MX6DL
customized board.

Race condition resume is called on startup and the phy not yet initialized.


Hi Chris

Please could you try

bfe72442578b ("net: phy: micrel: fix crash when statistic requested for KSZ9031 
phy")


I don't think it is a complete fix. I suspect "Micrel KSZ8795",
"Micrel KSZ886X Switch", "Micrel KSZ8061", and "Micrel KS8737" will
still have problems.

Those four probably need a:

 .probe  = kszphy_probe,

Andrew



Indeed I have the
[7.385851] Micrel KSZ9031 Gigabit PHY 2188000.ethernet-1:05: attached PHY 
driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet-1:05, irq=-1)


first I rollback to a non crashing stable kernel.

As "bfe72442578b" gonna fix it I check with the next update and verify its works 
for me.


Thanks
Chris


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Andrew Lunn
On Wed, Apr 18, 2018 at 02:56:01PM +0200, Andrew Lunn wrote:
> On Wed, Apr 18, 2018 at 09:34:16AM +0800, Chris Ruehl wrote:
> > Hello,
> > 
> > I like to get your heads up at a regression introduced in 4.9.94
> > commitment lead to a kernel ops and make the network unusable on my MX6DL
> > customized board.
> > 
> > Race condition resume is called on startup and the phy not yet initialized.
> 
> Hi Chris
> 
> Please could you try
> 
> bfe72442578b ("net: phy: micrel: fix crash when statistic requested for 
> KSZ9031 phy")

I don't think it is a complete fix. I suspect "Micrel KSZ8795",
"Micrel KSZ886X Switch", "Micrel KSZ8061", and "Micrel KS8737" will
still have problems.

Those four probably need a:

.probe  = kszphy_probe,

Andrew


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Andrew Lunn
On Wed, Apr 18, 2018 at 09:34:16AM +0800, Chris Ruehl wrote:
> Hello,
> 
> I like to get your heads up at a regression introduced in 4.9.94
> commitment lead to a kernel ops and make the network unusable on my MX6DL
> customized board.
> 
> Race condition resume is called on startup and the phy not yet initialized.

Hi Chris

Please could you try

bfe72442578b ("net: phy: micrel: fix crash when statistic requested for KSZ9031 
phy")

 Andrew


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-18 Thread Andrew Lunn
> If I look at the patch I think it should call kszphy_config_init() not 
> _reset()
> in the resume function:
> 
> 
> @@ -715,8 +723,14 @@ static int kszphy_suspend(struct phy_device *phydev)
> 
>  static int kszphy_resume(struct phy_device *phydev)
>  {
> + int ret;
> +
>   genphy_resume(phydev);
> 
> - ret = kszphy_config_reset(phydev);
> +   ret = kszphy_config_init(phydev);
> + if (ret)
> + return ret;
> +
> 

Hi Chris

I think there has been a patch for this posted. If i remember
correctly, the PHY you have does not call probe, hence phydev->priv is
a NULL pointer, so priv->rmii_ref_clk_sel does not work.

It would be good to find the patch and make sure it has been accepted,
and marked for stable.

Andrew


Re: [Regression] net/phy/micrel.c v4.9.94

2018-04-17 Thread Chris Ruehl

On Wednesday, April 18, 2018 09:34 AM, Chris Ruehl wrote:

Hello,

I like to get your heads up at a regression introduced in 4.9.94
commitment lead to a kernel ops and make the network unusable on my MX6DL 
customized board.


Race condition resume is called on startup and the phy not yet initialized.

[    7.313366] Unable to handle kernel NULL pointer dereference at virtual 
address 0008

[    7.321602] pgd = ecfc

[    7.324950] [0008] *pgd=8e901831

[    7.328652] Internal error: Oops: 17 [#1] PREEMPT SMP ARM

[    7.334061] Modules linked in:

[    7.337146] CPU: 0 PID: 269 Comm: ip Not tainted 4.9.94 #11

[    7.342725] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

[    7.349259] task: ece59900 task.stack: ec9ea000

[    7.353809] PC is at kszphy_config_reset+0x14/0x148

[    7.358703] LR is at kszphy_resume+0x1c/0x6c

[    7.362983] pc : []    lr : []    psr: 60030013

[    7.362983] sp : ec9eb918  ip : ec9eb938  fp : ec9eb934

[    7.374467] r10: 0007  r9 :   r8 : ee693c00

[    7.379700] r7 :   r6 :   r5 :   r4 : ee6fc000

[    7.386234] r3 : 0001  r2 :   r1 : 0110  r0 : ee6fc000

[    7.392768] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none

[    7.399911] Control: 10c5387d  Table: 3cfc004a  DAC: 0051

[    7.405663] Process ip (pid: 269, stack limit = 0xec9ea210)

[    7.411244] Stack: (0xec9eb918 to 0xec9ec000)

[    7.415611] b900: ee6fc000 
[    7.423800] b920: ee031000  ec9eb94c ec9eb938 c056a4fc c056a244 
ee6fc000 
[    7.431988] b940: ec9eb97c ec9eb950 c05681e4 c056a4ec 0007 ee6fc000 
ee6fc000 c056ce7c
[    7.440174] b960: c056ce7c ee031000 ee55c818  ec9eb99c ec9eb980 
c05683cc c0568134
[    7.448364] b980: 0007 ec9eba10 ee6fc000 0007 ec9eb9c4 ec9eb9a0 
c0568450 c05683bc
[    7.456550] b9a0: 0007 0005 ee031000 ec9eb9d3 0200 c1508da4 
ec9eba6c ec9eb9c8
[    7.464736] b9c0: c056ce24 c0568410 0005 ee03162c 3201 30383831 
652e3030 72656874
[    7.472921] b9e0: 2d74656e 0031 03e8 00c8 c01732ec c0172adc 
03e8 00c8
[    7.481109] ba00: 024000c0 ee55c000 c150e454 024000c0 38383132 2e303030 
65687465 74656e72
[    7.489296] ba20: 303a312d ee35 ec9eba6c ec9eba38 c0224b50 c0175eb8 
ec9eba6c c056eb44
[    7.497482] ba40: c056bbe0 f0c16000 ee031000 ee55c000 0200 f0c16000 
ee031000 ee55c000
[    7.505667] ba60: ec9ebaa4 ec9eba70 c056eba4 c056cd1c 0001 ee03162c 
ec9ebaa4 ee031000
[    7.513855] ba80:  c09566ec ee031030  ec9ccd10 ecb39900 
ec9ebacc ec9ebaa8
[    7.522043] baa0: c06ad6e0 c056e92c ec9ebacc ee031000 ee031000 0001 
1003 1002
[    7.530229] bac0: ec9ebaf4 ec9ebad0 c06ad99c c06ad63c 1002 ee031000 
ee031148 1002
[    7.538414] bae0:   ec9ebb1c ec9ebaf8 c06ada6c c06ad90c 
1002 
[    7.546601] bb00: ee031000 ec9ebc28  c09566ec ec9ebb94 ec9ebb20 
c06c1034 c06ada58
[    7.554787] bb20: c0c50df8 2e184000 ec9ebb44 ec9ebb38 c0173528 c0173320 
ec9ebbd4 c0e82b6c
[    7.562972] bb40:  ece59dc8 ebb4e9d0 c9eae3f3 ece59900 0003 
ece59900 005e
[    7.571157] bb60: c14e30ec c0d1e51c ece59900  ee031000 ec9ccd00 
 
[    7.579346] bb80: ec9ebb98  ec9ebd04 ec9ebb98 c06c30cc c06c0d68 
ec9ebbc4 
[    7.587531] bba0: c01758bc ecb39900 c09eb3a0 ec9ccd20  ec9ccd10 
0001 ece59900
[    7.595715] bbc0: c01e0e64   0001 ec9ebbfc  
 
[    7.603900] bbe0:    ff00 ec9ebc0c ec9ebc00 
c0173528 c0173320
[    7.612084] bc00: ec9ebc9c ec9ebc10 c01e0e64 c0173520  000e 
ece59900 0096
[    7.620269] bc20: c14e30ec c0d1e51c     
 
[    7.628452] bc40:       
 
[    7.636636] bc60:       
 
[    7.644819] bc80:       
 
[    7.653003] bca0:       
 
[    7.661186] bcc0:       
c06d3870 
[    7.669372] bce0: ec9ccd00 ecb39900 c15226e4   ecb39900 
ec9ebd44 ec9ebd08
[    7.677556] bd00: c06c343c c06c2bdc c0869c2c c0173520 0001  
c06c06e4 
[    7.685741] bd20:  ec9ccd00 c06c32b8 ecb39900 ecb39900  
ec9ebd64 ec9ebd48
[    7.693926] bd40: c06d86cc c06c32c4  ecb39900 0020 ec970400 
ec9ebd7c ec9ebd68
[    7.702110] bd60: c06c06f4 c06d8630 c06c06c4 ee15f400 ec9ebdac ec9ebd80 
c06d802c c06c06d0
[    7.710294] bd80: ec9ebf50 7fff ec970400 ec9ebf48 ec970400  
0020 
[    7.718477] bda0: ec9ebe0c ec9ebdb0 c06d84e8 c06d7ec8 000c ec9ebe48 
000c 
[    7.726661] bdc0: beee97bc 

[Regression] net/phy/micrel.c v4.9.94

2018-04-17 Thread Chris Ruehl

Hello,

I like to get your heads up at a regression introduced in 4.9.94
commitment lead to a kernel ops and make the network unusable on my MX6DL 
customized board.


Race condition resume is called on startup and the phy not yet initialized.

[7.313366] Unable to handle kernel NULL pointer dereference at virtual 
address 0008 

[7.321602] pgd = ecfc 



[7.324950] [0008] *pgd=8e901831 



[7.328652] Internal error: Oops: 17 [#1] PREEMPT SMP ARM 



[7.334061] Modules linked in: 



[7.337146] CPU: 0 PID: 269 Comm: ip Not tainted 4.9.94 #11 



[7.342725] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) 



[7.349259] task: ece59900 task.stack: ec9ea000 



[7.353809] PC is at kszphy_config_reset+0x14/0x148 



[7.358703] LR is at kszphy_resume+0x1c/0x6c 



[7.362983] pc : []lr : []psr: 60030013 



[7.362983] sp : ec9eb918  ip : ec9eb938  fp : ec9eb934 



[7.374467] r10: 0007  r9 :   r8 : ee693c00 



[7.379700] r7 :   r6 :   r5 :   r4 : ee6fc000 



[7.386234] r3 : 0001  r2 :   r1 : 0110  r0 : ee6fc000 



[7.392768] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none 



[7.399911] Control: 10c5387d  Table: 3cfc004a  DAC: 0051 



[7.405663] Process ip (pid: 269, stack limit = 0xec9ea210) 



[7.411244] Stack: (0xec9eb918 to 0xec9ec000) 



[7.415611] b900: 
ee6fc000  

[7.423800] b920: ee031000  ec9eb94c ec9eb938 c056a4fc c056a244 
ee6fc000  

[7.431988] b940: ec9eb97c ec9eb950 c05681e4 c056a4ec 0007 ee6fc000 
ee6fc000 c056ce7c 

[7.440174] b960: c056ce7c ee031000 ee55c818  ec9eb99c ec9eb980 
c05683cc c0568134 

[7.448364] b980: 0007 ec9eba10 ee6fc000 0007 ec9eb9c4 ec9eb9a0 
c0568450 c05683bc 

[7.456550] b9a0: 0007 0005 ee031000 ec9eb9d3 0200 c1508da4 
ec9eba6c ec9eb9c8 

[7.464736] b9c0: c056ce24 c0568410 0005 ee03162c 3201 30383831 
652e3030 72656874 

[7.472921] b9e0: 2d74656e 0031 03e8 00c8 c01732ec c0172adc 
03e8 00c8 

[7.481109] ba00: 024000c0 ee55c000 c150e454 024000c0 38383132 2e303030 
65687465 74656e72 

[7.489296] ba20: 303a312d ee35 ec9eba6c ec9eba38 c0224b50 c0175eb8 
ec9eba6c c056eb44 

[7.497482] ba40: c056bbe0 f0c16000 ee031000 ee55c000 0200 f0c16000 
ee031000 ee55c000 

[7.505667] ba60: ec9ebaa4 ec9eba70 c056eba4 c056cd1c 0001 ee03162c 
ec9ebaa4 ee031000 

[7.513855] ba80:  c09566ec ee031030  ec9ccd10 ecb39900 
ec9ebacc ec9ebaa8 

[7.522043] baa0: c06ad6e0 c056e92c ec9ebacc ee031000 ee031000 0001 
1003 1002 

[7.530229] bac0: ec9ebaf4 ec9ebad0 c06ad99c c06ad63c 1002 ee031000 
ee031148 1002 

[7.538414] bae0:   ec9ebb1c ec9ebaf8 c06ada6c c06ad90c 
1002  

[7.546601] bb00: ee031000 ec9ebc28  c09566ec ec9ebb94 ec9ebb20 
c06c1034 c06ada58 

[7.554787] bb20: c0c50df8 2e184000 ec9ebb44 ec9ebb38 c0173528 c0173320 
ec9ebbd4 c0e82b6c 

[7.562972] bb40:  ece59dc8 ebb4e9d0 c9eae3f3 ece59900 0003 
ece59900 005e 

[7.571157] bb60: c14e30ec c0d1e51c ece59900  ee031000 ec9ccd00 
  

[7.579346] bb80: ec9ebb98  ec9ebd04 ec9ebb98 c06c30cc c06c0d68 
ec9ebbc4  

[7.587531] bba0: c01758bc ecb39900 c09eb3a0 ec9ccd20  ec9ccd10 
0001 ece59900 

[7.595715] bbc0: c01e0e64   0001 ec9ebbfc  
  

[7.603900] bbe0:    ff00 ec9ebc0c ec9ebc00 
c0173528 c0173320 

[7.612084] bc00: ec9ebc9c ec9ebc10 c01e0e64 c0173520  000e 
ece59900 0096 

[7.620269] bc20: c14e30ec c0d1e51c     
  

[7.628452] bc40:       
  

[7.636636] bc60:       
  

[7.644819] bc80:       
  

[7.653003] bca0:       
  

[7.661186] bcc0:       
c06d3870  

[7.669372] bce0: ec9ccd00 ecb39900 c15226e4   ecb39900 
ec9ebd44 ec9ebd08 

[7.677556] bd00: c06c343c c06c2bdc c0869c2c c0173520 0001  
c06c06e4  

[7.685741] bd20:  ec9ccd00 c06c32b8 ecb39900 ecb39900  
ec9ebd64 ec9ebd48 

[7.693926] bd40: c06d86cc c06c32c4  ecb39900 0020 ec970400 
ec9ebd7c ec9ebd68 

[7.702110] bd60: c06c06f4 c06d8630 c06c06c4 ee15f400 ec9ebdac ec9ebd80 
c06d802c c06c06d0 

[7.710294] bd80: ec9ebf50 7fff ec970400 ec9ebf48 ec970400  
0020  

[7.718477] bda0: ec9ebe0c ec9ebdb0 c06d84e8 c06d7ec8