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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200718145436.GB1375379@lunn.ch>
Date:   Sat, 18 Jul 2020 16:54:36 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Mark Einon <mark.einon@...il.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: ethernet: et131x: Remove redundant register read

On Fri, Jul 17, 2020 at 04:21:51PM +0100, Mark Einon wrote:
> On Fri, 2020-07-17 at 15:40 +0200, Andrew Lunn wrote:
> > On Fri, Jul 17, 2020 at 02:21:35PM +0100, Mark Einon wrote:
> > > Following the removal of an unused variable assignment (remove
> > > unused variable 'pm_csr') the associated register read can also go,
> > > as the read also occurs in the subsequent 
> > > call.
> > 
> > Hi Mark
> > 
> > Do you have any hardware documentation which indicates these read are
> > not required? Have you looked back through the git history to see if
> > there are any comments about these read?
> > 
> > Hardware reads which appear pointless are sometimes very important to
> > actually make the hardware work.
> > 
> > 	 Andrew
> 
> Hi Andrew,
> 
> Yes - I'm aware of such effects. In the original vendor driver (
> https://gitlab.com/einonm/Legacy-et131x) the read of this register ( 
> pm_phy_sw_coma) is not wrapped in a function call and is always called
> once when needed.
> 
> Also in the current kernel driver et1310_in_phy_coma() is called a few
> other times without the removed read being made.
> 
> The datasheet I have for a similar device (et1011) doesn't say anything
> other than the register should be read/write.
> 
> So I think this is a safe thing to do. 

Hi Mark

It is good to include this sort of information in the commit
message. It makes it clear you have considered this, and it stops
people like me asking...

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ