[PATCH] net/e1000: fix eeprom dump failure
Yuan Wang
yuanx.wang at intel.com
Tue Apr 15 09:48:02 CEST 2025
There is a incorrect comparison in get_eeprom that cause epprom dump fail.
This patch fixes this issue.
Fixes: 83c314da4c38 (igb: add access to specific device info)
Cc: stable at dpdk.org
Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
---
drivers/net/intel/e1000/igb_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/intel/e1000/igb_ethdev.c b/drivers/net/intel/e1000/igb_ethdev.c
index cbd2f15f5f..738c0ef895 100644
--- a/drivers/net/intel/e1000/igb_ethdev.c
+++ b/drivers/net/intel/e1000/igb_ethdev.c
@@ -5219,7 +5219,7 @@ eth_igb_get_eeprom(struct rte_eth_dev *dev,
first = in_eeprom->offset >> 1;
length = in_eeprom->length >> 1;
if ((first >= hw->nvm.word_size) ||
- ((first + length) >= hw->nvm.word_size))
+ ((first + length) > hw->nvm.word_size))
return -EINVAL;
in_eeprom->magic = hw->vendor_id |
--
2.47.1
More information about the dev
mailing list