Date: Tue, 17 May 2016 06:28:04 +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: r300011 - head/sys/dev/sfxge/common Message-ID: <201605170628.u4H6S49H016105@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arybchik Date: Tue May 17 06:28:03 2016 New Revision: 300011 URL: https://svnweb.freebsd.org/changeset/base/300011 Log: 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. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6392 Modified: head/sys/dev/sfxge/common/efx_mcdi.c Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Tue May 17 06:27:19 2016 (r300010) +++ head/sys/dev/sfxge/common/efx_mcdi.c Tue May 17 06:28:03 2016 (r300011) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605170628.u4H6S49H016105>