linux-uconsole/drivers/net
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
..
appletalk
arcnet
bonding bonding/802.3ad: fix slave link initialization transition states 2019-06-04 08:02:30 +02:00
caif
can can: flexcan: FLEXCAN_IFLAG_MB: add () around macro argument 2019-03-23 20:10:05 +01:00
dsa net: dsa: mv88e6xxx: fix handling of upper half of STATS_TYPE_PORT 2019-06-04 08:02:31 +02:00
ethernet net: mvpp2: Use strscpy to handle stat strings 2019-06-11 12:20:48 +02:00
fddi
fjes
hamradio net/hamradio/6pack: use mod_timer() to rearm timers 2019-01-09 17:38:32 +01:00
hippi
hyperv hv_netvsc: fix race that may miss tx queue wakeup 2019-05-31 06:46:09 -07:00
ieee802154 net: ieee802154: fix missing checks for regmap_update_bits 2019-05-25 18:23:43 +02:00
ipvlan ipvlan: disallow userns cap_net_admin to change global mode/flags 2019-03-19 13:12:40 +01:00
netdevsim
phy net: sfp: read eeprom in maximum 16 byte increments 2019-06-11 12:20:49 +02:00
plip
ppp ppp: deflate: Fix possible crash in deflate_init 2019-05-25 18:23:21 +02:00
slip slip: make slhc_free() silently accept an error pointer 2019-05-02 09:58:56 +02:00
team team: fix possible recursive locking when add slaves 2019-05-02 09:59:00 +02:00
usb usbnet: fix kernel crash after disconnect 2019-06-04 08:02:32 +02:00
vmxnet3
wan net/wan: fix a double free in x25_asy_open_tty() 2019-01-09 17:38:32 +01:00
wimax
wireless brcmfmac: fix NULL pointer derefence during USB disconnect 2019-06-09 09:17:13 +02:00
xen-netback xen-netback: fix occasional leak of grant ref mappings under memory pressure 2019-03-10 07:17:19 +01:00
dummy.c
eql.c
geneve.c geneve: correctly handle ipv6.disable module parameter 2019-03-10 07:17:17 +01:00
gtp.c
ifb.c
Kconfig gtp: change NET_UDP_TUNNEL dependency to select 2019-04-03 06:26:15 +02:00
LICENSE.SRC
loopback.c net: loopback: clear skb->tstamp before netif_rx() 2018-11-13 11:08:20 -08:00
macsec.c
macvlan.c macvlan: return correct error value 2018-12-21 14:15:20 +01:00
macvtap.c
Makefile net: Always descend into dsa/ 2019-05-25 18:23:19 +02:00
mdio.c
mii.c
net_failover.c failover: Add missing check to validate 'slave_dev' in net_failover_slave_unregister 2018-11-13 11:08:28 -08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c rapidio/rionet: do not free skb before reading its length 2018-12-05 19:31:59 +01:00
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tuntap: synchronize through tfiles array instead of tun->numqueues 2019-05-16 19:41:30 +02:00
veth.c
virtio_net.c virtio_net: Account for tx bytes and packets on sending xdp_frames 2019-02-12 19:47:23 +01:00
vrf.c vrf: prevent adding upper devices 2019-04-03 06:26:18 +02:00
vsockmon.c
vxlan.c vxlan: Don't call gro_cells_destroy() before device is unregistered 2019-04-03 06:26:18 +02:00
xen-netfront.c xen/netfront: tolerate frags with no data 2019-01-09 17:38:34 +01:00