diff options
author | Yufeng Mo <moyufeng@huawei.com> | 2021-11-29 17:00:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-29 17:26:17 +0300 |
commit | a4ae2bc0abd44032fee3d826bc145661983bdf4e (patch) | |
tree | 7b0cf24d5e904efedbb61cc0f7817adfd764a55c /drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | |
parent | e6fe5e167185b610a948337ab565ed7a7e313f80 (diff) | |
download | linux-a4ae2bc0abd44032fee3d826bc145661983bdf4e.tar.xz |
net: hns3: split function hns3_get_tx_timeo_queue_info()
Function hns3_get_tx_timeo_queue_info() is a bit too long. So add two
new functions hns3_dump_queue_stats() and hns3_dump_queue_reg() to
simplify code and improve code readability.
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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3_enet.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_enet.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h index 361a6390e159..808405cc0280 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.h @@ -621,6 +621,11 @@ static inline int ring_space(struct hns3_enet_ring *ring) (begin - end)) - 1; } +static inline u32 hns3_tqp_read_reg(struct hns3_enet_ring *ring, u32 reg) +{ + return readl_relaxed(ring->tqp->io_base + reg); +} + static inline u32 hns3_read_reg(void __iomem *base, u32 reg) { return readl(base + reg); |