[01/11] net/sfc/base: make last byte of module information available

Message ID 1537797030-26548-2-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/sfc: update base driver to support 50G and 100G |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko Sept. 24, 2018, 1:50 p.m. UTC
  From: Richard Houldsworth <rhouldsworth@solarflare.com>

Adjust bounds so the interface supports reading
the last available byte of data.

Fixes: 19b64c6ac35f ("net/sfc/base: import libefx base")
Cc: stable@dpdk.org

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx_phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/sfc/base/efx_phy.c b/drivers/net/sfc/base/efx_phy.c
index 25059dfe1..e78d6efcb 100644
--- a/drivers/net/sfc/base/efx_phy.c
+++ b/drivers/net/sfc/base/efx_phy.c
@@ -297,7 +297,7 @@  efx_phy_module_get_info(
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 	EFSYS_ASSERT(data != NULL);
 
-	if ((uint32_t)offset + len > 0xff) {
+	if ((uint32_t)offset + len > 0x100) {
 		rc = EINVAL;
 		goto fail1;
 	}