Skip to content

Commit 47ecf27

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-76565 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 e3716dd commit 47ecf27

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
@@ -5000,14 +5000,14 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
50005000
if (!bp->num_tests || !BNXT_PF(bp))
50015001
return;
50025002

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

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

0 commit comments

Comments
 (0)