aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuinan Sun <guinanx.sun@intel.com>2020-07-09 08:00:44 +0000
committerKevin Bowling <kbowling@FreeBSD.org>2021-09-14 00:37:07 +0000
commit31b67f9a10dfd3e2cd2405d87a069ea8959d9824 (patch)
tree3c3a90310457af164dbfbc45eb7d541b84c5b868
parentee690406343dc8bd34992f6d4e0871726ee42279 (diff)
downloadsrc-31b67f9a10dfd3e2cd2405d87a069ea8959d9824.tar.gz
src-31b67f9a10dfd3e2cd2405d87a069ea8959d9824.zip
ixgbe: check host interface return status
Writing to read-only fields returns a non-OK Return Status for shadow RAM write command for X550. This information was previously discarded. Signed-off-by: Stanislaw Grzeszczak <stanislaw.a.grzeszczak@intel.com> Signed-off-by: Guinan Sun <guinanx.sun@intel.com> Reviewed-by: Wei Zhao <wei.zhao1@intel.com> Approved by: imp Obtained from: DPDK (db18e37090a3b9af47d6a6886248520f6b220bf9) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D31621 (cherry picked from commit c1a56b6f5ffd6f3180a654d058c1783ccb808e8b)
-rw-r--r--sys/dev/ixgbe/ixgbe_x550.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/dev/ixgbe/ixgbe_x550.c b/sys/dev/ixgbe/ixgbe_x550.c
index 02db10b61673..7b120f841d85 100644
--- a/sys/dev/ixgbe/ixgbe_x550.c
+++ b/sys/dev/ixgbe/ixgbe_x550.c
@@ -3259,7 +3259,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,
status = ixgbe_host_interface_command(hw, (u32 *)&buffer,
sizeof(buffer),
- IXGBE_HI_COMMAND_TIMEOUT, FALSE);
+ IXGBE_HI_COMMAND_TIMEOUT, TRUE);
+ if (status != IXGBE_SUCCESS) {
+ DEBUGOUT2("for offset %04x failed with status %d\n",
+ offset, status);
+ return status;
+ }
+
+ if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) {
+ DEBUGOUT2("for offset %04x host interface return status %02x\n",
+ offset, buffer.hdr.rsp.buf_lenh_status);
+ return IXGBE_ERR_HOST_INTERFACE_COMMAND;
+ }
return status;
}