diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2018-05-23 11:38:46 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-23 16:33:00 -0400 |
commit | 53a1024abf3e4cb3310a54b08c48323649158c13 (patch) | |
tree | 020d15a8069ff5bd976e5beb7edb331bc70d408c /drivers/net/ethernet/amd/xgbe/xgbe.h | |
parent | amd-xgbe: Remove field that indicates SFP diagnostic support (diff) | |
download | linux-dev-53a1024abf3e4cb3310a54b08c48323649158c13.tar.xz linux-dev-53a1024abf3e4cb3310a54b08c48323649158c13.zip |
amd-xgbe: Add ethtool support to retrieve SFP module info
Add support to get SFP module information using ethtool.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h index 54e43ad32d26..f0f455b79ff9 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe.h +++ b/drivers/net/ethernet/amd/xgbe/xgbe.h @@ -835,6 +835,7 @@ struct xgbe_hw_if { * Optional routines: * an_pre, an_post * kr_training_pre, kr_training_post + * module_info, module_eeprom */ struct xgbe_phy_impl_if { /* Perform Setup/teardown actions */ @@ -883,6 +884,12 @@ struct xgbe_phy_impl_if { /* Pre/Post KR training enablement support */ void (*kr_training_pre)(struct xgbe_prv_data *); void (*kr_training_post)(struct xgbe_prv_data *); + + /* SFP module related info */ + int (*module_info)(struct xgbe_prv_data *pdata, + struct ethtool_modinfo *modinfo); + int (*module_eeprom)(struct xgbe_prv_data *pdata, + struct ethtool_eeprom *eeprom, u8 *data); }; struct xgbe_phy_if { @@ -905,6 +912,12 @@ struct xgbe_phy_if { /* For single interrupt support */ irqreturn_t (*an_isr)(struct xgbe_prv_data *); + /* For ethtool PHY support */ + int (*module_info)(struct xgbe_prv_data *pdata, + struct ethtool_modinfo *modinfo); + int (*module_eeprom)(struct xgbe_prv_data *pdata, + struct ethtool_eeprom *eeprom, u8 *data); + /* PHY implementation specific services */ struct xgbe_phy_impl_if phy_impl; }; |