diff mbox series

[net-next,06/15] ethtool: Add SFF-8436 and SFF-8636 max EEPROM length definitions

Message ID 20190430203926.19284-7-saeedm@mellanox.com
State Superseded
Delegated to: David Miller
Headers show
Series [net-next,01/15] net/mlx5e: Take common TIR context settings into a function | expand

Commit Message

Saeed Mahameed April 30, 2019, 8:39 p.m. UTC
From: Erez Alfasi <ereza@mellanox.com>

Added max EEPROM length defines for ethtool usage:
 #define ETH_MODULE_SFF_8636_MAX_LEN     640
 #define ETH_MODULE_SFF_8436_MAX_LEN     640

These definitions are exists in ethtool and used to
determine the EEPROM data length when reading high
pages as well.

For example, SFF-8636 EEPROM data from page 03h
needs to be stored at data[512] - data[639].

Signed-off-by: Erez Alfasi <ereza@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 include/uapi/linux/ethtool.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
index 818ad368b586..3534ce157ae9 100644
--- a/include/uapi/linux/ethtool.h
+++ b/include/uapi/linux/ethtool.h
@@ -1712,6 +1712,9 @@  static inline int ethtool_validate_duplex(__u8 duplex)
 #define ETH_MODULE_SFF_8436		0x4
 #define ETH_MODULE_SFF_8436_LEN		256
 
+#define ETH_MODULE_SFF_8636_MAX_LEN     640
+#define ETH_MODULE_SFF_8436_MAX_LEN     640
+
 /* Reset flags */
 /* The reset() operation must clear the flags for the components which
  * were actually reset.  On successful return, the flags indicate the