net: hns3: Changes to make enet watchdog timeout func common for PF/VF
authorSalil Mehta <salil.mehta@huawei.com>
Thu, 22 Mar 2018 14:28:52 +0000 (14:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Mar 2018 19:29:03 +0000 (15:29 -0400)
commit6d4c3981a8d815466de081138f2e31e9d044c669
tree77f9d06a7c587b0107b1ec6292b3e081c6e7f3a0
parent1a2e10a24039147047cc21759ec57314c333c1ac
net: hns3: Changes to make enet watchdog timeout func common for PF/VF

HNS3 drivers enet layer, used for the ring management and stack
interaction, is common to both VF and PF. PF already supports reset
functionality to handle the network stack watchdog timeout trigger
but the existing code is not generic enough to be used to support VF
reset as well.
This patch does following:
1. Makes the existing watchdog timeout handler in enet layer generic
   i.e. suitable for both VF and PF and
2. Introduces the new reset event handler for the VF code.
3. Changes existing reset event handler of PF code to initialize the
   reset level

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.c