diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 20 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_register.h | 22 |
2 files changed, 42 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 7cd59cefcc3b..337e9134903c 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c | |||
@@ -335,6 +335,7 @@ static enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw) | |||
335 | i40e_status i40e_pf_reset(struct i40e_hw *hw) | 335 | i40e_status i40e_pf_reset(struct i40e_hw *hw) |
336 | { | 336 | { |
337 | u32 cnt = 0; | 337 | u32 cnt = 0; |
338 | u32 cnt1 = 0; | ||
338 | u32 reg = 0; | 339 | u32 reg = 0; |
339 | u32 grst_del; | 340 | u32 grst_del; |
340 | 341 | ||
@@ -355,6 +356,25 @@ i40e_status i40e_pf_reset(struct i40e_hw *hw) | |||
355 | return I40E_ERR_RESET_FAILED; | 356 | return I40E_ERR_RESET_FAILED; |
356 | } | 357 | } |
357 | 358 | ||
359 | /* Now Wait for the FW to be ready */ | ||
360 | for (cnt1 = 0; cnt1 < I40E_PF_RESET_WAIT_COUNT; cnt1++) { | ||
361 | reg = rd32(hw, I40E_GLNVM_ULD); | ||
362 | reg &= (I40E_GLNVM_ULD_CONF_CORE_DONE_MASK | | ||
363 | I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK); | ||
364 | if (reg == (I40E_GLNVM_ULD_CONF_CORE_DONE_MASK | | ||
365 | I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK)) { | ||
366 | hw_dbg(hw, "Core and Global modules ready %d\n", cnt1); | ||
367 | break; | ||
368 | } | ||
369 | usleep_range(10000, 20000); | ||
370 | } | ||
371 | if (!(reg & (I40E_GLNVM_ULD_CONF_CORE_DONE_MASK | | ||
372 | I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK))) { | ||
373 | hw_dbg(hw, "wait for FW Reset complete timedout\n"); | ||
374 | hw_dbg(hw, "I40E_GLNVM_ULD = 0x%x\n", reg); | ||
375 | return I40E_ERR_RESET_FAILED; | ||
376 | } | ||
377 | |||
358 | /* Determine the PF number based on the PCI fn */ | 378 | /* Determine the PF number based on the PCI fn */ |
359 | reg = rd32(hw, I40E_GLPCI_CAPSUP); | 379 | reg = rd32(hw, I40E_GLPCI_CAPSUP); |
360 | if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK) | 380 | if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK) |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_register.h b/drivers/net/ethernet/intel/i40e/i40e_register.h index 2394c66870f4..d188ec03aff2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_register.h +++ b/drivers/net/ethernet/intel/i40e/i40e_register.h | |||
@@ -2053,6 +2053,28 @@ | |||
2053 | #define I40E_GLNVM_SRDATA_WRDATA_MASK (0xFFFF << I40E_GLNVM_SRDATA_WRDATA_SHIFT) | 2053 | #define I40E_GLNVM_SRDATA_WRDATA_MASK (0xFFFF << I40E_GLNVM_SRDATA_WRDATA_SHIFT) |
2054 | #define I40E_GLNVM_SRDATA_RDDATA_SHIFT 16 | 2054 | #define I40E_GLNVM_SRDATA_RDDATA_SHIFT 16 |
2055 | #define I40E_GLNVM_SRDATA_RDDATA_MASK (0xFFFF << I40E_GLNVM_SRDATA_RDDATA_SHIFT) | 2055 | #define I40E_GLNVM_SRDATA_RDDATA_MASK (0xFFFF << I40E_GLNVM_SRDATA_RDDATA_SHIFT) |
2056 | #define I40E_GLNVM_ULD 0x000B6008 | ||
2057 | #define I40E_GLNVM_ULD_CONF_PCIR_DONE_SHIFT 0 | ||
2058 | #define I40E_GLNVM_ULD_CONF_PCIR_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_PCIR_DONE_SHIFT) | ||
2059 | #define I40E_GLNVM_ULD_CONF_PCIRTL_DONE_SHIFT 1 | ||
2060 | #define I40E_GLNVM_ULD_CONF_PCIRTL_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_PCIRTL_DONE_SHIFT) | ||
2061 | #define I40E_GLNVM_ULD_CONF_LCB_DONE_SHIFT 2 | ||
2062 | #define I40E_GLNVM_ULD_CONF_LCB_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_LCB_DONE_SHIFT) | ||
2063 | #define I40E_GLNVM_ULD_CONF_CORE_DONE_SHIFT 3 | ||
2064 | #define I40E_GLNVM_ULD_CONF_CORE_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_CORE_DONE_SHIFT) | ||
2065 | #define I40E_GLNVM_ULD_CONF_GLOBAL_DONE_SHIFT 4 | ||
2066 | #define I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_GLOBAL_DONE_SHIFT) | ||
2067 | #define I40E_GLNVM_ULD_CONF_POR_DONE_SHIFT 5 | ||
2068 | #define I40E_GLNVM_ULD_CONF_POR_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_POR_DONE_SHIFT) | ||
2069 | #define I40E_GLNVM_ULD_CONF_PCIE_ANA_DONE_SHIFT 6 | ||
2070 | #define I40E_GLNVM_ULD_CONF_PCIE_ANA_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_PCIE_ANA_DONE_SHIFT) | ||
2071 | #define I40E_GLNVM_ULD_CONF_PHY_ANA_DONE_SHIFT 7 | ||
2072 | #define I40E_GLNVM_ULD_CONF_PHY_ANA_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_PHY_ANA_DONE_SHIFT) | ||
2073 | #define I40E_GLNVM_ULD_CONF_EMP_DONE_SHIFT 8 | ||
2074 | #define I40E_GLNVM_ULD_CONF_EMP_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_EMP_DONE_SHIFT) | ||
2075 | #define I40E_GLNVM_ULD_CONF_PCIALT_DONE_SHIFT 9 | ||
2076 | #define I40E_GLNVM_ULD_CONF_PCIALT_DONE_MASK (0x1 << I40E_GLNVM_ULD_CONF_PCIALT_DONE_SHIFT) | ||
2077 | |||
2056 | #define I40E_GLPCI_BYTCTH 0x0009C484 | 2078 | #define I40E_GLPCI_BYTCTH 0x0009C484 |
2057 | #define I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_SHIFT 0 | 2079 | #define I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_SHIFT 0 |
2058 | #define I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_MASK (0xFFFFFFFF << I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_SHIFT) | 2080 | #define I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_MASK (0xFFFFFFFF << I40E_GLPCI_BYTCTH_PCI_COUNT_BW_BCT_SHIFT) |