lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 28 Mar 2019 05:55:40 +0000
From:   "Smith, Andrew" <Andrew.Smith@...i.com>
To:     "andrew@...n.ch" <andrew@...n.ch>,
        "f.fainelli@...il.com" <f.fainelli@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "tony@...mide.com" <tony@...mide.com>
Subject: Re: [net] net: phy: micrel: set soft_reset callback to
 genphy_soft_reset, for KSZ9031

> So far genphy_soft_reset was used automatically if the PHY driver
> didn't implement the soft_reset callback. This changed with the
> mentioned commit and broke KSZ9031. To fix this configure the
> KSZ9031 PHY driver to use genphy_soft_reset.
>
> Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
> Reported-by: Tony Lindgren <tony@...mide.com>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>

Florian Fainelli, I have had this same issue with the KSZ8081 phy, but 
was able to solve it with the same change.

I think the root of this problem is related to the phy's interaction 
with the cpu on the mii bus.

I have a board with this phy and an IMX6ULL cpu that requires this 
change to function normally.

I also have a board with this phy and a IMX253 cpu, however it does not 
require this change to function normally. On this board the phy is 
clocked differently.

Here is a patch which solves the problem for me.

Thanks, Andrew

 From 0d6af3be283377556fe60d533f2fe85f5b8a7c2c Mon Sep 17 00:00:00 2001
From: Andrew <andrew.smith@...i.com>
Date: Thu, 28 Mar 2019 15:21:45 +1000
Subject: [PATCH] net: phy: micrel: set soft_reset callback to
  genphy_soft_reset for KSZ8081

A KSZ8081 phy taking 50mhz clock in from a IMX6ULL appears to require 
the soft
reset run in drivers/net/phy/phy_device.c:phy_init_hw to function normally.

This can be fixed by configuring the phy driver to use genphy_soft_reset,
simillarly to commit: 1d16073a3268

Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset")
---
  linux/drivers/net/phy/micrel.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/linux/drivers/net/phy/micrel.c b/linux/drivers/net/phy/micrel.c
index 8d6005db75..56bacdd110 100644
--- a/linux/drivers/net/phy/micrel.c
+++ b/linux/drivers/net/phy/micrel.c
@@ -1088,6 +1088,7 @@ static struct phy_driver ksphy_driver[] = {
      .driver_data    = &ksz8081_type,
      .probe        = kszphy_probe,
      .config_init    = kszphy_config_init,
+    .soft_reset     = genphy_soft_reset,
      .ack_interrupt    = kszphy_ack_interrupt,
      .config_intr    = kszphy_config_intr,
      .get_sset_count = kszphy_get_sset_count,
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ