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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Dec 2019 14:46:06 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Sam Lewis <sam.vr.lewis@...il.com>
Cc:     steve.glendinning@...well.net, UNGLinuxDriver@...rochip.com,
        netdev@...r.kernel.org
Subject: Re: PROBLEM: smsc95xx loses config on link down/up

On Thu, Nov 28, 2019 at 06:19:14PM +1100, Sam Lewis wrote:
> I'm using a LAN9514 chip in my embedded Linux device and have noticed
> that changing Ethernet configuration (with ethtool for example) does
> not persist after putting the link up.

Hi Sam

Did you ever get a reply to this?

> I've hacked through the driver code (without really knowing what I'm
> doing, just adding various print statements) and I think this happens
> because setting a link up causes the `smsc95xx_reset` function to be
> called which seems to clear all configuration through:
> 
> 1) Doing a PHY reset (with `smsc95xx_write_reg(dev, PM_CTRL, PM_CTL_PHY_RST_)`)
> 2) Doing (another?) PHY reset (with `smsc95xx_mdio_write(dev->net,
> dev->mii.phy_id, MII_BMCR, BMCR_RESET)`)

In general, BMCR_RESET does not clear configuration registers such as
auto-neg etc. It generally just gives the PHY a kick to restart itself
using the configuration as set. So i would initially point a finger at
PM_CTL_PHY_RST_.

Is there a full datasheet somewhere?

You might want to think about using PM_CTL_PHY_RST_ once during probe,
and only BMCR_RESET in open.

    Andrew

Powered by blists - more mailing lists