All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nagaraju Lakkaraju <Raju.Lakkaraju@microsemi.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	Allan Nielsen <Allan.Nielsen@microsemi.com>
Subject: Re: Microsemi VSC 8531/41 PHY Driver
Date: Thu, 4 Aug 2016 14:47:15 +0530	[thread overview]
Message-ID: <20160804091714.GA3786@microsemi.com> (raw)
In-Reply-To: <20160729081736.GB13798@lunn.ch>

On Fri, Jul 29, 2016 at 10:17:36AM +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL
> 
> 
> > > +/* RGMII Rx Clock delay value change with board lay-out */ static u8
> > > +rgmii_rx_clk_delay = RGMII_RX_CLK_DELAY_1_1_NS;
> >
> > Doesn't this stop you from having a board with two PHYs with different layouts? You should be getting this value from the device tree.
> >
> > Raju: As of now, RGMII Rx clock delay value should be 1.1 nsec as optimized/recommended value.
> > We tested on Beaglebone Black with VSC 8531 PHY.
> > We would like to provide new function to configure correct/require value based on PHY layouts
> > alone with other RGMII configuration parameters as part of our next implementation.
> 
> Please either do it properly now or hard code it as the default, and
> then later replace it with device tree, etc. We don't like to see half
> finished features.
> 

I accepted your review comment. I do hard code it as the default values.

> > What are you locking against?
> >
> > Raju: VSC 8531 has different PAGEs. Whenever MDC/MDIO access the PHY control registers,
> > first set the page number then read/write the register address. Default page should be Page 0.
> > When I want to access not default page register, I have to lock phy device access and change
> > the page number and register access as atomic operation.
> 
> I understand all that, which is why i asked, "what are you locking
> against?", not "why are you locking?" What are the other call paths? I
> don't see you taking this lock anywhere else? Should you be? I would
> just like to see a comment which suggests you understand when this
> lock is needed, and when not.
> 

This is Read Modify Write (RMW) operation on register MSCC_PHY_RGMII_CNTL. This register in different page i.e. EXTENDED-2. I would like to execute all these operations in atomic.
I also use the mutex in different functions. But not in this patch.

>      Andrew

  reply	other threads:[~2016-08-04 11:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26  9:49 Microsemi VSC 8531/41 PHY Driver Raju Lakkaraju
2016-07-26 11:55 ` Andrew Lunn
2016-07-26 12:20   ` Raju Lakkaraju
2016-07-26 12:43     ` Andrew Lunn
2016-07-28  6:44       ` Raju Lakkaraju
2016-07-28 17:35         ` Florian Fainelli
2016-08-04  9:31           ` Nagaraju Lakkaraju
2016-07-29  8:04         ` Andrew Lunn
2016-07-29  8:17         ` Andrew Lunn
2016-08-04  9:17           ` Nagaraju Lakkaraju [this message]
2016-08-05 12:24           ` Nagaraju Lakkaraju
2016-08-16 19:41             ` Andrew Lunn
2016-08-16 19:48             ` Andrew Lunn
2016-09-08  8:39               ` [PATCH net-next 1/1] net: phy: Fixed checkpatch errors for Microsemi PHYs Raju Lakkaraju
2016-09-10  1:16                 ` 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=20160804091714.GA3786@microsemi.com \
    --to=raju.lakkaraju@microsemi.com \
    --cc=Allan.Nielsen@microsemi.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.