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:21 -07:00
2019-06-09 09:17:23 +02:00
2019-05-04 09:20:21 +02:00
2019-02-27 10:08:57 +01:00
2019-04-20 09:15:55 +02:00
2019-05-31 06:46:23 -07:00
2019-05-25 18:23:24 +02:00
2019-05-31 06:46:16 -07:00
2018-08-28 09:58:03 -07:00
2019-04-05 22:33:10 +02:00
2019-05-31 06:46:31 -07:00
2019-05-31 06:46:23 -07:00
2019-05-16 19:41:21 +02:00
2019-03-19 13:12:38 +01:00
2019-05-31 06:46:24 -07:00
2019-02-12 19:47:08 +01:00
2019-06-04 08:02:34 +02:00
2019-05-22 07:37:40 +02:00
2018-08-18 11:04:51 -07:00
2019-05-31 06:46:31 -07:00
2019-05-14 19:17:53 +02:00
2019-05-31 06:46:23 -07:00
2018-08-17 16:20:27 -07:00
2019-05-08 07:21:44 +02:00
2019-02-12 19:46:59 +01:00
2018-12-17 09:24:35 +01:00
2019-03-10 07:17:21 +01:00
2019-05-08 07:21:53 +02:00
2019-06-09 09:17:23 +02:00
2019-05-31 06:46:28 -07:00
2019-05-10 17:54:04 +02:00
2019-05-31 06:46:22 -07:00
2018-07-30 20:54:51 -07:00
2019-05-25 18:23:26 +02:00
2019-06-09 09:17:19 +02:00
2019-01-31 08:14:42 +01:00
2019-05-14 19:17:53 +02:00
2019-06-09 09:17:15 +02:00
2019-05-31 06:46:28 -07:00
2019-05-16 19:41:25 +02:00
2019-05-25 18:23:30 +02:00
2019-05-16 19:41:24 +02:00
2019-05-16 19:41:31 +02:00
2019-05-04 09:20:22 +02:00
2019-02-12 19:47:08 +01:00
2018-08-24 14:42:42 +02:00
2019-03-23 20:09:49 +01:00
2019-05-31 06:46:15 -07:00
2019-06-09 09:17:24 +02:00
2019-05-25 18:23:32 +02:00
2019-02-12 19:47:10 +01:00
2018-07-30 23:17:53 -04:00
2019-05-08 07:21:48 +02:00
2019-04-20 09:16:04 +02:00
2019-05-31 06:46:23 -07:00
2019-05-22 07:37:41 +02:00
2018-10-12 17:36:39 +02:00
2019-06-11 12:20:49 +02:00
2019-05-16 19:41:25 +02:00
2018-07-23 15:07:12 +02:00
2019-05-31 06:46:01 -07:00
2019-05-31 06:46:15 -07:00
2018-11-13 11:08:35 -08:00
2019-06-09 09:17:24 +02:00
2019-02-12 19:47:08 +01:00
2019-05-25 18:23:23 +02:00
2019-03-23 20:10:05 +01:00
2019-05-25 18:23:43 +02:00
2018-11-13 11:08:17 -08:00
2019-05-31 06:46:17 -07:00
2019-05-31 06:46:20 -07:00
2019-05-31 06:46:17 -07:00
2019-05-16 19:41:18 +02:00
2019-05-25 18:23:44 +02:00
2019-05-14 19:17:53 +02:00
2019-02-12 19:47:01 +01:00
2018-08-20 11:36:07 +02:00
2018-08-22 10:52:51 -07:00
2019-04-05 22:33:15 +02:00
2018-11-13 11:08:52 -08:00
2019-05-08 07:21:47 +02:00
2018-11-13 11:08:55 -08:00
2019-05-31 06:46:26 -07:00
2019-06-09 09:17:13 +02:00
2018-12-21 14:15:17 +01:00
2019-06-09 09:17:24 +02:00
2018-08-02 13:54:06 +02:00
2019-05-31 06:46:14 -07:00
2019-05-10 17:54:10 +02:00
2018-08-27 09:49:48 +05:30
2019-05-31 06:46:34 -07:00
2019-05-31 06:46:04 -07:00
2019-06-09 09:17:21 +02:00
2019-03-23 20:09:59 +01:00
2018-11-13 11:08:51 -08:00
2019-02-12 19:47:08 +01:00
2019-05-14 19:17:53 +02:00
2019-05-31 06:46:31 -07:00
2019-06-09 09:17:21 +02:00
2018-11-27 16:13:09 +01:00
2019-06-09 09:17:12 +02:00
2019-05-08 07:21:49 +02:00
2019-04-27 09:36:31 +02:00
2019-06-09 09:17:21 +02:00
2019-05-16 19:41:31 +02:00
2019-05-10 17:54:08 +02:00
2019-05-31 06:46:14 -07:00
2019-02-27 10:08:52 +01:00
2019-06-04 08:02:34 +02:00
2018-08-18 11:04:51 -07:00