]> git.baikalelectronics.ru Git - kernel.git/commit
phy: sfp: add netlink SFP support to generic SFP code
authorAndrew Lunn <andrew@lunn.ch>
Fri, 9 Apr 2021 08:06:40 +0000 (11:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2021 23:34:56 +0000 (16:34 -0700)
commit6505211da3a245aca1bee62f497510623b4c8924
tree9b5eb129c83e0e4284a6dd5af52ad615e0b074cc
parentb5507ae3616e6fe33bfbb998b59db3b35a533000
phy: sfp: add netlink SFP support to generic SFP code

The new netlink API for reading SFP data requires a new op to be
implemented. The idea of the new netlink SFP code is that userspace is
responsible to parsing the EEPROM data and requesting pages, rather
than have the kernel decide what pages are interesting and returning
them. This allows greater flexibility for newer formats.

Currently the generic SFP code only supports simple SFPs. Allow i2c
address 0x50 and 0x51 to be accessed with page and bank must always be
0. This interface will later be extended when for example QSFP support
is added.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp-bus.c
drivers/net/phy/sfp.c
drivers/net/phy/sfp.h
include/linux/sfp.h