diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-06-02 15:13:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-03 15:16:37 -0700 |
commit | 28e74a7cfd6403f0d1c0f8b10b45d6fae37b227e (patch) | |
tree | b755263cde381c8daafcd4c3c1c67a7211a51ae6 /drivers/net/phy/at803x.c | |
parent | 67c0aaa1eaec60e9dab301012bdebe6726ae04bd (diff) | |
download | blackbird-op-linux-28e74a7cfd6403f0d1c0f8b10b45d6fae37b227e.tar.gz blackbird-op-linux-28e74a7cfd6403f0d1c0f8b10b45d6fae37b227e.zip |
net: sfp: read eeprom in maximum 16 byte increments
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>
Diffstat (limited to 'drivers/net/phy/at803x.c')
0 files changed, 0 insertions, 0 deletions