Skip to content

Commit 65e0d96

Browse files
author
Shruti Parab
committed
bnxt_en: Fix ethtool selftest output in one of the failure cases
JIRA: https://issues.redhat.com/browse/RHEL-76568 commit 8e6cc90 Author: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Date: Mon Apr 28 15:58:57 2025 -0700 bnxt_en: Fix ethtool selftest output in one of the failure cases When RDMA driver is loaded, running offline self test is not supported and driver returns failure early. But it is not clearing the input buffer and hence the application prints some junk characters for individual test results. Fix it by clearing the buffer before returning. Fixes: 895621f ("bnxt_en: Don't support offline self test when RoCE driver is loaded") Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Shruti Parab <shruti.parab@broadcom.com>
1 parent 7c44acd commit 65e0d96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4999,14 +4999,14 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
49994999
if (!bp->num_tests || !BNXT_PF(bp))
50005000
return;
50015001

5002+
memset(buf, 0, sizeof(u64) * bp->num_tests);
50025003
if (etest->flags & ETH_TEST_FL_OFFLINE &&
50035004
bnxt_ulp_registered(bp->edev)) {
50045005
etest->flags |= ETH_TEST_FL_FAILED;
50055006
netdev_warn(dev, "Offline tests cannot be run with RoCE driver loaded\n");
50065007
return;
50075008
}
50085009

5009-
memset(buf, 0, sizeof(u64) * bp->num_tests);
50105010
if (!netif_running(dev)) {
50115011
etest->flags |= ETH_TEST_FL_FAILED;
50125012
return;

0 commit comments

Comments
 (0)