From: David Miller <davem@davemloft.net>
To: Bryan.Whitehead@microchip.com
Cc: netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v2 net-next] lan743x: Provide Read/Write Access to on chip OTP
Date: Sat, 26 Jan 2019 09:35:44 -0800 (PST) [thread overview]
Message-ID: <20190126.093544.1739344002260262403.davem@davemloft.net> (raw)
In-Reply-To: <1548274727-23771-1-git-send-email-Bryan.Whitehead@microchip.com>
From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Date: Wed, 23 Jan 2019 15:18:47 -0500
> The LAN743x includes on chip One-Time-Programmable (OTP) memory.
>
> This patch extends the ethtool EEPROM read/write interface to
> access OTP memory space.
>
> The currently existing interface is limited, as it does not
> allow OTP read, and OTP writes are restricted to
> offset==0, length==512, and data[0]==0xF3.
>
> This patch removes these restrictions and adds a private flag
> called 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.
>
> By default OTP_ACCESS is false, and there for previously existing
> EEPROM commands will work exactly the same. However now access to
> OTP requires one extra step of setting OTP_ACCESS to true. This
> flag controls the read, write, and length reporting, functions
> of ethtool.
>
> EEPROM presence is not checked when setting or clearing this flag.
> If the EEPROM is not present, the user, as before, will need to
> diagnose that using existing read and write function of ethtool,
> while OTP_ACCESS is false.
>
> Updates for V2:
> Added comments as to why this patch is needed.
> Added comments explaining that EEPROM presence is not check
> when setting or clearing the OTP_ACCESS flag.
> Added length checking to all otp/eeprom read/write functions.
>
> Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Applied, thanks.
prev parent reply other threads:[~2019-01-26 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 20:18 [PATCH v2 net-next] lan743x: Provide Read/Write Access to on chip OTP Bryan Whitehead
2019-01-26 17:35 ` David Miller [this message]
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=20190126.093544.1739344002260262403.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Bryan.Whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox