Files
linux/drivers
Russell King 9740f4ff1a net: sfp: read eeprom in maximum 16 byte increments
[ Upstream commit 28e74a7cfd ]

Some SFP modules do not like reads longer than 16 bytes, so read the
EEPROM in chunks of 16 bytes at a time.  This behaviour is not specified
in the SFP MSAs, which specifies:

 "The serial interface uses the 2-wire serial CMOS E2PROM protocol
  defined for the ATMEL AT24C01A/02/04 family of components."

and

 "As long as the SFP+ receives an acknowledge, it shall serially clock
  out sequential data words. The sequence is terminated when the host
  responds with a NACK and a STOP instead of an acknowledge."

We must avoid breaking a read across a 16-bit quantity in the diagnostic
page, thankfully all 16-bit quantities in that page are naturally
aligned.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-11 12:20:49 +02:00
..
2019-05-31 06:46:31 -07:00
2019-05-14 19:17:53 +02:00
2019-05-14 19:17:53 +02:00
2018-08-20 11:36:07 +02:00
2018-12-21 14:15:17 +01:00
2019-05-31 06:46:34 -07:00
2018-11-13 11:08:51 -08:00
2018-11-27 16:13:09 +01:00
2019-04-27 09:36:31 +02:00
2019-05-31 06:46:14 -07:00