net/axgbe: support sfp module EEPROM
PATCH v2 1/1 net/axgbe: support sfp module EEPROM
From: Amaranath Somalapuram <[email protected]>
Adding API for get_module_eeprom and get_module_info.
Signed-off-by Amaranath Somalapuram <[email protected]>
--- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_ethdev.c | 2 + drivers/net/axgbe/axgbe_phy.h | 4 ++ drivers/net/axgbe/axgbe_phy_impl.c | 107 +++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+)
doc/guides/nics/features/axgbe.ini +1 -0
@@ -18,3 +18,4 @@ Basic stats = Y Linux UIO = Y x86-32 = Y x86-64 = Y +Module EEPROM dump = Y
drivers/net/axgbe/axgbe_ethdev.c +2 -0
@@ -214,6 +214,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, .rx_descriptor_status = axgbe_dev_rx_descriptor_status, .tx_descriptor_status = axgbe_dev_tx_descriptor_status, + .get_module_info = axgbe_get_module_info, + .get_module_eeprom = axgbe_get_module_eeprom, };static int axgbe_phy_reset (struct axgbe_port *pdata)
drivers/net/axgbe/axgbe_phy.h +4 -0
@@ -188,5 +188,9 @@#define DUPLEX_FULL 0x01#define DUPLEX_UNKNOWN 0xff +int axgbe_get_module_info (struct rte_eth_dev *dev, +struct rte_eth_dev_module_info *modinfo); +int axgbe_get_module_eeprom (struct rte_eth_dev *dev, +struct rte_dev_eeprom_info *info);#endif /* PHY */
drivers/net/axgbe/axgbe_phy_impl.c +107 -0
131 lines not on this page · raw message
Signature · 1 line
2.17.1
Hi Ravi,
Can you acknowledge this patch.
Regards,
S.Amarnath
-----Original Message-----
From: Somalapuram, Amaranath <[email protected]>
Sent: Monday, April 27, 2020 11:13 AM
To: [email protected]
Cc: Kumar, Ravi1 <[email protected]>
Subject: [PATCH v2] net/axgbe: support sfp module EEPROM
From: Amaranath Somalapuram <[email protected]>
Adding API for get_module_eeprom and get_module_info.
Signed-off-by Amaranath Somalapuram <[email protected]>
--- doc/guides/nics/features/axgbe.ini | 1 + drivers/net/axgbe/axgbe_ethdev.c | 2 + drivers/net/axgbe/axgbe_phy.h | 4 ++ drivers/net/axgbe/axgbe_phy_impl.c | 107 +++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+)
doc/guides/nics/features/axgbe.ini +1 -0
@@ -18,3 +18,4 @@ Basic stats = Y Linux UIO = Y x86-32 = Y x86-64 = Y +Module EEPROM dump = Y
drivers/net/axgbe/axgbe_ethdev.c +2 -0
@@ -214,6 +214,8 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, .rx_descriptor_status = axgbe_dev_rx_descriptor_status, .tx_descriptor_status = axgbe_dev_tx_descriptor_status, + .get_module_info = axgbe_get_module_info, + .get_module_eeprom = axgbe_get_module_eeprom, }; static int axgbe_phy_reset(struct axgbe_port *pdata) diff --git a/drivers/net/axgbe/axgbe_phy.h b/drivers/net/axgbe/axgbe_phy.h index 77ee20a31..d9d7fde41 100644
drivers/net/axgbe/axgbe_phy.h +4 -0
@@ -188,5 +188,9 @@#define DUPLEX_FULL 0x01#define DUPLEX_UNKNOWN 0xff +int axgbe_get_module_info (struct rte_eth_dev *dev, +struct rte_eth_dev_module_info *modinfo);int +axgbe_get_module_eeprom (struct rte_eth_dev *dev, +struct rte_dev_eeprom_info *info);#endif /* PHY */
drivers/net/axgbe/axgbe_phy_impl.c +105 -0
123 lines not on this page · raw message
int ret;
+
/* Read the input port registers */
gpio_reg = 0;
ret = axgbe_phy_i2c_read(pdata, phy_data->sfp_gpio_address,
--
2.17.1