Module Name: src
Committed By: msaitoh
Date: Wed Dec 15 09:50:21 UTC 2021
Modified Files:
src/sys/dev/pci/ixgbe: ixgbe_x550.c
Log Message:
Check host interface return status. No functional change on NetBSD.
- FreeBSD: c1a56b6f5ffd6f3180a654d058c1783ccb808e8b or ix-3.3.18
DPDK: db18e37090a3b9af47d6a6886248520f6b220bf9
Writing to read-only fields returns a non-OK Return Status
for shadow RAM write command for X550.
This information was previously discarded.
- No functional change on NetBSD because our ixg has no interface to
write the NVM.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_x550.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/ixgbe/ixgbe_x550.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.23 src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.24
--- src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.23 Fri Dec 10 11:31:22 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_x550.c Wed Dec 15 09:50:21 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_x550.c,v 1.23 2021/12/10 11:31:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe_x550.c,v 1.24 2021/12/15 09:50:21 msaitoh Exp $ */
/******************************************************************************
@@ -35,7 +35,7 @@
/*$FreeBSD: head/sys/dev/ixgbe/ixgbe_x550.c 331224 2018-03-19 20:55:05Z erj $*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.23 2021/12/10 11:31:22 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.24 2021/12/15 09:50:21 msaitoh Exp $");
#include "ixgbe_x550.h"
#include "ixgbe_x540.h"
@@ -3444,7 +3444,17 @@ s32 ixgbe_write_ee_hostif_data_X550(stru
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;
}