aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-23 15:59:49 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-23 15:59:49 +0000
commit9d89c911bb68f103131ba7a1caa9a28ea48830d0 (patch)
tree08a15ed8e4b5a0e4cec2506b2e69234670ba2fcd
parent641c3370f4f62b656812794c2cc2910da9e64990 (diff)
downloadsrc-9d89c911bb68f103131ba7a1caa9a28ea48830d0.tar.gz
src-9d89c911bb68f103131ba7a1caa9a28ea48830d0.zip
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
Notes
Notes: svn path=/head/; revision=340837
-rw-r--r--sys/dev/sfxge/common/efx_mcdi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/sfxge/common/efx_mcdi.c b/sys/dev/sfxge/common/efx_mcdi.c
index 22673bc28c25..5d216ed65f15 100644
--- a/sys/dev/sfxge/common/efx_mcdi.c
+++ b/sys/dev/sfxge/common/efx_mcdi.c
@@ -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);
}