net/sfc/base: make last byte of module information available
authorRichard Houldsworth <rhouldsworth@solarflare.com>
Mon, 24 Sep 2018 13:50:20 +0000 (14:50 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 27 Sep 2018 23:41:02 +0000 (01:41 +0200)
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

index 25059df..e78d6ef 100644 (file)
@@ -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;
        }