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);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to