]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Refactors the requested reset & pending reset handling code
authorSalil Mehta <salil.mehta@huawei.com>
Mon, 4 Dec 2017 01:29:55 +0000 (01:29 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Dec 2017 16:45:18 +0000 (11:45 -0500)
commit1c0a401eb0769fddaec089ff7389a66a54b98f40
tree951b640ba7f385b5d7b963a87c6278ae011d5b20
parentd2fe7c7f7ef730b2301b01216e7b4eaf1109b9d8
net: hns3: Refactors the requested reset & pending reset handling code

In exisiting code, the way to detect if driver/client reset should
be executed or if hardware should be be soft resetted was overly
complex.

Existing code use to read the interrupt status register from task
context to figure out if the interrupt source event was reset and
then use clear the interrupt source for reset while waiting for the
hardware to finish the reset. This behaviour again was confusing
and overly complex in terms of the flow.

This patch simplifies the handling of the requested reset and the
pending reset(i.e. reset which have already been asserted by the
software and hardware has acknowledged back to driver that it is
processing the hardware reset through interrupt)

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