RE: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-22 Thread Bryan.Whitehead
> > > This is breaking backwards compatibility. I think you need to > > > respect the magic value, independent of how adapter->flags. > > > > Is backwards compatibility a requirement? > > Hi Bryan > > You should not change the ABI. And this is an ABI. So yes, backwards > compatibility should be m

Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Andrew Lunn
> > This is breaking backwards compatibility. I think you need to respect the > > magic value, independent of how adapter->flags. > > Is backwards compatibility a requirement? Hi Bryan You should not change the ABI. And this is an ABI. So yes, backwards compatibility should be maintained. Maybe

RE: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Bryan.Whitehead
> > +static int lan743x_otp_write(struct lan743x_adapter *adapter, u32 offset, > > +u32 length, u8 *data) > > +{ > > + int ret; > > + int i; > > + > > + ret = lan743x_otp_power_up(adapter); > > + if (ret < 0) > > + return ret; > > + > > + ret = lan743x_ot

RE: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Bryan.Whitehead
> > > 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. > > > > Hi Andrew, > > > > The current code does not allow OTP read access. > > Plus the current code places unreasonable rest

Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Andrew Lunn
> +static int lan743x_otp_write(struct lan743x_adapter *adapter, u32 offset, > + u32 length, u8 *data) > +{ > + int ret; > + int i; > + > + ret = lan743x_otp_power_up(adapter); > + if (ret < 0) > + return ret; > + > + ret = lan743x_otp_wait_t

Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Andrew Lunn
On Mon, Jan 21, 2019 at 06:06:20PM +, bryan.whiteh...@microchip.com wrote: > > 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

RE: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-21 Thread Bryan.Whitehead
> 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, whic

Re: [PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-20 Thread Andrew Lunn
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 >

[PATCH v1 net-next] lan743x: Provide Read/Write Access to on chip OTP

2019-01-18 Thread Bryan Whitehead
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 config