net: hns3: skip periodic service task if reset failed
When reset fails, if there are some pending jobs for the periodic service task, it does not do anything except print error each time the task is scheduled. So skip the periodic service task if reset failed. Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d41884eecd
commit
e639436339
@ -3944,6 +3944,9 @@ static void hclge_periodic_service_task(struct hclge_dev *hdev)
|
||||
{
|
||||
unsigned long delta = round_jiffies_relative(HZ);
|
||||
|
||||
if (test_bit(HCLGE_STATE_RST_FAIL, &hdev->state))
|
||||
return;
|
||||
|
||||
/* Always handle the link updating to make sure link state is
|
||||
* updated when it is triggered by mbx.
|
||||
*/
|
||||
|
@ -2186,6 +2186,9 @@ static void hclgevf_periodic_service_task(struct hclgevf_dev *hdev)
|
||||
unsigned long delta = round_jiffies_relative(HZ);
|
||||
struct hnae3_handle *handle = &hdev->nic;
|
||||
|
||||
if (test_bit(HCLGEVF_STATE_RST_FAIL, &hdev->state))
|
||||
return;
|
||||
|
||||
if (time_is_after_jiffies(hdev->last_serv_processed + HZ)) {
|
||||
delta = jiffies - hdev->last_serv_processed;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user