[hns3-0114]net: hns3: add compatible handling for MAC VLAN switch parameter configuration

Bug #1859568 reported by Fred Kimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Fix Released
Undecided
Unassigned
Ubuntu-18.04
Invalid
Undecided
Unassigned
Ubuntu-18.04-hwe
Fix Released
Undecided
Unassigned
Ubuntu-20.04
Fix Released
Undecided
Unassigned
Upstream-kernel
Fix Released
Undecided
Unassigned

Bug Description

[Bug Description]
Previously, hns3 driver just directly send specific setting bit
and mask bits of MAC VLAN switch parameter to the firmware, it
can not be compatible with the old firmware, because the old one
ignores mask bits and covers all bits with new setting bits.
So when running with old firmware, the communication between PF
and VF will fail after resetting or configuring spoof check, since
they will do the MAC VLAN switch parameter configuration.

[Steps to Reproduce]
1.using firmware which does not support 0x1033
2.send command 0x1033 to firmware

[Actual Results]
ping fail

[Expected Results]
ping ok

[Reproducibility]
Inevitably

[Additional information]
Hardware: D06
Firmware: NA
Kernel: NA

[Resolution]
This patch fixes this problem by reading switch parameter firstly,
then just modifies the corresponding bit and sends it to firmware.

71c5e83bcf1e net: hns3: add compatible handling for MAC VLAN switch parameter configuration

Ike Panhc (ikepanhc)
description: updated
Ike Panhc (ikepanhc)
tags: added: ikeradar
Revision history for this message
Ike Panhc (ikepanhc) wrote :

This patch fix dd2956eab104 ("net: hns3: not allow SSU loopback while execute ethtool -t dev"), which landed in mainline kernel since v5.4. This
is not needed for v4.15 based kernel.

Changed in kunpeng920:
status: New → Fix Committed
tags: removed: ikeradar
Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.