i40e/i40evf: initialize context descriptor
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Wed, 4 Jun 2014 20:41:54 +0000 (20:41 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 1 Jul 2014 07:08:08 +0000 (00:08 -0700)
Driver needs to initialize all members of context descriptor. Stale
data is possible otherwise.

Change-ID: Idc6b53af45583509da42d5ec0824cbaf78aee64f
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c

index babb7e6a66bd3933aed318afba063410d1a785c4..051e2136715f7d86a656f41100340ab7fd067022 100644 (file)
@@ -1991,6 +1991,7 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring,
        /* cpu_to_le32 and assign to struct fields */
        context_desc->tunneling_params = cpu_to_le32(cd_tunneling);
        context_desc->l2tag2 = cpu_to_le16(cd_l2tag2);
+       context_desc->rsvd = cpu_to_le16(0);
        context_desc->type_cmd_tso_mss = cpu_to_le64(cd_type_cmd_tso_mss);
 }
 
index 48ebb6cd69f28608b73fb0e22ff5b8d1a35f0389..f2762f5927cc42f323e51f3cc261a1f2dff4e1c3 100644 (file)
@@ -1336,6 +1336,7 @@ static void i40e_create_tx_ctx(struct i40e_ring *tx_ring,
        /* cpu_to_le32 and assign to struct fields */
        context_desc->tunneling_params = cpu_to_le32(cd_tunneling);
        context_desc->l2tag2 = cpu_to_le16(cd_l2tag2);
+       context_desc->rsvd = cpu_to_le16(0);
        context_desc->type_cmd_tso_mss = cpu_to_le64(cd_type_cmd_tso_mss);
 }