mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
i40e: fix ethtool to get EEPROM data from X722 interface
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>
This commit is contained in:
parent
c0cf70a6fc
commit
c271dd6c39
1 changed files with 5 additions and 0 deletions
|
@ -1165,6 +1165,11 @@ static int i40e_get_eeprom_len(struct net_device *netdev)
|
|||
struct i40e_hw *hw = &np->vsi->back->hw;
|
||||
u32 val;
|
||||
|
||||
#define X722_EEPROM_SCOPE_LIMIT 0x5B9FFF
|
||||
if (hw->mac.type == I40E_MAC_X722) {
|
||||
val = X722_EEPROM_SCOPE_LIMIT + 1;
|
||||
return val;
|
||||
}
|
||||
val = (rd32(hw, I40E_GLPCI_LBARCTRL)
|
||||
& I40E_GLPCI_LBARCTRL_FL_SIZE_MASK)
|
||||
>> I40E_GLPCI_LBARCTRL_FL_SIZE_SHIFT;
|
||||
|
|
Loading…
Reference in a new issue