diff options
author | arybchik <arybchik@FreeBSD.org> | 2016-06-04 16:57:38 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2016-06-04 16:57:38 +0000 |
commit | 6e80169d2170c101f61f370b53258b1075679cb4 (patch) | |
tree | 5e1f1efcf94c75f1e980cbfe96f38f7914254a61 | |
parent | f9425301f6cc13bda5e1cd3dce6f2cf5ebc37fc1 (diff) | |
download | FreeBSD-src-6e80169d2170c101f61f370b53258b1075679cb4.zip FreeBSD-src-6e80169d2170c101f61f370b53258b1075679cb4.tar.gz |
MFC r300011
sfxge(4): only raise an exception after MC assert or reboot in the common code
Fix efx_mcdi_request_poll so it only raises an exception if EIO is
reported from a detected MC assert or reboot. This prevents
an unnecessary exception being raised if an MCDI response error code
is trandlated to EIO.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
-rw-r--r-- | sys/dev/sfxge/common/efx_mcdi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/sfxge/common/efx_mcdi.c b/sys/dev/sfxge/common/efx_mcdi.c index 5fd484e..1a12b656 100644 --- a/sys/dev/sfxge/common/efx_mcdi.c +++ b/sys/dev/sfxge/common/efx_mcdi.c @@ -519,6 +519,11 @@ efx_mcdi_request_poll( if ((rc = efx_mcdi_poll_reboot(enp)) != 0) { emip->emi_pending_req = NULL; EFSYS_UNLOCK(enp->en_eslp, state); + + /* Reboot/Assertion */ + if (rc == EIO || rc == EINTR) + efx_mcdi_raise_exception(enp, emrp, rc); + goto fail1; } } @@ -553,10 +558,6 @@ fail1: if (!emrp->emr_quiet) EFSYS_PROBE1(fail1, efx_rc_t, rc); - /* Reboot/Assertion */ - if (rc == EIO || rc == EINTR) - efx_mcdi_raise_exception(enp, emrp, rc); - return (B_TRUE); } |