Misc. fixes for hns3 driver
Subsystems (4)
v2 cover Misc. fixes for hns3 driver
Fixes for the miscellaneous problems found during the review of the code.
Change Summary:
Patch 1/2, Change V1->V2:
[1] Fixed comments from Leon Romanovsky
Link: https://lkml.org/lkml/2021/4/4/14
Patch 2/2, Change V1->V2:
None
Salil Mehta (2):
net: hns3: Remove the left over redundant check & assignment
net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event()
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/2 net: hns3: Remove the left over redundant check & assignment
This removes the left over check and assignment which is no longer used anywhere in the function and should have been removed as part of the below mentioned patch.
--V1->V2:
[1] Fixed comments from Leon Romanovsky
Link: https://lkml.org/lkml/2021/4/4/14 --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +0 -3
@@ -3966,7 +3966,6 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle)* normalcy is to reset. * 2. A new reset request from the stack due to timeout * -* For the first case,error event might not have ae handle available. * check if this is a new reset request and we are not here just because * last reset attempt did not succeed and watchdog hit us again. We will * know this if last reset request did not occur very recently (watchdog
@@ -3976,8 +3975,6 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle)* want to make sure we throttle the reset request. Therefore, we will * not allow it again before 3*HZ times. */ -if (!handle) - handle = &hdev->vport[0 ].nic;if (time_before (jiffies, (hdev->last_reset_time +HCLGE_RESET_INTERVAL ))) {
Signature · 1 line
2.17.1
PATCH v2 2/2 net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event()
In reply to Salil MehtaCode to defer the reset(which caps the frequency of the reset) schedules the timer and returns. Hence, following 'else-if' looks un-necessary.
--- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +3 -1
@@ -3980,7 +3980,9 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle) HCLGE_RESET_INTERVAL))) {mod_timer (&hdev->reset_timer, jiffies +HCLGE_RESET_INTERVAL );return ; - } else if (hdev->default_reset_request) { + } + +if (hdev->default_reset_request) { hdev->reset_level =hclge_get_reset_level (ae_dev, &hdev->default_reset_request);
Signature · 1 line
2.17.1
This series was applied to netdev/net.git (refs/heads/master):
Hello:
This series was applied to netdev/net.git (refs/heads/master):
Quoted 10 lines · On Mon, 5 Apr 2021 18:06:43 +0100 you wrote:
Fixes for the miscellaneous problems found during the review of the code.
Change Summary:
Patch 1/2, ChangeV1->V2:
[1] Fixed comments from Leon RomanovskyLink: https://lkml.org/lkml/2021/4/4/14Patch 2/2, Change
V1->V2:
None[...]
Here is the summary with links:
- [V2,net,1/2] net: hns3: Remove the left over redundant check & assignment
https://git.kernel.org/netdev/net/c/9a6aaf61487e - [V2,net,2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() https://git.kernel.org/netdev/net/c/0600771fa6b2
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html