]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: hns3: fix output information incomplete for dumping tx queue info with debugfs
authorJie Wang <wangjie125@huawei.com>
Fri, 12 May 2023 10:00:11 +0000 (18:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:36:50 +0000 (17:36 +0100)
[ Upstream commit 89f6bfb071182f05d7188c255b0e7251c3806f16 ]

In function hns3_dump_tx_queue_info, The print buffer is not enough when
the tx BD number is configured to 32760. As a result several BD
information wouldn't be displayed.

So fix it by increasing the tx queue print buffer length.

Fixes: 630a6738da82 ("net: hns3: adjust string spaces of some parameters of tx bd info in debugfs")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Hao Lan <lanhao@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3_debugfs.h

index 15ce1a33649ee673269be1c24a5d2680ed44afda..3158c08a3aa9c027740dc142886d582ec792ca5d 100644 (file)
@@ -123,7 +123,7 @@ static struct hns3_dbg_cmd_info hns3_dbg_cmd[] = {
                .name = "tx_bd_queue",
                .cmd = HNAE3_DBG_CMD_TX_BD,
                .dentry = HNS3_DBG_DENTRY_TX_BD,
-               .buf_len = HNS3_DBG_READ_LEN_4MB,
+               .buf_len = HNS3_DBG_READ_LEN_5MB,
                .init = hns3_dbg_bd_file_init,
        },
        {
index 814f7491ca08ddc13ea9a2c0187d37d066687ee8..fb0c907cec8528b8a57ea5c0e5a6d1f53361e292 100644 (file)
@@ -8,6 +8,7 @@
 #define HNS3_DBG_READ_LEN_128KB        0x20000
 #define HNS3_DBG_READ_LEN_1MB  0x100000
 #define HNS3_DBG_READ_LEN_4MB  0x400000
+#define HNS3_DBG_READ_LEN_5MB  0x500000
 #define HNS3_DBG_WRITE_LEN     1024
 
 #define HNS3_DBG_DATA_STR_LEN  32