Module Name:    src
Committed By:   msaitoh
Date:           Fri Dec 10 11:14:18 UTC 2021

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe_x550.c

Log Message:
Initialize data field in struct buffer.

  FreeBSD: b3ebe337ffa06b0f1f460bf8f1e42fb55db77d0b or ix-3.3.14
  DPDK:    40543be5376ca415b2a7e196315d0555725b8bdf

    While sending request using ixgbe_hic_unlocked() the data field in
    buffer struct is not used. It is set when the struct is overwritten by
    FW to deliver the response. To not pass random data to FW the whole
    structure should be zeroed before use.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 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.20 src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.21
--- src/sys/dev/pci/ixgbe/ixgbe_x550.c:1.20	Wed May 19 08:19:20 2021
+++ src/sys/dev/pci/ixgbe/ixgbe_x550.c	Fri Dec 10 11:14:18 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_x550.c,v 1.20 2021/05/19 08:19:20 msaitoh Exp $ */
+/* $NetBSD: ixgbe_x550.c,v 1.21 2021/12/10 11:14:18 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.20 2021/05/19 08:19:20 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe_x550.c,v 1.21 2021/12/10 11:14:18 msaitoh Exp $");
 
 #include "ixgbe_x550.h"
 #include "ixgbe_x540.h"
@@ -3322,6 +3322,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixg
 	/* one word */
 	buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16));
 	buffer.pad2 = 0;
+	buffer.data = 0;
 	buffer.pad3 = 0;
 
 	status = hw->mac.ops.acquire_swfw_sync(hw, mask);
@@ -3382,6 +3383,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(str
 		buffer.address = IXGBE_CPU_TO_BE32((offset + current_word) * 2);
 		buffer.length = IXGBE_CPU_TO_BE16(words_to_read * 2);
 		buffer.pad2 = 0;
+		buffer.data = 0;
 		buffer.pad3 = 0;
 
 		status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer),

Reply via email to