Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2018 09:36:43 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r342482 - stable/10/sys/dev/sfxge/common
Message-ID:  <201812260936.wBQ9ahWC001577@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Wed Dec 26 09:36:42 2018
New Revision: 342482
URL: https://svnweb.freebsd.org/changeset/base/342482

Log:
  MFC r340799
  
  sfxge(4): fix error code usage
  
  MCDI results returned in req.emr_rc have already been translated
  from MC_CMD_ERR_* to errno names, so using an MC_CMD_ERR_* value
  is incorrect.
  
  Submitted by:   Andy Moreton <amoreton at solarflare.com>
  Sponsored by:   Solarflare Communications, Inc.
  Differential Revision:  https://reviews.freebsd.org/D18069

Modified:
  stable/10/sys/dev/sfxge/common/ef10_rx.c
  stable/10/sys/dev/sfxge/common/ef10_tx.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/sfxge/common/ef10_rx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_rx.c	Wed Dec 26 09:34:26 2018	(r342481)
+++ stable/10/sys/dev/sfxge/common/ef10_rx.c	Wed Dec 26 09:36:42 2018	(r342482)
@@ -130,7 +130,7 @@ efx_mcdi_fini_rxq(
 
 	efx_mcdi_execute_quiet(enp, &req);
 
-	if ((req.emr_rc != 0) && (req.emr_rc != MC_CMD_ERR_EALREADY)) {
+	if ((req.emr_rc != 0) && (req.emr_rc != EALREADY)) {
 		rc = req.emr_rc;
 		goto fail1;
 	}

Modified: stable/10/sys/dev/sfxge/common/ef10_tx.c
==============================================================================
--- stable/10/sys/dev/sfxge/common/ef10_tx.c	Wed Dec 26 09:34:26 2018	(r342481)
+++ stable/10/sys/dev/sfxge/common/ef10_tx.c	Wed Dec 26 09:36:42 2018	(r342482)
@@ -151,7 +151,7 @@ efx_mcdi_fini_txq(
 
 	efx_mcdi_execute_quiet(enp, &req);
 
-	if ((req.emr_rc != 0) && (req.emr_rc != MC_CMD_ERR_EALREADY)) {
+	if ((req.emr_rc != 0) && (req.emr_rc != EALREADY)) {
 		rc = req.emr_rc;
 		goto fail1;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812260936.wBQ9ahWC001577>