|
@@ -50,13 +50,16 @@ static const char i40e_copyright[] = "Copyright (c) 2013 - 2014 Intel Corporatio
|
|
|
|
|
|
/* a bit of forward declarations */
|
|
/* a bit of forward declarations */
|
|
static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi);
|
|
static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi);
|
|
-static void i40e_handle_reset_warning(struct i40e_pf *pf);
|
|
|
|
|
|
+static void i40e_handle_reset_warning(struct i40e_pf *pf, bool lock_acquired);
|
|
static int i40e_add_vsi(struct i40e_vsi *vsi);
|
|
static int i40e_add_vsi(struct i40e_vsi *vsi);
|
|
static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi);
|
|
static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi);
|
|
static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit);
|
|
static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit);
|
|
static int i40e_setup_misc_vector(struct i40e_pf *pf);
|
|
static int i40e_setup_misc_vector(struct i40e_pf *pf);
|
|
static void i40e_determine_queue_usage(struct i40e_pf *pf);
|
|
static void i40e_determine_queue_usage(struct i40e_pf *pf);
|
|
static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
|
|
static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
|
|
|
|
+static void i40e_prep_for_reset(struct i40e_pf *pf, bool lock_acquired);
|
|
|
|
+static int i40e_reset(struct i40e_pf *pf);
|
|
|
|
+static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired);
|
|
static void i40e_fdir_sb_setup(struct i40e_pf *pf);
|
|
static void i40e_fdir_sb_setup(struct i40e_pf *pf);
|
|
static int i40e_veb_get_bw_info(struct i40e_veb *veb);
|
|
static int i40e_veb_get_bw_info(struct i40e_veb *veb);
|
|
|
|
|
|
@@ -5537,6 +5540,8 @@ int i40e_open(struct net_device *netdev)
|
|
* Finish initialization of the VSI.
|
|
* Finish initialization of the VSI.
|
|
*
|
|
*
|
|
* Returns 0 on success, negative value on failure
|
|
* Returns 0 on success, negative value on failure
|
|
|
|
+ *
|
|
|
|
+ * Note: expects to be called while under rtnl_lock()
|
|
**/
|
|
**/
|
|
int i40e_vsi_open(struct i40e_vsi *vsi)
|
|
int i40e_vsi_open(struct i40e_vsi *vsi)
|
|
{
|
|
{
|
|
@@ -5600,7 +5605,7 @@ err_setup_rx:
|
|
err_setup_tx:
|
|
err_setup_tx:
|
|
i40e_vsi_free_tx_resources(vsi);
|
|
i40e_vsi_free_tx_resources(vsi);
|
|
if (vsi == pf->vsi[pf->lan_vsi])
|
|
if (vsi == pf->vsi[pf->lan_vsi])
|
|
- i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED));
|
|
|
|
|
|
+ i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED), true);
|
|
|
|
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
@@ -5686,12 +5691,14 @@ int i40e_close(struct net_device *netdev)
|
|
* i40e_do_reset - Start a PF or Core Reset sequence
|
|
* i40e_do_reset - Start a PF or Core Reset sequence
|
|
* @pf: board private structure
|
|
* @pf: board private structure
|
|
* @reset_flags: which reset is requested
|
|
* @reset_flags: which reset is requested
|
|
|
|
+ * @lock_acquired: indicates whether or not the lock has been acquired
|
|
|
|
+ * before this function was called.
|
|
*
|
|
*
|
|
* The essential difference in resets is that the PF Reset
|
|
* The essential difference in resets is that the PF Reset
|
|
* doesn't clear the packet buffers, doesn't reset the PE
|
|
* doesn't clear the packet buffers, doesn't reset the PE
|
|
* firmware, and doesn't bother the other PFs on the chip.
|
|
* firmware, and doesn't bother the other PFs on the chip.
|
|
**/
|
|
**/
|
|
-void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
|
|
|
|
|
|
+void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags, bool lock_acquired)
|
|
{
|
|
{
|
|
u32 val;
|
|
u32 val;
|
|
|
|
|
|
@@ -5737,7 +5744,7 @@ void i40e_do_reset(struct i40e_pf *pf, u32 reset_flags)
|
|
* for the Core Reset.
|
|
* for the Core Reset.
|
|
*/
|
|
*/
|
|
dev_dbg(&pf->pdev->dev, "PFR requested\n");
|
|
dev_dbg(&pf->pdev->dev, "PFR requested\n");
|
|
- i40e_handle_reset_warning(pf);
|
|
|
|
|
|
+ i40e_handle_reset_warning(pf, lock_acquired);
|
|
|
|
|
|
} else if (reset_flags & BIT_ULL(__I40E_REINIT_REQUESTED)) {
|
|
} else if (reset_flags & BIT_ULL(__I40E_REINIT_REQUESTED)) {
|
|
int v;
|
|
int v;
|
|
@@ -5946,7 +5953,7 @@ exit:
|
|
void i40e_do_reset_safe(struct i40e_pf *pf, u32 reset_flags)
|
|
void i40e_do_reset_safe(struct i40e_pf *pf, u32 reset_flags)
|
|
{
|
|
{
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_do_reset(pf, reset_flags);
|
|
|
|
|
|
+ i40e_do_reset(pf, reset_flags, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -6348,7 +6355,6 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
|
|
{
|
|
{
|
|
u32 reset_flags = 0;
|
|
u32 reset_flags = 0;
|
|
|
|
|
|
- rtnl_lock();
|
|
|
|
if (test_bit(__I40E_REINIT_REQUESTED, &pf->state)) {
|
|
if (test_bit(__I40E_REINIT_REQUESTED, &pf->state)) {
|
|
reset_flags |= BIT(__I40E_REINIT_REQUESTED);
|
|
reset_flags |= BIT(__I40E_REINIT_REQUESTED);
|
|
clear_bit(__I40E_REINIT_REQUESTED, &pf->state);
|
|
clear_bit(__I40E_REINIT_REQUESTED, &pf->state);
|
|
@@ -6374,18 +6380,19 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
|
|
* precedence before starting a new reset sequence.
|
|
* precedence before starting a new reset sequence.
|
|
*/
|
|
*/
|
|
if (test_bit(__I40E_RESET_INTR_RECEIVED, &pf->state)) {
|
|
if (test_bit(__I40E_RESET_INTR_RECEIVED, &pf->state)) {
|
|
- i40e_handle_reset_warning(pf);
|
|
|
|
- goto unlock;
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, false);
|
|
|
|
+ i40e_reset(pf);
|
|
|
|
+ i40e_rebuild(pf, false, false);
|
|
}
|
|
}
|
|
|
|
|
|
/* If we're already down or resetting, just bail */
|
|
/* If we're already down or resetting, just bail */
|
|
if (reset_flags &&
|
|
if (reset_flags &&
|
|
!test_bit(__I40E_DOWN, &pf->state) &&
|
|
!test_bit(__I40E_DOWN, &pf->state) &&
|
|
- !test_bit(__I40E_CONFIG_BUSY, &pf->state))
|
|
|
|
- i40e_do_reset(pf, reset_flags);
|
|
|
|
-
|
|
|
|
-unlock:
|
|
|
|
- rtnl_unlock();
|
|
|
|
|
|
+ !test_bit(__I40E_CONFIG_BUSY, &pf->state)) {
|
|
|
|
+ rtnl_lock();
|
|
|
|
+ i40e_do_reset(pf, reset_flags, true);
|
|
|
|
+ rtnl_unlock();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -6873,10 +6880,12 @@ static void i40e_fdir_teardown(struct i40e_pf *pf)
|
|
/**
|
|
/**
|
|
* i40e_prep_for_reset - prep for the core to reset
|
|
* i40e_prep_for_reset - prep for the core to reset
|
|
* @pf: board private structure
|
|
* @pf: board private structure
|
|
|
|
+ * @lock_acquired: indicates whether or not the lock has been acquired
|
|
|
|
+ * before this function was called.
|
|
*
|
|
*
|
|
* Close up the VFs and other things in prep for PF Reset.
|
|
* Close up the VFs and other things in prep for PF Reset.
|
|
**/
|
|
**/
|
|
-static void i40e_prep_for_reset(struct i40e_pf *pf)
|
|
|
|
|
|
+static void i40e_prep_for_reset(struct i40e_pf *pf, bool lock_acquired)
|
|
{
|
|
{
|
|
struct i40e_hw *hw = &pf->hw;
|
|
struct i40e_hw *hw = &pf->hw;
|
|
i40e_status ret = 0;
|
|
i40e_status ret = 0;
|
|
@@ -6891,7 +6900,12 @@ static void i40e_prep_for_reset(struct i40e_pf *pf)
|
|
dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n");
|
|
dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n");
|
|
|
|
|
|
/* quiesce the VSIs and their queues that are not already DOWN */
|
|
/* quiesce the VSIs and their queues that are not already DOWN */
|
|
|
|
+ /* pf_quiesce_all_vsi modifies netdev structures -rtnl_lock needed */
|
|
|
|
+ if (!lock_acquired)
|
|
|
|
+ rtnl_lock();
|
|
i40e_pf_quiesce_all_vsi(pf);
|
|
i40e_pf_quiesce_all_vsi(pf);
|
|
|
|
+ if (!lock_acquired)
|
|
|
|
+ rtnl_unlock();
|
|
|
|
|
|
for (v = 0; v < pf->num_alloc_vsi; v++) {
|
|
for (v = 0; v < pf->num_alloc_vsi; v++) {
|
|
if (pf->vsi[v])
|
|
if (pf->vsi[v])
|
|
@@ -6926,29 +6940,39 @@ static void i40e_send_version(struct i40e_pf *pf)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * i40e_reset_and_rebuild - reset and rebuild using a saved config
|
|
|
|
|
|
+ * i40e_reset - wait for core reset to finish reset, reset pf if corer not seen
|
|
* @pf: board private structure
|
|
* @pf: board private structure
|
|
- * @reinit: if the Main VSI needs to re-initialized.
|
|
|
|
**/
|
|
**/
|
|
-static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
|
|
|
|
|
|
+static int i40e_reset(struct i40e_pf *pf)
|
|
{
|
|
{
|
|
struct i40e_hw *hw = &pf->hw;
|
|
struct i40e_hw *hw = &pf->hw;
|
|
- u8 set_fc_aq_fail = 0;
|
|
|
|
i40e_status ret;
|
|
i40e_status ret;
|
|
- u32 val;
|
|
|
|
- u32 v;
|
|
|
|
|
|
|
|
- /* Now we wait for GRST to settle out.
|
|
|
|
- * We don't have to delete the VEBs or VSIs from the hw switch
|
|
|
|
- * because the reset will make them disappear.
|
|
|
|
- */
|
|
|
|
ret = i40e_pf_reset(hw);
|
|
ret = i40e_pf_reset(hw);
|
|
if (ret) {
|
|
if (ret) {
|
|
dev_info(&pf->pdev->dev, "PF reset failed, %d\n", ret);
|
|
dev_info(&pf->pdev->dev, "PF reset failed, %d\n", ret);
|
|
set_bit(__I40E_RESET_FAILED, &pf->state);
|
|
set_bit(__I40E_RESET_FAILED, &pf->state);
|
|
- goto clear_recovery;
|
|
|
|
|
|
+ clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state);
|
|
|
|
+ } else {
|
|
|
|
+ pf->pfr_count++;
|
|
}
|
|
}
|
|
- pf->pfr_count++;
|
|
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * i40e_rebuild - rebuild using a saved config
|
|
|
|
+ * @pf: board private structure
|
|
|
|
+ * @reinit: if the Main VSI needs to re-initialized.
|
|
|
|
+ * @lock_acquired: indicates whether or not the lock has been acquired
|
|
|
|
+ * before this function was called.
|
|
|
|
+ **/
|
|
|
|
+static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
|
|
|
|
+{
|
|
|
|
+ struct i40e_hw *hw = &pf->hw;
|
|
|
|
+ u8 set_fc_aq_fail = 0;
|
|
|
|
+ i40e_status ret;
|
|
|
|
+ u32 val;
|
|
|
|
+ int v;
|
|
|
|
|
|
if (test_bit(__I40E_DOWN, &pf->state))
|
|
if (test_bit(__I40E_DOWN, &pf->state))
|
|
goto clear_recovery;
|
|
goto clear_recovery;
|
|
@@ -6993,9 +7017,11 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
|
|
}
|
|
}
|
|
#endif /* CONFIG_I40E_DCB */
|
|
#endif /* CONFIG_I40E_DCB */
|
|
/* do basic switch setup */
|
|
/* do basic switch setup */
|
|
|
|
+ if (!lock_acquired)
|
|
|
|
+ rtnl_lock();
|
|
ret = i40e_setup_pf_switch(pf, reinit);
|
|
ret = i40e_setup_pf_switch(pf, reinit);
|
|
if (ret)
|
|
if (ret)
|
|
- goto end_core_reset;
|
|
|
|
|
|
+ goto end_unlock;
|
|
|
|
|
|
/* The driver only wants link up/down and module qualification
|
|
/* The driver only wants link up/down and module qualification
|
|
* reports from firmware. Note the negative logic.
|
|
* reports from firmware. Note the negative logic.
|
|
@@ -7066,7 +7092,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
|
|
if (ret) {
|
|
if (ret) {
|
|
dev_info(&pf->pdev->dev,
|
|
dev_info(&pf->pdev->dev,
|
|
"rebuild of Main VSI failed: %d\n", ret);
|
|
"rebuild of Main VSI failed: %d\n", ret);
|
|
- goto end_core_reset;
|
|
|
|
|
|
+ goto end_unlock;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -7117,23 +7143,48 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
|
|
/* tell the firmware that we're starting */
|
|
/* tell the firmware that we're starting */
|
|
i40e_send_version(pf);
|
|
i40e_send_version(pf);
|
|
|
|
|
|
|
|
+end_unlock:
|
|
|
|
+if (!lock_acquired)
|
|
|
|
+ rtnl_unlock();
|
|
end_core_reset:
|
|
end_core_reset:
|
|
clear_bit(__I40E_RESET_FAILED, &pf->state);
|
|
clear_bit(__I40E_RESET_FAILED, &pf->state);
|
|
clear_recovery:
|
|
clear_recovery:
|
|
clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state);
|
|
clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/**
|
|
|
|
+ * i40e_reset_and_rebuild - reset and rebuild using a saved config
|
|
|
|
+ * @pf: board private structure
|
|
|
|
+ * @reinit: if the Main VSI needs to re-initialized.
|
|
|
|
+ * @lock_acquired: indicates whether or not the lock has been acquired
|
|
|
|
+ * before this function was called.
|
|
|
|
+ **/
|
|
|
|
+static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit,
|
|
|
|
+ bool lock_acquired)
|
|
|
|
+{
|
|
|
|
+ int ret;
|
|
|
|
+ /* Now we wait for GRST to settle out.
|
|
|
|
+ * We don't have to delete the VEBs or VSIs from the hw switch
|
|
|
|
+ * because the reset will make them disappear.
|
|
|
|
+ */
|
|
|
|
+ ret = i40e_reset(pf);
|
|
|
|
+ if (!ret)
|
|
|
|
+ i40e_rebuild(pf, reinit, lock_acquired);
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* i40e_handle_reset_warning - prep for the PF to reset, reset and rebuild
|
|
* i40e_handle_reset_warning - prep for the PF to reset, reset and rebuild
|
|
* @pf: board private structure
|
|
* @pf: board private structure
|
|
*
|
|
*
|
|
* Close up the VFs and other things in prep for a Core Reset,
|
|
* Close up the VFs and other things in prep for a Core Reset,
|
|
* then get ready to rebuild the world.
|
|
* then get ready to rebuild the world.
|
|
|
|
+ * @lock_acquired: indicates whether or not the lock has been acquired
|
|
|
|
+ * before this function was called.
|
|
**/
|
|
**/
|
|
-static void i40e_handle_reset_warning(struct i40e_pf *pf)
|
|
|
|
|
|
+static void i40e_handle_reset_warning(struct i40e_pf *pf, bool lock_acquired)
|
|
{
|
|
{
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
- i40e_reset_and_rebuild(pf, false);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, lock_acquired);
|
|
|
|
+ i40e_reset_and_rebuild(pf, false, lock_acquired);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -8430,6 +8481,7 @@ static int i40e_pf_config_rss(struct i40e_pf *pf)
|
|
*
|
|
*
|
|
* returns 0 if rss is not enabled, if enabled returns the final rss queue
|
|
* returns 0 if rss is not enabled, if enabled returns the final rss queue
|
|
* count which may be different from the requested queue count.
|
|
* count which may be different from the requested queue count.
|
|
|
|
+ * Note: expects to be called while under rtnl_lock()
|
|
**/
|
|
**/
|
|
int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
|
|
int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
|
|
{
|
|
{
|
|
@@ -8445,11 +8497,11 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
|
|
u16 qcount;
|
|
u16 qcount;
|
|
|
|
|
|
vsi->req_queue_pairs = queue_count;
|
|
vsi->req_queue_pairs = queue_count;
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, true);
|
|
|
|
|
|
pf->alloc_rss_size = new_rss_size;
|
|
pf->alloc_rss_size = new_rss_size;
|
|
|
|
|
|
- i40e_reset_and_rebuild(pf, true);
|
|
|
|
|
|
+ i40e_reset_and_rebuild(pf, true, true);
|
|
|
|
|
|
/* Discard the user configured hash keys and lut, if less
|
|
/* Discard the user configured hash keys and lut, if less
|
|
* queues are enabled.
|
|
* queues are enabled.
|
|
@@ -8825,6 +8877,7 @@ static void i40e_clear_rss_lut(struct i40e_vsi *vsi)
|
|
* i40e_set_features - set the netdev feature flags
|
|
* i40e_set_features - set the netdev feature flags
|
|
* @netdev: ptr to the netdev being adjusted
|
|
* @netdev: ptr to the netdev being adjusted
|
|
* @features: the feature set that the stack is suggesting
|
|
* @features: the feature set that the stack is suggesting
|
|
|
|
+ * Note: expects to be called while under rtnl_lock()
|
|
**/
|
|
**/
|
|
static int i40e_set_features(struct net_device *netdev,
|
|
static int i40e_set_features(struct net_device *netdev,
|
|
netdev_features_t features)
|
|
netdev_features_t features)
|
|
@@ -8848,7 +8901,7 @@ static int i40e_set_features(struct net_device *netdev,
|
|
need_reset = i40e_set_ntuple(pf, features);
|
|
need_reset = i40e_set_ntuple(pf, features);
|
|
|
|
|
|
if (need_reset)
|
|
if (need_reset)
|
|
- i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED));
|
|
|
|
|
|
+ i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED), true);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
@@ -9043,6 +9096,8 @@ static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|
* is to change the mode then that requires a PF reset to
|
|
* is to change the mode then that requires a PF reset to
|
|
* allow rebuild of the components with required hardware
|
|
* allow rebuild of the components with required hardware
|
|
* bridge mode enabled.
|
|
* bridge mode enabled.
|
|
|
|
+ *
|
|
|
|
+ * Note: expects to be called while under rtnl_lock()
|
|
**/
|
|
**/
|
|
static int i40e_ndo_bridge_setlink(struct net_device *dev,
|
|
static int i40e_ndo_bridge_setlink(struct net_device *dev,
|
|
struct nlmsghdr *nlh,
|
|
struct nlmsghdr *nlh,
|
|
@@ -9098,7 +9153,8 @@ static int i40e_ndo_bridge_setlink(struct net_device *dev,
|
|
pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
|
|
pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
|
|
else
|
|
else
|
|
pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED;
|
|
pf->flags &= ~I40E_FLAG_VEB_MODE_ENABLED;
|
|
- i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED));
|
|
|
|
|
|
+ i40e_do_reset(pf, BIT_ULL(__I40E_PF_RESET_REQUESTED),
|
|
|
|
+ true);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -11501,7 +11557,7 @@ static pci_ers_result_t i40e_pci_error_detected(struct pci_dev *pdev,
|
|
/* shutdown all operations */
|
|
/* shutdown all operations */
|
|
if (!test_bit(__I40E_SUSPENDED, &pf->state)) {
|
|
if (!test_bit(__I40E_SUSPENDED, &pf->state)) {
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -11570,7 +11626,7 @@ static void i40e_pci_error_resume(struct pci_dev *pdev)
|
|
return;
|
|
return;
|
|
|
|
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_handle_reset_warning(pf);
|
|
|
|
|
|
+ i40e_handle_reset_warning(pf, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -11633,7 +11689,7 @@ static void i40e_shutdown(struct pci_dev *pdev)
|
|
set_bit(__I40E_SUSPENDED, &pf->state);
|
|
set_bit(__I40E_SUSPENDED, &pf->state);
|
|
set_bit(__I40E_DOWN, &pf->state);
|
|
set_bit(__I40E_DOWN, &pf->state);
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
|
|
|
|
wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
|
|
wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
|
|
@@ -11652,7 +11708,7 @@ static void i40e_shutdown(struct pci_dev *pdev)
|
|
i40e_enable_mc_magic_wake(pf);
|
|
i40e_enable_mc_magic_wake(pf);
|
|
|
|
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
|
|
|
|
wr32(hw, I40E_PFPM_APM,
|
|
wr32(hw, I40E_PFPM_APM,
|
|
@@ -11686,7 +11742,7 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
|
|
i40e_enable_mc_magic_wake(pf);
|
|
i40e_enable_mc_magic_wake(pf);
|
|
|
|
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_prep_for_reset(pf);
|
|
|
|
|
|
+ i40e_prep_for_reset(pf, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
|
|
|
|
wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
|
|
wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
|
|
@@ -11734,7 +11790,7 @@ static int i40e_resume(struct pci_dev *pdev)
|
|
if (test_and_clear_bit(__I40E_SUSPENDED, &pf->state)) {
|
|
if (test_and_clear_bit(__I40E_SUSPENDED, &pf->state)) {
|
|
clear_bit(__I40E_DOWN, &pf->state);
|
|
clear_bit(__I40E_DOWN, &pf->state);
|
|
rtnl_lock();
|
|
rtnl_lock();
|
|
- i40e_reset_and_rebuild(pf, false);
|
|
|
|
|
|
+ i40e_reset_and_rebuild(pf, false, true);
|
|
rtnl_unlock();
|
|
rtnl_unlock();
|
|
}
|
|
}
|
|
|
|
|