From: Andrew Lunn <andrew@lunn.ch>
To: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP
Date: Sun, 20 Jan 2019 20:32:34 +0100 [thread overview]
Message-ID: <20190120193234.GD19714@lunn.ch> (raw)
In-Reply-To: <1547848493-16985-1-git-send-email-Bryan.Whitehead@microchip.com>
On Fri, Jan 18, 2019 at 04:54:53PM -0500, Bryan Whitehead wrote:
> The LAN743x includes on chip One-Time-Programmable (OTP) memory.
>
> This patch extends the ethtool EEPROM read/write interface to
> access OTP memory space.
>
> This is done by adding the private flag OTP_ACCESS, which is used
> to switch between EEPROM, and OTP modes.
>
> The private flag OTP_ACCESS is configurable through the
> ethtool --set-priv-flags command.
> And visible through the
> ethtool --show-priv-flags command.
Hi Bryan
It would be good to explain what is wrong with the current code, which
allows you to select between the OTP and the EEPROM at write time.
> +static int lan743x_ethtool_set_priv_flags(struct net_device *netdev, u32 flags)
> +{
> + struct lan743x_adapter *adapter = netdev_priv(netdev);
> +
> + adapter->flags = flags;
> +
> + return 0;
> +}
Is the EEPROM mandatory? Could there be designs without an EEPROM?
When setting the private flag here, should you probe to see if there
actually is an EEPROM and return -ENODEV if it is missing.
Andrew
next prev parent reply other threads:[~2019-01-20 19:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-18 21:54 [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP Bryan Whitehead
2019-01-20 19:32 ` Andrew Lunn [this message]
2019-01-21 18:06 ` Bryan.Whitehead
2019-01-21 18:16 ` Andrew Lunn
2019-01-21 20:30 ` Bryan.Whitehead
2019-01-21 18:26 ` Andrew Lunn
2019-01-21 21:12 ` Bryan.Whitehead
2019-01-21 22:33 ` Andrew Lunn
2019-01-22 19:21 ` Bryan.Whitehead
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=20190120193234.GD19714@lunn.ch \
--to=andrew@lunn.ch \
--cc=Bryan.Whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--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).