OSDN Git Service

net: hns3: change the method of obtaining default ptp cycle
authorYufeng Mo <moyufeng@huawei.com>
Tue, 27 Jul 2021 14:03:50 +0000 (22:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jul 2021 19:59:32 +0000 (20:59 +0100)
commit8373cd38a8888549ace7c7617163a2e826970a92
treed7ca4107040832bebf59fbddcac93332304758a9
parent801e541c79bbc63af852ca21b713ba87cc97c6ad
net: hns3: change the method of obtaining default ptp cycle

The ptp cycle is related to the hardware, so it may cause compatibility
issues if a fixed value is used in driver. Therefore, the method of
obtaining this value is changed to read from the register rather than
use a fixed value in driver.

Fixes: 0bf5eb788512 ("net: hns3: add support for PTP")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_ptp.h