svn commit: r340837 - head/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Fri Nov 23 15:59:52 UTC 2018
Author: arybchik
Date: Fri Nov 23 15:59:49 2018
New Revision: 340837
URL: https://svnweb.freebsd.org/changeset/base/340837
Log:
sfxge(4): ignore error in completion event on MCDIv2 HW
With MCDIv2, the reponse length can be to big to fit into the
CMDDONE_DATALEN field in the MCDI completion event. But rather that
the length being truncated, it can overflow into the CMDDONE_ERRNO
field (this is a longstanding firmware bug). Hence the CMDDONE_ERRNO
field may not be valid.
It isn't necessary to use the value in the CMDDONE_ERRNO field though,
so it can be ignored. The actual error code is already read from the
response header on MCDIv2 capable hardware and stored in emr_rc, so
that can be used instead.
Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18104
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 Fri Nov 23 15:59:37 2018 (r340836)
+++ head/sys/dev/sfxge/common/efx_mcdi.c Fri Nov 23 15:59:49 2018 (r340837)
@@ -798,9 +798,8 @@ efx_mcdi_ev_cpl(
emrp->emr_rc = 0;
}
}
- if (errcode == 0) {
+ if (emrp->emr_rc == 0)
efx_mcdi_finish_response(enp, emrp);
- }
emtp->emt_ev_cpl(emtp->emt_context);
}
More information about the svn-src-head
mailing list