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:
Guangbin Huang 2020-09-08 10:59:49 +08:00 committed by David S. Miller
parent d41884eecd
commit e639436339
2 changed files with 6 additions and 0 deletions

View file

@ -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.
*/

View file

@ -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;