Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 07:50:45 +0000 (UTC)
From:      Andrew Rybchenko <arybchik@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340799 - head/sys/dev/sfxge/common
Message-ID:  <201811230750.wAN7ojbQ054562@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arybchik
Date: Fri Nov 23 07:50:45 2018
New Revision: 340799
URL: https://svnweb.freebsd.org/changeset/base/340799

Log:
  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.
  MFC after:      1 week
  Differential Revision:  https://reviews.freebsd.org/D18069

Modified:
  head/sys/dev/sfxge/common/ef10_rx.c
  head/sys/dev/sfxge/common/ef10_tx.c

Modified: head/sys/dev/sfxge/common/ef10_rx.c
==============================================================================
--- head/sys/dev/sfxge/common/ef10_rx.c	Fri Nov 23 07:50:34 2018	(r340798)
+++ head/sys/dev/sfxge/common/ef10_rx.c	Fri Nov 23 07:50:45 2018	(r340799)
@@ -140,7 +140,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: head/sys/dev/sfxge/common/ef10_tx.c
==============================================================================
--- head/sys/dev/sfxge/common/ef10_tx.c	Fri Nov 23 07:50:34 2018	(r340798)
+++ head/sys/dev/sfxge/common/ef10_tx.c	Fri Nov 23 07:50:45 2018	(r340799)
@@ -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?201811230750.wAN7ojbQ054562>