From: Dan Nowlin <dan.now...@intel.com>

Add missing buffer copy in ixgbe_aci_send_cmd_sc().

In ixgbe_aci_send_cmd_sc() there is code to retry aq commands for
certain commands. To achieve this the function makes a copy of the
original ixgbe_aci_desc structure and allocates memory to store an
original copy of the command buffer. This allows the original structure
and buffer to be restored before attempting the command again. However,
the function didn't perform the actual copy of the original command
buffer into the copy buffer.

Signed-off-by: Dan Nowlin <dan.now...@intel.com>
Signed-off-by: Yuan Wang <yuanx.w...@intel.com>
---
 drivers/net/ixgbe/base/ixgbe_e610.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ixgbe/base/ixgbe_e610.c 
b/drivers/net/ixgbe/base/ixgbe_e610.c
index dc4eafaa5a..5474c3012a 100644
--- a/drivers/net/ixgbe/base/ixgbe_e610.c
+++ b/drivers/net/ixgbe/base/ixgbe_e610.c
@@ -282,6 +282,7 @@ s32 ixgbe_aci_send_cmd(struct ixgbe_hw *hw, struct 
ixgbe_aci_desc *desc,
                        buf_cpy = (u8 *)ixgbe_malloc(hw, buf_size);
                        if (!buf_cpy)
                                return IXGBE_ERR_OUT_OF_MEM;
+                       memcpy(buf_cpy, buf, buf_size);
                }
                memcpy(&desc_cpy, desc, sizeof(desc_cpy));
        }
-- 
2.43.5

Reply via email to