i40e: fix ethtool to get EEPROM data from X722 interface
authorLihong Yang <lihong.yang@intel.com>
Mon, 30 Jan 2017 20:29:32 +0000 (12:29 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 08:17:38 +0000 (09:17 +0100)
commitdaf88438c5a30b24b784a3b7cb95a780d733dc12
treebac8c4b765d05d31e2bb23532675d2dbe801fb70
parent6297c56c5e7fe3dd1ade273774f3ffc8451b6d71
i40e: fix ethtool to get EEPROM data from X722 interface

[ Upstream commit c271dd6c391b535226cf1a81aaad9f33cb5899d3 ]

Currently ethtool -e will error out with a X722 interface
as its EEPROM has a scope limit at offset 0x5B9FFF.
This patch fixes the issue by setting the EEPROM length to
the scope limit to avoid NVM read failure beyond that.

Change-ID: I0b7d4dd6c7f2a57cace438af5dffa0f44c229372
Signed-off-by: Lihong Yang <lihong.yang@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c