1
There are some bugfix for hibmcge driver
1
There are some bugfix for hibmcge driver
2
3
---
4
ChangeLog:
5
v2 -> v3:
6
- Add more details in commit log for patch6, suggested by Jakub.
7
v2: https://lore.kernel.org/all/20250403135311.545633-7-shaojijie@huawei.com/
8
v1 -> v2:
9
- Add more details in commit log for patch1, suggested by Simon Horman.
10
v1: https://lore.kernel.org/all/20250402133905.895421-1-shaojijie@huawei.com/
11
---
2
12
3
Jijie Shao (7):
13
Jijie Shao (7):
4
net: hibmcge: fix incorrect pause frame statistics issue
14
net: hibmcge: fix incorrect pause frame statistics issue
5
net: hibmcge: fix incorrect multicast filtering issue
15
net: hibmcge: fix incorrect multicast filtering issue
6
net: hibmcge: fix the share of irq statistics among different network
16
net: hibmcge: fix the share of irq statistics among different network
...
...
diff view generated by jsdifflib
1
The driver supports pause frames,
1
The driver supports pause frames,
2
but does not pass pause frames based on rx pause enable configuration,
2
but does not pass pause frames based on rx pause enable configuration,
3
resulting in incorrect pause frame statistics.
3
resulting in incorrect pause frame statistics.
4
4
5
This patch fixes this problem.
5
like this:
6
mz eno3 '01 80 c2 00 00 01 00 18 2d 04 00 9c 88 08 00 01 ff ff' \
7
    -p 64 -c 100
8
9
ethtool -S enp132s0f2 | grep -v ": 0"
10
NIC statistics:
11
rx_octets_total_filt_cnt: 6800
12
rx_filt_pkt_cnt: 100
13
14
The rx pause frames are filtered by the MAC hardware.
15
16
This patch configures pass pause frames based on the
17
rx puase enable status to ensure that
18
rx pause frames are not filtered.
19
20
mz eno3 '01 80 c2 00 00 01 00 18 2d 04 00 9c 88 08 00 01 ff ff' \
21
-p 64 -c 100
22
23
ethtool --include-statistics -a enp132s0f2
24
Pause parameters for enp132s0f2:
25
Autonegotiate:    on
26
RX:        on
27
TX:        on
28
RX negotiated: on
29
TX negotiated: on
30
Statistics:
31
tx_pause_frames: 0
32
rx_pause_frames: 100
6
33
7
Fixes: 3a03763f3876 ("net: hibmcge: Add pauseparam supported in this module")
34
Fixes: 3a03763f3876 ("net: hibmcge: Add pauseparam supported in this module")
8
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
35
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
36
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
37
Reviewed-by: Simon Horman <horms@kernel.org>
38
---
39
ChangeLog:
40
v1 -> v2:
41
- Add more details in commit log, suggested by Simon Horman.
42
v1: https://lore.kernel.org/all/20250402133905.895421-1-shaojijie@huawei.com/
9
---
43
---
10
drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 3 +++
44
drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 3 +++
11
drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 1 +
45
drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 1 +
12
2 files changed, 4 insertions(+)
46
2 files changed, 4 insertions(+)
13
47
...
...
diff view generated by jsdifflib
...
...
4
4
5
This patch fixes this problem.
5
This patch fixes this problem.
6
6
7
Fixes: 37b367d60d0f ("net: hibmcge: Add unicast frame filter supported in this module")
7
Fixes: 37b367d60d0f ("net: hibmcge: Add unicast frame filter supported in this module")
8
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
8
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
9
Reviewed-by: Simon Horman <horms@kernel.org>
9
---
10
---
10
drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 4 ++++
11
drivers/net/ethernet/hisilicon/hibmcge/hbg_hw.c | 4 ++++
11
drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 2 ++
12
drivers/net/ethernet/hisilicon/hibmcge/hbg_reg.h | 2 ++
12
2 files changed, 6 insertions(+)
13
2 files changed, 6 insertions(+)
13
14
...
...
diff view generated by jsdifflib
...
...
10
all data in hbg_irq_info remains unchanged. Therefore,
10
all data in hbg_irq_info remains unchanged. Therefore,
11
the input parameter of some functions is changed to const.
11
the input parameter of some functions is changed to const.
12
12
13
Fixes: 4d089035fa19 ("net: hibmcge: Add interrupt supported in this module")
13
Fixes: 4d089035fa19 ("net: hibmcge: Add interrupt supported in this module")
14
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
14
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
15
Reviewed-by: Simon Horman <horms@kernel.org>
15
---
16
---
16
.../ethernet/hisilicon/hibmcge/hbg_common.h | 8 ++++---
17
.../ethernet/hisilicon/hibmcge/hbg_common.h | 8 ++++---
17
.../ethernet/hisilicon/hibmcge/hbg_debugfs.c | 4 ++--
18
.../ethernet/hisilicon/hibmcge/hbg_debugfs.c | 4 ++--
18
.../ethernet/hisilicon/hibmcge/hbg_diagnose.c | 2 +-
19
.../ethernet/hisilicon/hibmcge/hbg_diagnose.c | 2 +-
19
.../net/ethernet/hisilicon/hibmcge/hbg_irq.c | 24 ++++++++++++-------
20
.../net/ethernet/hisilicon/hibmcge/hbg_irq.c | 24 ++++++++++++-------
...
...
diff view generated by jsdifflib
...
...
7
7
8
This patch modifies the log location and records logs before WRITE_ONCE().
8
This patch modifies the log location and records logs before WRITE_ONCE().
9
9
10
Fixes: ff4edac6e9bd ("net: hibmcge: Implement some .ndo functions")
10
Fixes: ff4edac6e9bd ("net: hibmcge: Implement some .ndo functions")
11
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
11
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
12
Reviewed-by: Simon Horman <horms@kernel.org>
12
---
13
---
13
drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 6 +++---
14
drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 6 +++---
14
1 file changed, 3 insertions(+), 3 deletions(-)
15
1 file changed, 3 insertions(+), 3 deletions(-)
15
16
16
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
17
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
...
...
diff view generated by jsdifflib
...
...
6
6
7
This patch directly reads the related register to display the real state.
7
This patch directly reads the related register to display the real state.
8
8
9
Fixes: e0306637e85d ("net: hibmcge: Add support for mac link exception handling feature")
9
Fixes: e0306637e85d ("net: hibmcge: Add support for mac link exception handling feature")
10
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
10
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
11
Reviewed-by: Simon Horman <horms@kernel.org>
11
---
12
---
12
drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 7 +++++--
13
drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c | 7 +++++--
13
1 file changed, 5 insertions(+), 2 deletions(-)
14
1 file changed, 5 insertions(+), 2 deletions(-)
14
15
15
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c
16
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_debugfs.c
...
...
diff view generated by jsdifflib
1
In normal cases, the driver must ensure that the value
1
The MAC hardware supports receiving two types of
2
of rx pause mac addr is the same as the MAC address of
2
pause frames from link partner.
3
the network port. This ensures that the driver can
3
One is a pause frame with a destination address
4
receive pause frames whose destination address is
4
of 01:80:C2:00:00:01.
5
the MAC address of the network port.
5
The other is a pause frame whose destination address
6
is the address of the hibmcge driver.
7
8
01:80:C2:00:00:01 is supported by default.
9
10
In .ndo_set_mac_address(), the hibmcge driver calls
11
.hbg_hw_set_rx_pause_mac_addr() to set its mac address as the
12
destination address of the rx puase frame.
13
Therefore, pause frames with two types of MAC addresses can be received.
6
14
7
Currently, the rx pause addr does not restored after reset.
15
Currently, the rx pause addr does not restored after reset.
16
As a result, pause frames whose destination address is
17
the hibmcge driver address cannot be correctly received.
8
18
9
The index of the MAC address of the host is always 0.
19
This patch restores the configuration by calling
10
Therefore, this patch sets rx pause addr to
20
.hbg_hw_set_rx_pause_mac_addr() after reset is complete.
11
the MAC address with index 0.
12
21
13
Fixes: 3f5a61f6d504 ("net: hibmcge: Add reset supported in this module")
22
Fixes: 3f5a61f6d504 ("net: hibmcge: Add reset supported in this module")
14
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
23
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
24
Reviewed-by: Simon Horman <horms@kernel.org>
25
---
26
ChangeLog:
27
v2 -> v3:
28
- Add more details in commit log, suggested by Jakub.
29
v2: https://lore.kernel.org/all/20250403135311.545633-7-shaojijie@huawei.com/
15
---
30
---
16
drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c | 3 +++
31
drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c | 3 +++
17
1 file changed, 3 insertions(+)
32
1 file changed, 3 insertions(+)
18
33
19
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c
34
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_err.c
...
...
diff view generated by jsdifflib
...
...
40
In addition, np_link_fail exception can be fixed
40
In addition, np_link_fail exception can be fixed
41
only when the PHY is link.
41
only when the PHY is link.
42
42
43
Fixes: e0306637e85d ("net: hibmcge: Add support for mac link exception handling feature")
43
Fixes: e0306637e85d ("net: hibmcge: Add support for mac link exception handling feature")
44
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
44
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
45
Reviewed-by: Simon Horman <horms@kernel.org>
45
---
46
---
46
drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c | 11 ++++++++++-
47
drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c | 11 ++++++++++-
47
1 file changed, 10 insertions(+), 1 deletion(-)
48
1 file changed, 10 insertions(+), 1 deletion(-)
48
49
49
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c
50
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c
...
...
diff view generated by jsdifflib