netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Einon <mark.einon@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: et131x: Remove redundant register read
Date: Fri, 17 Jul 2020 16:21:51 +0100	[thread overview]
Message-ID: <de7ace0ba7a8efb775ddf841b17564744cb83cff.camel@gmail.com> (raw)
In-Reply-To: <20200717134008.GB1336433@lunn.ch>

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. 

Best regards,

Mark



  reply	other threads:[~2020-07-17 15:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 13:21 [PATCH] net: ethernet: et131x: Remove redundant register read Mark Einon
2020-07-17 13:40 ` Andrew Lunn
2020-07-17 15:21   ` Mark Einon [this message]
2020-07-18 14:54     ` Andrew Lunn
2020-07-18  1:48 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de7ace0ba7a8efb775ddf841b17564744cb83cff.camel@gmail.com \
    --to=mark.einon@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).