Commit 7d62dac6 authored by Catherine Sullivan's avatar Catherine Sullivan Committed by Jeff Kirsher

i40e: Give link more time after setting flow control

Give link a little more time to come back up after setting flow control
before resetting. In the new NVMs it is taking longer for link to come back.
This causes the driver to attempt to reset the link, which then errors
because the firmware was already in the middle of a reset. Also, initialize
err to 0.

Change-ID: I1cc987a944e389d8909c262da5796f50722b4d6b
Signed-off-by: default avatarCatherine Sullivan <catherine.sullivan@intel.com>
Tested-by: default avatarJim Young <jmyoungx@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 7aa67613
...@@ -630,7 +630,7 @@ static int i40e_set_pauseparam(struct net_device *netdev, ...@@ -630,7 +630,7 @@ static int i40e_set_pauseparam(struct net_device *netdev,
bool link_up = hw_link_info->link_info & I40E_AQ_LINK_UP; bool link_up = hw_link_info->link_info & I40E_AQ_LINK_UP;
i40e_status status; i40e_status status;
u8 aq_failures; u8 aq_failures;
int err; int err = 0;
if (vsi != pf->vsi[pf->lan_vsi]) if (vsi != pf->vsi[pf->lan_vsi])
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -683,8 +683,12 @@ static int i40e_set_pauseparam(struct net_device *netdev, ...@@ -683,8 +683,12 @@ static int i40e_set_pauseparam(struct net_device *netdev,
err = -EAGAIN; err = -EAGAIN;
} }
if (!test_bit(__I40E_DOWN, &pf->state)) if (!test_bit(__I40E_DOWN, &pf->state)) {
return i40e_nway_reset(netdev); /* Give it a little more time to try to come back */
msleep(75);
if (!test_bit(__I40E_DOWN, &pf->state))
return i40e_nway_reset(netdev);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment