diff mbox series

[net,1/3] bnxt_en: Fix reporting of test result in ethtool selftest

Message ID 20230329013021.5205-2-michael.chan@broadcom.com (mailing list archive)
State Accepted
Commit 83714dc3db0e4a088673601bc8099b079bc1a077
Delegated to: Netdev Maintainers
Headers show
Series bnxt_en: 3 Bug fixes | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Michael Chan March 29, 2023, 1:30 a.m. UTC
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>

When the selftest command fails, driver is not reporting the failure
by updating the "test->flags" when bnxt_close_nic() fails.

Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
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>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Horman March 29, 2023, 1:08 p.m. UTC | #1
On Tue, Mar 28, 2023 at 06:30:19PM -0700, Michael Chan wrote:
> From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> 
> When the selftest command fails, driver is not reporting the failure
> by updating the "test->flags" when bnxt_close_nic() fails.
> 
> Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
> Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
> 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>

Reviewed-by: Simon Horman <simon.horman@corigine.com>

Note: I think this will require a manual backport to get
      all the way back to the above referenced commit (v4.12).
      I'm unsure if that will need to be addressed in practice.

> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> index ec573127b707..7658a06b8d05 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
> @@ -3738,6 +3738,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
>  		bnxt_ulp_stop(bp);
>  		rc = bnxt_close_nic(bp, true, false);
>  		if (rc) {
> +			etest->flags |= ETH_TEST_FL_FAILED;
>  			bnxt_ulp_start(bp, rc);
>  			return;
>  		}
> -- 
> 2.18.1
>
Michael Chan March 29, 2023, 5:34 p.m. UTC | #2
On Wed, Mar 29, 2023 at 6:08 AM Simon Horman <simon.horman@corigine.com> wrote:
>
> On Tue, Mar 28, 2023 at 06:30:19PM -0700, Michael Chan wrote:
> > From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> >
> > When the selftest command fails, driver is not reporting the failure
> > by updating the "test->flags" when bnxt_close_nic() fails.
> >
> > Fixes: eb51365846bc ("bnxt_en: Add basic ethtool -t selftest support.")
> > Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
> > 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>
>
> Reviewed-by: Simon Horman <simon.horman@corigine.com>
>
> Note: I think this will require a manual backport to get
>       all the way back to the above referenced commit (v4.12).
>       I'm unsure if that will need to be addressed in practice.

Thanks for the review.  The manual backport should be relatively
trivial.  But I agree that it may not be necessary to backport all the
way back for this minor issue.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index ec573127b707..7658a06b8d05 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -3738,6 +3738,7 @@  static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
 		bnxt_ulp_stop(bp);
 		rc = bnxt_close_nic(bp, true, false);
 		if (rc) {
+			etest->flags |= ETH_TEST_FL_FAILED;
 			bnxt_ulp_start(bp, rc);
 			return;
 		}