aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_tunnel.c
diff options
context:
space:
mode:
authorBryan Whitehead <Bryan.Whitehead@microchip.com>2019-01-23 15:18:47 -0500
committerDavid S. Miller <davem@davemloft.net>2019-01-26 09:35:21 -0800
commit662a14d0c71e9e775383b0fd6796c9eb47d29ecc (patch)
tree0a9c531ce33f619435954a7a81d2864385dfb144 /net/ipv4/ip_tunnel.c
parentMerge branch 'hns3-next' (diff)
downloadlinux-dev-662a14d0c71e9e775383b0fd6796c9eb47d29ecc.tar.xz
linux-dev-662a14d0c71e9e775383b0fd6796c9eb47d29ecc.zip
lan743x: Provide Read/Write Access to on chip OTP
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_tunnel.c')
0 files changed, 0 insertions, 0 deletions