patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/e1000: fix eeprom dump failure
@ 2025-04-15  7:48 Yuan Wang
  0 siblings, 0 replies; only message in thread
From: Yuan Wang @ 2025-04-15  7:48 UTC (permalink / raw)
  To: dev; +Cc: Yuan Wang, stable

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@dpdk.org

Signed-off-by: Yuan Wang <yuanx.wang@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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-15  7:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-15  7:48 [PATCH] net/e1000: fix eeprom dump failure Yuan Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).