aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-06-08 17:07:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-08 17:07:45 -0400
commit8063968af9e3b96da3b19992a7d580d8ce921562 (patch)
treef62d2b221ebdf4cb66340772f4482012c957bbb2
parentfff1f59b1773fcbb563c503ad9c7ace54062144b (diff)
parenteeb6b6451b7312de1434d0f20a6bb56271ee7c34 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-06-08 This series contains updates to i40e and i40evf. Jesse fixes an issue reported by Eric Dumazet where the driver was not masking the right bits in the receive descriptor before checking them. Also fixes TSO accounting since the kernel now can send as much as 32kB in a single skb->frag[.] entry, even on a system with 4kB pages. Anjali cleans up registers which are no longer supported. Akeem cleans up code comments and removes num_msix_entries from the interrupt setup routine since it was not being used. Fixes an issue where FD SB/ATR and NTUPLE configuration status were reported erroneously, so now the driver reports FDir without further information. Fixes a coding error where during the registration for NAPI, the driver was requesting 256 budget. The max recommended value for this NAPI_POLL_WEIGHT or 64. Lastly, removed deprecated device IDs because they will not be shipped. Mitch removes log messages which were redundant so therefore unnecessary. Also removes a bogus code comment since VF drivers require MSI-X or they won't get interrupts at all and cleans up the formatting of several log messages. Mitch also fixes the possibility of null pointers in VSI, since not all VSIs have transmit rings. Shannon ensures to clear the PXE mode bit on each reset after the AdminQ has been rebuilt. Catherine bumps the driver versions for i40e and i40evf. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c11
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_hmc.c7
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_hmc.h7
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c11
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c24
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.c7
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.h4
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_type.h12
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl.h4
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_common.c2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_hmc.h7
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.c7
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.h4
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_type.h14
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h4
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c55
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c49
18 files changed, 74 insertions, 156 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 9c27d8b657b2..dc6d7c6fb060 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -201,7 +201,6 @@ struct i40e_pf {
201 unsigned long state; 201 unsigned long state;
202 unsigned long link_check_timeout; 202 unsigned long link_check_timeout;
203 struct msix_entry *msix_entries; 203 struct msix_entry *msix_entries;
204 u16 num_msix_entries;
205 bool fc_autoneg_status; 204 bool fc_autoneg_status;
206 205
207 u16 eeprom_version; 206 u16 eeprom_version;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index fd2b573d3050..8e4b33c3e3cd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -43,12 +43,10 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
43 if (hw->vendor_id == PCI_VENDOR_ID_INTEL) { 43 if (hw->vendor_id == PCI_VENDOR_ID_INTEL) {
44 switch (hw->device_id) { 44 switch (hw->device_id) {
45 case I40E_DEV_ID_SFP_XL710: 45 case I40E_DEV_ID_SFP_XL710:
46 case I40E_DEV_ID_SFP_X710:
47 case I40E_DEV_ID_QEMU: 46 case I40E_DEV_ID_QEMU:
48 case I40E_DEV_ID_KX_A: 47 case I40E_DEV_ID_KX_A:
49 case I40E_DEV_ID_KX_B: 48 case I40E_DEV_ID_KX_B:
50 case I40E_DEV_ID_KX_C: 49 case I40E_DEV_ID_KX_C:
51 case I40E_DEV_ID_KX_D:
52 case I40E_DEV_ID_QSFP_A: 50 case I40E_DEV_ID_QSFP_A:
53 case I40E_DEV_ID_QSFP_B: 51 case I40E_DEV_ID_QSFP_B:
54 case I40E_DEV_ID_QSFP_C: 52 case I40E_DEV_ID_QSFP_C:
@@ -2514,7 +2512,7 @@ static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
2514{ 2512{
2515 u32 fcoe_cntx_size, fcoe_filt_size; 2513 u32 fcoe_cntx_size, fcoe_filt_size;
2516 u32 pe_cntx_size, pe_filt_size; 2514 u32 pe_cntx_size, pe_filt_size;
2517 u32 fcoe_fmax, pe_fmax; 2515 u32 fcoe_fmax;
2518 u32 val; 2516 u32 val;
2519 2517
2520 /* Validate FCoE settings passed */ 2518 /* Validate FCoE settings passed */
@@ -2589,13 +2587,6 @@ static i40e_status i40e_validate_filter_settings(struct i40e_hw *hw,
2589 if (fcoe_filt_size + fcoe_cntx_size > fcoe_fmax) 2587 if (fcoe_filt_size + fcoe_cntx_size > fcoe_fmax)
2590 return I40E_ERR_INVALID_SIZE; 2588 return I40E_ERR_INVALID_SIZE;
2591 2589
2592 /* PEHSIZE + PEDSIZE should not be greater than PMPEXFMAX */
2593 val = rd32(hw, I40E_GLHMC_PEXFMAX);
2594 pe_fmax = (val & I40E_GLHMC_PEXFMAX_PMPEXFMAX_MASK)
2595 >> I40E_GLHMC_PEXFMAX_PMPEXFMAX_SHIFT;
2596 if (pe_filt_size + pe_cntx_size > pe_fmax)
2597 return I40E_ERR_INVALID_SIZE;
2598
2599 return 0; 2590 return 0;
2600} 2591}
2601 2592
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_hmc.c
index bf2d4cc5b569..9b987ccc9e82 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_hmc.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.c
@@ -201,7 +201,7 @@ exit:
201 **/ 201 **/
202i40e_status i40e_remove_pd_bp(struct i40e_hw *hw, 202i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
203 struct i40e_hmc_info *hmc_info, 203 struct i40e_hmc_info *hmc_info,
204 u32 idx, bool is_pf) 204 u32 idx)
205{ 205{
206 i40e_status ret_code = 0; 206 i40e_status ret_code = 0;
207 struct i40e_hmc_pd_entry *pd_entry; 207 struct i40e_hmc_pd_entry *pd_entry;
@@ -237,10 +237,7 @@ i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
237 pd_addr = (u64 *)pd_table->pd_page_addr.va; 237 pd_addr = (u64 *)pd_table->pd_page_addr.va;
238 pd_addr += rel_pd_idx; 238 pd_addr += rel_pd_idx;
239 memset(pd_addr, 0, sizeof(u64)); 239 memset(pd_addr, 0, sizeof(u64));
240 if (is_pf) 240 I40E_INVALIDATE_PF_HMC_PD(hw, sd_idx, idx);
241 I40E_INVALIDATE_PF_HMC_PD(hw, sd_idx, idx);
242 else
243 I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, idx, hmc_info->hmc_fn_id);
244 241
245 /* free memory here */ 242 /* free memory here */
246 ret_code = i40e_free_dma_mem(hw, &(pd_entry->bp.addr)); 243 ret_code = i40e_free_dma_mem(hw, &(pd_entry->bp.addr));
diff --git a/drivers/net/ethernet/intel/i40e/i40e_hmc.h b/drivers/net/ethernet/intel/i40e/i40e_hmc.h
index 0cd4701234f8..b45d8fedc5e7 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_hmc.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_hmc.h
@@ -163,11 +163,6 @@ struct i40e_hmc_info {
163 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \ 163 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \
164 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT))) 164 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
165 165
166#define I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, pd_idx, hmc_fn_id) \
167 wr32((hw), I40E_GLHMC_VFPDINV((hmc_fn_id) - I40E_FIRST_VF_FPM_ID), \
168 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \
169 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
170
171/** 166/**
172 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit 167 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
173 * @hmc_info: pointer to the HMC configuration information structure 168 * @hmc_info: pointer to the HMC configuration information structure
@@ -226,7 +221,7 @@ i40e_status i40e_add_pd_table_entry(struct i40e_hw *hw,
226 u32 pd_index); 221 u32 pd_index);
227i40e_status i40e_remove_pd_bp(struct i40e_hw *hw, 222i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
228 struct i40e_hmc_info *hmc_info, 223 struct i40e_hmc_info *hmc_info,
229 u32 idx, bool is_pf); 224 u32 idx);
230i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info, 225i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info,
231 u32 idx); 226 u32 idx);
232i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw, 227i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
index 5c341aeb5d53..870ab1ee072c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
@@ -397,7 +397,7 @@ static i40e_status i40e_create_lan_hmc_object(struct i40e_hw *hw,
397 /* remove the backing pages from pd_idx1 to i */ 397 /* remove the backing pages from pd_idx1 to i */
398 while (i && (i > pd_idx1)) { 398 while (i && (i > pd_idx1)) {
399 i40e_remove_pd_bp(hw, info->hmc_info, 399 i40e_remove_pd_bp(hw, info->hmc_info,
400 (i - 1), true); 400 (i - 1));
401 i--; 401 i--;
402 } 402 }
403 } 403 }
@@ -433,11 +433,7 @@ exit_sd_error:
433 ((j - 1) * I40E_HMC_MAX_BP_COUNT)); 433 ((j - 1) * I40E_HMC_MAX_BP_COUNT));
434 pd_lmt1 = min(pd_lmt, (j * I40E_HMC_MAX_BP_COUNT)); 434 pd_lmt1 = min(pd_lmt, (j * I40E_HMC_MAX_BP_COUNT));
435 for (i = pd_idx1; i < pd_lmt1; i++) { 435 for (i = pd_idx1; i < pd_lmt1; i++) {
436 i40e_remove_pd_bp( 436 i40e_remove_pd_bp(hw, info->hmc_info, i);
437 hw,
438 info->hmc_info,
439 i,
440 true);
441 } 437 }
442 i40e_remove_pd_page(hw, info->hmc_info, (j - 1)); 438 i40e_remove_pd_page(hw, info->hmc_info, (j - 1));
443 break; 439 break;
@@ -616,8 +612,7 @@ static i40e_status i40e_delete_lan_hmc_object(struct i40e_hw *hw,
616 pd_table = 612 pd_table =
617 &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table; 613 &info->hmc_info->sd_table.sd_entry[sd_idx].u.pd_table;
618 if (pd_table->pd_entry[rel_pd_idx].valid) { 614 if (pd_table->pd_entry[rel_pd_idx].valid) {
619 ret_code = i40e_remove_pd_bp(hw, info->hmc_info, 615 ret_code = i40e_remove_pd_bp(hw, info->hmc_info, j);
620 j, true);
621 if (ret_code) 616 if (ret_code)
622 goto exit; 617 goto exit;
623 } 618 }
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 63147a61677b..8c16e185de81 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
39 39
40#define DRV_VERSION_MAJOR 0 40#define DRV_VERSION_MAJOR 0
41#define DRV_VERSION_MINOR 4 41#define DRV_VERSION_MINOR 4
42#define DRV_VERSION_BUILD 3 42#define DRV_VERSION_BUILD 5
43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
44 __stringify(DRV_VERSION_MINOR) "." \ 44 __stringify(DRV_VERSION_MINOR) "." \
45 __stringify(DRV_VERSION_BUILD) DRV_KERN 45 __stringify(DRV_VERSION_BUILD) DRV_KERN
@@ -67,12 +67,10 @@ static int i40e_veb_get_bw_info(struct i40e_veb *veb);
67 */ 67 */
68static DEFINE_PCI_DEVICE_TABLE(i40e_pci_tbl) = { 68static DEFINE_PCI_DEVICE_TABLE(i40e_pci_tbl) = {
69 {PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_XL710), 0}, 69 {PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_XL710), 0},
70 {PCI_VDEVICE(INTEL, I40E_DEV_ID_SFP_X710), 0},
71 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QEMU), 0}, 70 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QEMU), 0},
72 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_A), 0}, 71 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_A), 0},
73 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_B), 0}, 72 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_B), 0},
74 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_C), 0}, 73 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_C), 0},
75 {PCI_VDEVICE(INTEL, I40E_DEV_ID_KX_D), 0},
76 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_A), 0}, 74 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_A), 0},
77 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_B), 0}, 75 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_B), 0},
78 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_C), 0}, 76 {PCI_VDEVICE(INTEL, I40E_DEV_ID_QSFP_C), 0},
@@ -397,7 +395,7 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct(
397 } 395 }
398 rcu_read_unlock(); 396 rcu_read_unlock();
399 397
400 /* following stats updated by ixgbe_watchdog_task() */ 398 /* following stats updated by i40e_watchdog_subtask() */
401 stats->multicast = vsi_stats->multicast; 399 stats->multicast = vsi_stats->multicast;
402 stats->tx_errors = vsi_stats->tx_errors; 400 stats->tx_errors = vsi_stats->tx_errors;
403 stats->tx_dropped = vsi_stats->tx_dropped; 401 stats->tx_dropped = vsi_stats->tx_dropped;
@@ -657,7 +655,7 @@ static void i40e_update_link_xoff_rx(struct i40e_pf *pf)
657 for (v = 0; v < pf->hw.func_caps.num_vsis; v++) { 655 for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
658 struct i40e_vsi *vsi = pf->vsi[v]; 656 struct i40e_vsi *vsi = pf->vsi[v];
659 657
660 if (!vsi) 658 if (!vsi || !vsi->tx_rings[0])
661 continue; 659 continue;
662 660
663 for (i = 0; i < vsi->num_queue_pairs; i++) { 661 for (i = 0; i < vsi->num_queue_pairs; i++) {
@@ -711,7 +709,7 @@ static void i40e_update_prio_xoff_rx(struct i40e_pf *pf)
711 for (v = 0; v < pf->hw.func_caps.num_vsis; v++) { 709 for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
712 struct i40e_vsi *vsi = pf->vsi[v]; 710 struct i40e_vsi *vsi = pf->vsi[v];
713 711
714 if (!vsi) 712 if (!vsi || !vsi->tx_rings[0])
715 continue; 713 continue;
716 714
717 for (i = 0; i < vsi->num_queue_pairs; i++) { 715 for (i = 0; i < vsi->num_queue_pairs; i++) {
@@ -5520,6 +5518,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
5520 i40e_verify_eeprom(pf); 5518 i40e_verify_eeprom(pf);
5521 } 5519 }
5522 5520
5521 i40e_clear_pxe_mode(hw);
5523 ret = i40e_get_capabilities(pf); 5522 ret = i40e_get_capabilities(pf);
5524 if (ret) { 5523 if (ret) {
5525 dev_info(&pf->pdev->dev, "i40e_get_capabilities failed, %d\n", 5524 dev_info(&pf->pdev->dev, "i40e_get_capabilities failed, %d\n",
@@ -5622,8 +5621,6 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
5622 /* tell the firmware that we're starting */ 5621 /* tell the firmware that we're starting */
5623 i40e_send_version(pf); 5622 i40e_send_version(pf);
5624 5623
5625 dev_info(&pf->pdev->dev, "reset complete\n");
5626
5627end_core_reset: 5624end_core_reset:
5628 clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state); 5625 clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state);
5629} 5626}
@@ -6139,8 +6136,6 @@ static int i40e_reserve_msix_vectors(struct i40e_pf *pf, int vectors)
6139 vectors = 0; 6136 vectors = 0;
6140 } 6137 }
6141 6138
6142 pf->num_msix_entries = vectors;
6143
6144 return vectors; 6139 return vectors;
6145} 6140}
6146 6141
@@ -6258,7 +6253,7 @@ static int i40e_vsi_alloc_q_vector(struct i40e_vsi *vsi, int v_idx)
6258 cpumask_set_cpu(v_idx, &q_vector->affinity_mask); 6253 cpumask_set_cpu(v_idx, &q_vector->affinity_mask);
6259 if (vsi->netdev) 6254 if (vsi->netdev)
6260 netif_napi_add(vsi->netdev, &q_vector->napi, 6255 netif_napi_add(vsi->netdev, &q_vector->napi,
6261 i40e_napi_poll, vsi->work_limit); 6256 i40e_napi_poll, NAPI_POLL_WEIGHT);
6262 6257
6263 q_vector->rx.latency_range = I40E_LOW_LATENCY; 6258 q_vector->rx.latency_range = I40E_LOW_LATENCY;
6264 q_vector->tx.latency_range = I40E_LOW_LATENCY; 6259 q_vector->tx.latency_range = I40E_LOW_LATENCY;
@@ -8239,11 +8234,12 @@ static void i40e_print_features(struct i40e_pf *pf)
8239 8234
8240 if (pf->flags & I40E_FLAG_RSS_ENABLED) 8235 if (pf->flags & I40E_FLAG_RSS_ENABLED)
8241 buf += sprintf(buf, "RSS "); 8236 buf += sprintf(buf, "RSS ");
8242 buf += sprintf(buf, "FDir ");
8243 if (pf->flags & I40E_FLAG_FD_ATR_ENABLED) 8237 if (pf->flags & I40E_FLAG_FD_ATR_ENABLED)
8244 buf += sprintf(buf, "ATR "); 8238 buf += sprintf(buf, "FD_ATR ");
8245 if (pf->flags & I40E_FLAG_FD_SB_ENABLED) 8239 if (pf->flags & I40E_FLAG_FD_SB_ENABLED) {
8240 buf += sprintf(buf, "FD_SB ");
8246 buf += sprintf(buf, "NTUPLE "); 8241 buf += sprintf(buf, "NTUPLE ");
8242 }
8247 if (pf->flags & I40E_FLAG_DCB_ENABLED) 8243 if (pf->flags & I40E_FLAG_DCB_ENABLED)
8248 buf += sprintf(buf, "DCB "); 8244 buf += sprintf(buf, "DCB ");
8249 if (pf->flags & I40E_FLAG_PTP) 8245 if (pf->flags & I40E_FLAG_PTP)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 1fe28ca18296..d1a9a0512b93 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2170,9 +2170,7 @@ static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
2170static int i40e_xmit_descriptor_count(struct sk_buff *skb, 2170static int i40e_xmit_descriptor_count(struct sk_buff *skb,
2171 struct i40e_ring *tx_ring) 2171 struct i40e_ring *tx_ring)
2172{ 2172{
2173#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
2174 unsigned int f; 2173 unsigned int f;
2175#endif
2176 int count = 0; 2174 int count = 0;
2177 2175
2178 /* need: 1 descriptor per page * PAGE_SIZE/I40E_MAX_DATA_PER_TXD, 2176 /* need: 1 descriptor per page * PAGE_SIZE/I40E_MAX_DATA_PER_TXD,
@@ -2181,12 +2179,9 @@ static int i40e_xmit_descriptor_count(struct sk_buff *skb,
2181 * + 1 desc for context descriptor, 2179 * + 1 desc for context descriptor,
2182 * otherwise try next time 2180 * otherwise try next time
2183 */ 2181 */
2184#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
2185 for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) 2182 for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
2186 count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size); 2183 count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
2187#else 2184
2188 count += skb_shinfo(skb)->nr_frags;
2189#endif
2190 count += TXD_USE_COUNT(skb_headlen(skb)); 2185 count += TXD_USE_COUNT(skb_headlen(skb));
2191 if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) { 2186 if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) {
2192 tx_ring->tx_stats.tx_busy++; 2187 tx_ring->tx_stats.tx_busy++;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index 30e5fe35fa3d..0277894fe1c4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -117,11 +117,11 @@ enum i40e_dyn_idx_t {
117#define i40e_rx_desc i40e_32byte_rx_desc 117#define i40e_rx_desc i40e_32byte_rx_desc
118 118
119#define I40E_MIN_TX_LEN 17 119#define I40E_MIN_TX_LEN 17
120#define I40E_MAX_DATA_PER_TXD 16383 /* aka 16kB - 1 */ 120#define I40E_MAX_DATA_PER_TXD 8192
121 121
122/* Tx Descriptors needed, worst case */ 122/* Tx Descriptors needed, worst case */
123#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD) 123#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD)
124#define DESC_NEEDED ((MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE)) + 4) 124#define DESC_NEEDED (MAX_SKB_FRAGS + 4)
125 125
126#define I40E_TX_FLAGS_CSUM (u32)(1) 126#define I40E_TX_FLAGS_CSUM (u32)(1)
127#define I40E_TX_FLAGS_HW_VLAN (u32)(1 << 1) 127#define I40E_TX_FLAGS_HW_VLAN (u32)(1 << 1)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 5a930b31728f..6c977d2d48e4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -36,12 +36,10 @@
36 36
37/* Device IDs */ 37/* Device IDs */
38#define I40E_DEV_ID_SFP_XL710 0x1572 38#define I40E_DEV_ID_SFP_XL710 0x1572
39#define I40E_DEV_ID_SFP_X710 0x1573
40#define I40E_DEV_ID_QEMU 0x1574 39#define I40E_DEV_ID_QEMU 0x1574
41#define I40E_DEV_ID_KX_A 0x157F 40#define I40E_DEV_ID_KX_A 0x157F
42#define I40E_DEV_ID_KX_B 0x1580 41#define I40E_DEV_ID_KX_B 0x1580
43#define I40E_DEV_ID_KX_C 0x1581 42#define I40E_DEV_ID_KX_C 0x1581
44#define I40E_DEV_ID_KX_D 0x1582
45#define I40E_DEV_ID_QSFP_A 0x1583 43#define I40E_DEV_ID_QSFP_A 0x1583
46#define I40E_DEV_ID_QSFP_B 0x1584 44#define I40E_DEV_ID_QSFP_B 0x1584
47#define I40E_DEV_ID_QSFP_C 0x1585 45#define I40E_DEV_ID_QSFP_C 0x1585
@@ -492,9 +490,6 @@ union i40e_32byte_rx_desc {
492 } wb; /* writeback */ 490 } wb; /* writeback */
493}; 491};
494 492
495#define I40E_RXD_QW1_STATUS_SHIFT 0
496#define I40E_RXD_QW1_STATUS_MASK (0x7FFFUL << I40E_RXD_QW1_STATUS_SHIFT)
497
498enum i40e_rx_desc_status_bits { 493enum i40e_rx_desc_status_bits {
499 /* Note: These are predefined bit offsets */ 494 /* Note: These are predefined bit offsets */
500 I40E_RX_DESC_STATUS_DD_SHIFT = 0, 495 I40E_RX_DESC_STATUS_DD_SHIFT = 0,
@@ -511,9 +506,14 @@ enum i40e_rx_desc_status_bits {
511 I40E_RX_DESC_STATUS_LPBK_SHIFT = 14, 506 I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
512 I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15, 507 I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
513 I40E_RX_DESC_STATUS_RESERVED_SHIFT = 16, /* 2 BITS */ 508 I40E_RX_DESC_STATUS_RESERVED_SHIFT = 16, /* 2 BITS */
514 I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18 509 I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18,
510 I40E_RX_DESC_STATUS_LAST /* this entry must be last!!! */
515}; 511};
516 512
513#define I40E_RXD_QW1_STATUS_SHIFT 0
514#define I40E_RXD_QW1_STATUS_MASK (((1 << I40E_RX_DESC_STATUS_LAST) - 1) \
515 << I40E_RXD_QW1_STATUS_SHIFT)
516
517#define I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT I40E_RX_DESC_STATUS_TSYNINDX_SHIFT 517#define I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT I40E_RX_DESC_STATUS_TSYNINDX_SHIFT
518#define I40E_RXD_QW1_STATUS_TSYNINDX_MASK (0x3UL << \ 518#define I40E_RXD_QW1_STATUS_TSYNINDX_MASK (0x3UL << \
519 I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT) 519 I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h b/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h
index 22a1b69cd646..70951d2edcad 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl.h
@@ -341,10 +341,6 @@ struct i40e_virtchnl_pf_event {
341 int severity; 341 int severity;
342}; 342};
343 343
344/* The following are TBD, not necessary for LAN functionality.
345 * I40E_VIRTCHNL_OP_FCOE
346 */
347
348/* VF reset states - these are written into the RSTAT register: 344/* VF reset states - these are written into the RSTAT register:
349 * I40E_VFGEN_RSTAT1 on the PF 345 * I40E_VFGEN_RSTAT1 on the PF
350 * I40E_VFGEN_RSTAT on the VF 346 * I40E_VFGEN_RSTAT on the VF
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index ea0f2001cc20..a43155afdbe2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -43,12 +43,10 @@ i40e_status i40e_set_mac_type(struct i40e_hw *hw)
43 if (hw->vendor_id == PCI_VENDOR_ID_INTEL) { 43 if (hw->vendor_id == PCI_VENDOR_ID_INTEL) {
44 switch (hw->device_id) { 44 switch (hw->device_id) {
45 case I40E_DEV_ID_SFP_XL710: 45 case I40E_DEV_ID_SFP_XL710:
46 case I40E_DEV_ID_SFP_X710:
47 case I40E_DEV_ID_QEMU: 46 case I40E_DEV_ID_QEMU:
48 case I40E_DEV_ID_KX_A: 47 case I40E_DEV_ID_KX_A:
49 case I40E_DEV_ID_KX_B: 48 case I40E_DEV_ID_KX_B:
50 case I40E_DEV_ID_KX_C: 49 case I40E_DEV_ID_KX_C:
51 case I40E_DEV_ID_KX_D:
52 case I40E_DEV_ID_QSFP_A: 50 case I40E_DEV_ID_QSFP_A:
53 case I40E_DEV_ID_QSFP_B: 51 case I40E_DEV_ID_QSFP_B:
54 case I40E_DEV_ID_QSFP_C: 52 case I40E_DEV_ID_QSFP_C:
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_hmc.h b/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
index 9d906514fc3d..a2ad9a4e399d 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_hmc.h
@@ -163,11 +163,6 @@ struct i40e_hmc_info {
163 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \ 163 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \
164 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT))) 164 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
165 165
166#define I40E_INVALIDATE_VF_HMC_PD(hw, sd_idx, pd_idx, hmc_fn_id) \
167 wr32((hw), I40E_GLHMC_VFPDINV((hmc_fn_id) - I40E_FIRST_VF_FPM_ID), \
168 (((sd_idx) << I40E_PFHMC_PDINV_PMSDIDX_SHIFT) | \
169 ((pd_idx) << I40E_PFHMC_PDINV_PMPDIDX_SHIFT)))
170
171/** 166/**
172 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit 167 * I40E_FIND_SD_INDEX_LIMIT - finds segment descriptor index limit
173 * @hmc_info: pointer to the HMC configuration information structure 168 * @hmc_info: pointer to the HMC configuration information structure
@@ -226,7 +221,7 @@ i40e_status i40e_add_pd_table_entry(struct i40e_hw *hw,
226 u32 pd_index); 221 u32 pd_index);
227i40e_status i40e_remove_pd_bp(struct i40e_hw *hw, 222i40e_status i40e_remove_pd_bp(struct i40e_hw *hw,
228 struct i40e_hmc_info *hmc_info, 223 struct i40e_hmc_info *hmc_info,
229 u32 idx, bool is_pf); 224 u32 idx);
230i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info, 225i40e_status i40e_prep_remove_sd_bp(struct i40e_hmc_info *hmc_info,
231 u32 idx); 226 u32 idx);
232i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw, 227i40e_status i40e_remove_sd_bp_new(struct i40e_hw *hw,
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 82d6844245b5..ae089df7df19 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1511,9 +1511,7 @@ static int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size)
1511static int i40e_xmit_descriptor_count(struct sk_buff *skb, 1511static int i40e_xmit_descriptor_count(struct sk_buff *skb,
1512 struct i40e_ring *tx_ring) 1512 struct i40e_ring *tx_ring)
1513{ 1513{
1514#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
1515 unsigned int f; 1514 unsigned int f;
1516#endif
1517 int count = 0; 1515 int count = 0;
1518 1516
1519 /* need: 1 descriptor per page * PAGE_SIZE/I40E_MAX_DATA_PER_TXD, 1517 /* need: 1 descriptor per page * PAGE_SIZE/I40E_MAX_DATA_PER_TXD,
@@ -1522,12 +1520,9 @@ static int i40e_xmit_descriptor_count(struct sk_buff *skb,
1522 * + 1 desc for context descriptor, 1520 * + 1 desc for context descriptor,
1523 * otherwise try next time 1521 * otherwise try next time
1524 */ 1522 */
1525#if PAGE_SIZE > I40E_MAX_DATA_PER_TXD
1526 for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) 1523 for (f = 0; f < skb_shinfo(skb)->nr_frags; f++)
1527 count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size); 1524 count += TXD_USE_COUNT(skb_shinfo(skb)->frags[f].size);
1528#else 1525
1529 count += skb_shinfo(skb)->nr_frags;
1530#endif
1531 count += TXD_USE_COUNT(skb_headlen(skb)); 1526 count += TXD_USE_COUNT(skb_headlen(skb));
1532 if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) { 1527 if (i40e_maybe_stop_tx(tx_ring, count + 4 + 1)) {
1533 tx_ring->tx_stats.tx_busy++; 1528 tx_ring->tx_stats.tx_busy++;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index e297a3aba0f2..30d248bc5d19 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -117,11 +117,11 @@ enum i40e_dyn_idx_t {
117#define i40e_rx_desc i40e_32byte_rx_desc 117#define i40e_rx_desc i40e_32byte_rx_desc
118 118
119#define I40E_MIN_TX_LEN 17 119#define I40E_MIN_TX_LEN 17
120#define I40E_MAX_DATA_PER_TXD 16383 /* aka 16kB - 1 */ 120#define I40E_MAX_DATA_PER_TXD 8192
121 121
122/* Tx Descriptors needed, worst case */ 122/* Tx Descriptors needed, worst case */
123#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD) 123#define TXD_USE_COUNT(S) DIV_ROUND_UP((S), I40E_MAX_DATA_PER_TXD)
124#define DESC_NEEDED ((MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE)) + 4) 124#define DESC_NEEDED (MAX_SKB_FRAGS + 4)
125 125
126#define I40E_TX_FLAGS_CSUM (u32)(1) 126#define I40E_TX_FLAGS_CSUM (u32)(1)
127#define I40E_TX_FLAGS_HW_VLAN (u32)(1 << 1) 127#define I40E_TX_FLAGS_HW_VLAN (u32)(1 << 1)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index 4fc9835ca7b1..e3c9ebbe7ca2 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -35,13 +35,11 @@
35#include "i40e_lan_hmc.h" 35#include "i40e_lan_hmc.h"
36 36
37/* Device IDs */ 37/* Device IDs */
38#define I40E_DEV_ID_SFP_XL710 0x1572 38#define I40E_DEV_ID_SFP_XL710 0x1572
39#define I40E_DEV_ID_SFP_X710 0x1573
40#define I40E_DEV_ID_QEMU 0x1574 39#define I40E_DEV_ID_QEMU 0x1574
41#define I40E_DEV_ID_KX_A 0x157F 40#define I40E_DEV_ID_KX_A 0x157F
42#define I40E_DEV_ID_KX_B 0x1580 41#define I40E_DEV_ID_KX_B 0x1580
43#define I40E_DEV_ID_KX_C 0x1581 42#define I40E_DEV_ID_KX_C 0x1581
44#define I40E_DEV_ID_KX_D 0x1582
45#define I40E_DEV_ID_QSFP_A 0x1583 43#define I40E_DEV_ID_QSFP_A 0x1583
46#define I40E_DEV_ID_QSFP_B 0x1584 44#define I40E_DEV_ID_QSFP_B 0x1584
47#define I40E_DEV_ID_QSFP_C 0x1585 45#define I40E_DEV_ID_QSFP_C 0x1585
@@ -492,9 +490,6 @@ union i40e_32byte_rx_desc {
492 } wb; /* writeback */ 490 } wb; /* writeback */
493}; 491};
494 492
495#define I40E_RXD_QW1_STATUS_SHIFT 0
496#define I40E_RXD_QW1_STATUS_MASK (0x7FFFUL << I40E_RXD_QW1_STATUS_SHIFT)
497
498enum i40e_rx_desc_status_bits { 493enum i40e_rx_desc_status_bits {
499 /* Note: These are predefined bit offsets */ 494 /* Note: These are predefined bit offsets */
500 I40E_RX_DESC_STATUS_DD_SHIFT = 0, 495 I40E_RX_DESC_STATUS_DD_SHIFT = 0,
@@ -511,9 +506,14 @@ enum i40e_rx_desc_status_bits {
511 I40E_RX_DESC_STATUS_LPBK_SHIFT = 14, 506 I40E_RX_DESC_STATUS_LPBK_SHIFT = 14,
512 I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15, 507 I40E_RX_DESC_STATUS_IPV6EXADD_SHIFT = 15,
513 I40E_RX_DESC_STATUS_RESERVED_SHIFT = 16, /* 2 BITS */ 508 I40E_RX_DESC_STATUS_RESERVED_SHIFT = 16, /* 2 BITS */
514 I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18 509 I40E_RX_DESC_STATUS_UDP_0_SHIFT = 18,
510 I40E_RX_DESC_STATUS_LAST /* this entry must be last!!! */
515}; 511};
516 512
513#define I40E_RXD_QW1_STATUS_SHIFT 0
514#define I40E_RXD_QW1_STATUS_MASK (((1 << I40E_RX_DESC_STATUS_LAST) - 1) \
515 << I40E_RXD_QW1_STATUS_SHIFT)
516
517#define I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT I40E_RX_DESC_STATUS_TSYNINDX_SHIFT 517#define I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT I40E_RX_DESC_STATUS_TSYNINDX_SHIFT
518#define I40E_RXD_QW1_STATUS_TSYNINDX_MASK (0x3UL << \ 518#define I40E_RXD_QW1_STATUS_TSYNINDX_MASK (0x3UL << \
519 I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT) 519 I40E_RXD_QW1_STATUS_TSYNINDX_SHIFT)
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h b/drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h
index 1ef5b31ece90..cd18d5689006 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h
@@ -341,10 +341,6 @@ struct i40e_virtchnl_pf_event {
341 int severity; 341 int severity;
342}; 342};
343 343
344/* The following are TBD, not necessary for LAN functionality.
345 * I40E_VIRTCHNL_OP_FCOE
346 */
347
348/* VF reset states - these are written into the RSTAT register: 344/* VF reset states - these are written into the RSTAT register:
349 * I40E_VFGEN_RSTAT1 on the PF 345 * I40E_VFGEN_RSTAT1 on the PF
350 * I40E_VFGEN_RSTAT on the VF 346 * I40E_VFGEN_RSTAT on the VF
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index feff317befb6..e8d2481d1849 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -36,7 +36,7 @@ char i40evf_driver_name[] = "i40evf";
36static const char i40evf_driver_string[] = 36static const char i40evf_driver_string[] =
37 "Intel(R) XL710 X710 Virtual Function Network Driver"; 37 "Intel(R) XL710 X710 Virtual Function Network Driver";
38 38
39#define DRV_VERSION "0.9.27" 39#define DRV_VERSION "0.9.29"
40const char i40evf_driver_version[] = DRV_VERSION; 40const char i40evf_driver_version[] = DRV_VERSION;
41static const char i40evf_copyright[] = 41static const char i40evf_copyright[] =
42 "Copyright (c) 2013 - 2014 Intel Corporation."; 42 "Copyright (c) 2013 - 2014 Intel Corporation.";
@@ -172,7 +172,6 @@ static void i40evf_tx_timeout(struct net_device *netdev)
172 struct i40evf_adapter *adapter = netdev_priv(netdev); 172 struct i40evf_adapter *adapter = netdev_priv(netdev);
173 173
174 adapter->tx_timeout_count++; 174 adapter->tx_timeout_count++;
175 dev_info(&adapter->pdev->dev, "TX timeout detected.\n");
176 if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING)) { 175 if (!(adapter->flags & I40EVF_FLAG_RESET_PENDING)) {
177 adapter->flags |= I40EVF_FLAG_RESET_NEEDED; 176 adapter->flags |= I40EVF_FLAG_RESET_NEEDED;
178 schedule_work(&adapter->reset_task); 177 schedule_work(&adapter->reset_task);
@@ -662,12 +661,9 @@ i40evf_vlan_filter *i40evf_add_vlan(struct i40evf_adapter *adapter, u16 vlan)
662 f = i40evf_find_vlan(adapter, vlan); 661 f = i40evf_find_vlan(adapter, vlan);
663 if (NULL == f) { 662 if (NULL == f) {
664 f = kzalloc(sizeof(*f), GFP_ATOMIC); 663 f = kzalloc(sizeof(*f), GFP_ATOMIC);
665 if (NULL == f) { 664 if (NULL == f)
666 dev_info(&adapter->pdev->dev,
667 "%s: no memory for new VLAN filter\n",
668 __func__);
669 return NULL; 665 return NULL;
670 } 666
671 f->vlan = vlan; 667 f->vlan = vlan;
672 668
673 INIT_LIST_HEAD(&f->list); 669 INIT_LIST_HEAD(&f->list);
@@ -771,8 +767,6 @@ i40evf_mac_filter *i40evf_add_filter(struct i40evf_adapter *adapter,
771 if (NULL == f) { 767 if (NULL == f) {
772 f = kzalloc(sizeof(*f), GFP_ATOMIC); 768 f = kzalloc(sizeof(*f), GFP_ATOMIC);
773 if (NULL == f) { 769 if (NULL == f) {
774 dev_info(&adapter->pdev->dev,
775 "%s: no memory for new filter\n", __func__);
776 clear_bit(__I40EVF_IN_CRITICAL_TASK, 770 clear_bit(__I40EVF_IN_CRITICAL_TASK,
777 &adapter->crit_section); 771 &adapter->crit_section);
778 return NULL; 772 return NULL;
@@ -1034,7 +1028,7 @@ i40evf_acquire_msix_vectors(struct i40evf_adapter *adapter, int vectors)
1034 err = pci_enable_msix_range(adapter->pdev, adapter->msix_entries, 1028 err = pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
1035 vector_threshold, vectors); 1029 vector_threshold, vectors);
1036 if (err < 0) { 1030 if (err < 0) {
1037 dev_err(&adapter->pdev->dev, "Unable to allocate MSI-X interrupts.\n"); 1031 dev_err(&adapter->pdev->dev, "Unable to allocate MSI-X interrupts\n");
1038 kfree(adapter->msix_entries); 1032 kfree(adapter->msix_entries);
1039 adapter->msix_entries = NULL; 1033 adapter->msix_entries = NULL;
1040 return err; 1034 return err;
@@ -1136,9 +1130,6 @@ static int i40evf_set_interrupt_capability(struct i40evf_adapter *adapter)
1136 v_budget = min_t(int, pairs, (int)(num_online_cpus() * 2)) + NONQ_VECS; 1130 v_budget = min_t(int, pairs, (int)(num_online_cpus() * 2)) + NONQ_VECS;
1137 v_budget = min_t(int, v_budget, (int)adapter->vf_res->max_vectors); 1131 v_budget = min_t(int, v_budget, (int)adapter->vf_res->max_vectors);
1138 1132
1139 /* A failure in MSI-X entry allocation isn't fatal, but it does
1140 * mean we disable MSI-X capabilities of the adapter.
1141 */
1142 adapter->msix_entries = kcalloc(v_budget, 1133 adapter->msix_entries = kcalloc(v_budget,
1143 sizeof(struct msix_entry), GFP_KERNEL); 1134 sizeof(struct msix_entry), GFP_KERNEL);
1144 if (!adapter->msix_entries) { 1135 if (!adapter->msix_entries) {
@@ -1178,7 +1169,7 @@ static int i40evf_alloc_q_vectors(struct i40evf_adapter *adapter)
1178 q_vector->vsi = &adapter->vsi; 1169 q_vector->vsi = &adapter->vsi;
1179 q_vector->v_idx = q_idx; 1170 q_vector->v_idx = q_idx;
1180 netif_napi_add(adapter->netdev, &q_vector->napi, 1171 netif_napi_add(adapter->netdev, &q_vector->napi,
1181 i40evf_napi_poll, 64); 1172 i40evf_napi_poll, NAPI_POLL_WEIGHT);
1182 adapter->q_vector[q_idx] = q_vector; 1173 adapter->q_vector[q_idx] = q_vector;
1183 } 1174 }
1184 1175
@@ -1332,8 +1323,7 @@ static void i40evf_watchdog_task(struct work_struct *work)
1332 (rd32(hw, I40E_VFGEN_RSTAT) & 0x3) != I40E_VFR_VFACTIVE) { 1323 (rd32(hw, I40E_VFGEN_RSTAT) & 0x3) != I40E_VFR_VFACTIVE) {
1333 adapter->state = __I40EVF_RESETTING; 1324 adapter->state = __I40EVF_RESETTING;
1334 adapter->flags |= I40EVF_FLAG_RESET_PENDING; 1325 adapter->flags |= I40EVF_FLAG_RESET_PENDING;
1335 dev_err(&adapter->pdev->dev, "Hardware reset detected.\n"); 1326 dev_err(&adapter->pdev->dev, "Hardware reset detected\n");
1336 dev_info(&adapter->pdev->dev, "Scheduling reset task\n");
1337 schedule_work(&adapter->reset_task); 1327 schedule_work(&adapter->reset_task);
1338 adapter->aq_pending = 0; 1328 adapter->aq_pending = 0;
1339 adapter->aq_required = 0; 1329 adapter->aq_required = 0;
@@ -1496,15 +1486,12 @@ static void i40evf_reset_task(struct work_struct *work)
1496 for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) { 1486 for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
1497 rstat_val = rd32(hw, I40E_VFGEN_RSTAT) & 1487 rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
1498 I40E_VFGEN_RSTAT_VFR_STATE_MASK; 1488 I40E_VFGEN_RSTAT_VFR_STATE_MASK;
1499 if (rstat_val != I40E_VFR_VFACTIVE) { 1489 if (rstat_val != I40E_VFR_VFACTIVE)
1500 dev_info(&adapter->pdev->dev, "Reset now occurring\n");
1501 break; 1490 break;
1502 } else { 1491 else
1503 msleep(I40EVF_RESET_WAIT_MS); 1492 msleep(I40EVF_RESET_WAIT_MS);
1504 }
1505 } 1493 }
1506 if (i == I40EVF_RESET_WAIT_COUNT) { 1494 if (i == I40EVF_RESET_WAIT_COUNT) {
1507 dev_err(&adapter->pdev->dev, "Reset was not detected\n");
1508 adapter->flags &= ~I40EVF_FLAG_RESET_PENDING; 1495 adapter->flags &= ~I40EVF_FLAG_RESET_PENDING;
1509 goto continue_reset; /* act like the reset happened */ 1496 goto continue_reset; /* act like the reset happened */
1510 } 1497 }
@@ -1513,16 +1500,14 @@ static void i40evf_reset_task(struct work_struct *work)
1513 for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) { 1500 for (i = 0; i < I40EVF_RESET_WAIT_COUNT; i++) {
1514 rstat_val = rd32(hw, I40E_VFGEN_RSTAT) & 1501 rstat_val = rd32(hw, I40E_VFGEN_RSTAT) &
1515 I40E_VFGEN_RSTAT_VFR_STATE_MASK; 1502 I40E_VFGEN_RSTAT_VFR_STATE_MASK;
1516 if (rstat_val == I40E_VFR_VFACTIVE) { 1503 if (rstat_val == I40E_VFR_VFACTIVE)
1517 dev_info(&adapter->pdev->dev, "Reset is complete. Reinitializing.\n");
1518 break; 1504 break;
1519 } else { 1505 else
1520 msleep(I40EVF_RESET_WAIT_MS); 1506 msleep(I40EVF_RESET_WAIT_MS);
1521 }
1522 } 1507 }
1523 if (i == I40EVF_RESET_WAIT_COUNT) { 1508 if (i == I40EVF_RESET_WAIT_COUNT) {
1524 /* reset never finished */ 1509 /* reset never finished */
1525 dev_err(&adapter->pdev->dev, "Reset never finished (%x). PF driver is dead, and so am I.\n", 1510 dev_err(&adapter->pdev->dev, "Reset never finished (%x)\n",
1526 rstat_val); 1511 rstat_val);
1527 adapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED; 1512 adapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED;
1528 1513
@@ -1587,7 +1572,7 @@ continue_reset:
1587 } 1572 }
1588 return; 1573 return;
1589reset_err: 1574reset_err:
1590 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit.\n"); 1575 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");
1591 i40evf_close(adapter->netdev); 1576 i40evf_close(adapter->netdev);
1592} 1577}
1593 1578
@@ -1610,11 +1595,9 @@ static void i40evf_adminq_task(struct work_struct *work)
1610 1595
1611 event.msg_size = I40EVF_MAX_AQ_BUF_SIZE; 1596 event.msg_size = I40EVF_MAX_AQ_BUF_SIZE;
1612 event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL); 1597 event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL);
1613 if (!event.msg_buf) { 1598 if (!event.msg_buf)
1614 dev_info(&adapter->pdev->dev, "%s: no memory for ARQ clean\n",
1615 __func__);
1616 return; 1599 return;
1617 } 1600
1618 v_msg = (struct i40e_virtchnl_msg *)&event.desc; 1601 v_msg = (struct i40e_virtchnl_msg *)&event.desc;
1619 do { 1602 do {
1620 ret = i40evf_clean_arq_element(hw, &event, &pending); 1603 ret = i40evf_clean_arq_element(hw, &event, &pending);
@@ -1868,7 +1851,7 @@ void i40evf_reinit_locked(struct i40evf_adapter *adapter)
1868 return; 1851 return;
1869 1852
1870err_reinit: 1853err_reinit:
1871 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit.\n"); 1854 dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n");
1872 i40evf_close(netdev); 1855 i40evf_close(netdev);
1873} 1856}
1874 1857
@@ -1989,7 +1972,7 @@ static void i40evf_init_task(struct work_struct *work)
1989 break; 1972 break;
1990 case __I40EVF_INIT_VERSION_CHECK: 1973 case __I40EVF_INIT_VERSION_CHECK:
1991 if (!i40evf_asq_done(hw)) { 1974 if (!i40evf_asq_done(hw)) {
1992 dev_err(&pdev->dev, "Admin queue command never completed.\n"); 1975 dev_err(&pdev->dev, "Admin queue command never completed\n");
1993 goto err; 1976 goto err;
1994 } 1977 }
1995 1978
@@ -2070,7 +2053,7 @@ static void i40evf_init_task(struct work_struct *work)
2070 netdev->hw_features &= ~NETIF_F_RXCSUM; 2053 netdev->hw_features &= ~NETIF_F_RXCSUM;
2071 2054
2072 if (!is_valid_ether_addr(adapter->hw.mac.addr)) { 2055 if (!is_valid_ether_addr(adapter->hw.mac.addr)) {
2073 dev_info(&pdev->dev, "Invalid MAC address %pMAC, using random\n", 2056 dev_info(&pdev->dev, "Invalid MAC address %pM, using random\n",
2074 adapter->hw.mac.addr); 2057 adapter->hw.mac.addr);
2075 random_ether_addr(adapter->hw.mac.addr); 2058 random_ether_addr(adapter->hw.mac.addr);
2076 } 2059 }
@@ -2128,7 +2111,7 @@ static void i40evf_init_task(struct work_struct *work)
2128 2111
2129 netif_tx_stop_all_queues(netdev); 2112 netif_tx_stop_all_queues(netdev);
2130 2113
2131 dev_info(&pdev->dev, "MAC address: %pMAC\n", adapter->hw.mac.addr); 2114 dev_info(&pdev->dev, "MAC address: %pM\n", adapter->hw.mac.addr);
2132 if (netdev->features & NETIF_F_GRO) 2115 if (netdev->features & NETIF_F_GRO)
2133 dev_info(&pdev->dev, "GRO is enabled\n"); 2116 dev_info(&pdev->dev, "GRO is enabled\n");
2134 2117
@@ -2152,7 +2135,7 @@ err_alloc:
2152err: 2135err:
2153 /* Things went into the weeds, so try again later */ 2136 /* Things went into the weeds, so try again later */
2154 if (++adapter->aq_wait_count > I40EVF_AQ_MAX_ERR) { 2137 if (++adapter->aq_wait_count > I40EVF_AQ_MAX_ERR) {
2155 dev_err(&pdev->dev, "Failed to communicate with PF; giving up.\n"); 2138 dev_err(&pdev->dev, "Failed to communicate with PF; giving up\n");
2156 adapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED; 2139 adapter->flags |= I40EVF_FLAG_PF_COMMS_FAILED;
2157 return; /* do not reschedule */ 2140 return; /* do not reschedule */
2158 } 2141 }
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
index b3cd3cd644a1..cd414dac7553 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
@@ -219,11 +219,9 @@ void i40evf_configure_queues(struct i40evf_adapter *adapter)
219 len = sizeof(struct i40e_virtchnl_vsi_queue_config_info) + 219 len = sizeof(struct i40e_virtchnl_vsi_queue_config_info) +
220 (sizeof(struct i40e_virtchnl_queue_pair_info) * pairs); 220 (sizeof(struct i40e_virtchnl_queue_pair_info) * pairs);
221 vqci = kzalloc(len, GFP_ATOMIC); 221 vqci = kzalloc(len, GFP_ATOMIC);
222 if (!vqci) { 222 if (!vqci)
223 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
224 __func__);
225 return; 223 return;
226 } 224
227 vqci->vsi_id = adapter->vsi_res->vsi_id; 225 vqci->vsi_id = adapter->vsi_res->vsi_id;
228 vqci->num_queue_pairs = pairs; 226 vqci->num_queue_pairs = pairs;
229 vqpi = vqci->qpair; 227 vqpi = vqci->qpair;
@@ -332,11 +330,8 @@ void i40evf_map_queues(struct i40evf_adapter *adapter)
332 (adapter->num_msix_vectors * 330 (adapter->num_msix_vectors *
333 sizeof(struct i40e_virtchnl_vector_map)); 331 sizeof(struct i40e_virtchnl_vector_map));
334 vimi = kzalloc(len, GFP_ATOMIC); 332 vimi = kzalloc(len, GFP_ATOMIC);
335 if (!vimi) { 333 if (!vimi)
336 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
337 __func__);
338 return; 334 return;
339 }
340 335
341 vimi->num_vectors = adapter->num_msix_vectors; 336 vimi->num_vectors = adapter->num_msix_vectors;
342 /* Queue vectors first */ 337 /* Queue vectors first */
@@ -393,7 +388,7 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)
393 len = sizeof(struct i40e_virtchnl_ether_addr_list) + 388 len = sizeof(struct i40e_virtchnl_ether_addr_list) +
394 (count * sizeof(struct i40e_virtchnl_ether_addr)); 389 (count * sizeof(struct i40e_virtchnl_ether_addr));
395 if (len > I40EVF_MAX_AQ_BUF_SIZE) { 390 if (len > I40EVF_MAX_AQ_BUF_SIZE) {
396 dev_warn(&adapter->pdev->dev, "%s: Too many MAC address changes in one request.\n", 391 dev_warn(&adapter->pdev->dev, "%s: Too many MAC address changes in one request\n",
397 __func__); 392 __func__);
398 count = (I40EVF_MAX_AQ_BUF_SIZE - 393 count = (I40EVF_MAX_AQ_BUF_SIZE -
399 sizeof(struct i40e_virtchnl_ether_addr_list)) / 394 sizeof(struct i40e_virtchnl_ether_addr_list)) /
@@ -402,11 +397,9 @@ void i40evf_add_ether_addrs(struct i40evf_adapter *adapter)
402 } 397 }
403 398
404 veal = kzalloc(len, GFP_ATOMIC); 399 veal = kzalloc(len, GFP_ATOMIC);
405 if (!veal) { 400 if (!veal)
406 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
407 __func__);
408 return; 401 return;
409 } 402
410 veal->vsi_id = adapter->vsi_res->vsi_id; 403 veal->vsi_id = adapter->vsi_res->vsi_id;
411 veal->num_elements = count; 404 veal->num_elements = count;
412 list_for_each_entry(f, &adapter->mac_filter_list, list) { 405 list_for_each_entry(f, &adapter->mac_filter_list, list) {
@@ -457,7 +450,7 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)
457 len = sizeof(struct i40e_virtchnl_ether_addr_list) + 450 len = sizeof(struct i40e_virtchnl_ether_addr_list) +
458 (count * sizeof(struct i40e_virtchnl_ether_addr)); 451 (count * sizeof(struct i40e_virtchnl_ether_addr));
459 if (len > I40EVF_MAX_AQ_BUF_SIZE) { 452 if (len > I40EVF_MAX_AQ_BUF_SIZE) {
460 dev_warn(&adapter->pdev->dev, "%s: Too many MAC address changes in one request.\n", 453 dev_warn(&adapter->pdev->dev, "%s: Too many MAC address changes in one request\n",
461 __func__); 454 __func__);
462 count = (I40EVF_MAX_AQ_BUF_SIZE - 455 count = (I40EVF_MAX_AQ_BUF_SIZE -
463 sizeof(struct i40e_virtchnl_ether_addr_list)) / 456 sizeof(struct i40e_virtchnl_ether_addr_list)) /
@@ -465,11 +458,9 @@ void i40evf_del_ether_addrs(struct i40evf_adapter *adapter)
465 len = I40EVF_MAX_AQ_BUF_SIZE; 458 len = I40EVF_MAX_AQ_BUF_SIZE;
466 } 459 }
467 veal = kzalloc(len, GFP_ATOMIC); 460 veal = kzalloc(len, GFP_ATOMIC);
468 if (!veal) { 461 if (!veal)
469 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
470 __func__);
471 return; 462 return;
472 } 463
473 veal->vsi_id = adapter->vsi_res->vsi_id; 464 veal->vsi_id = adapter->vsi_res->vsi_id;
474 veal->num_elements = count; 465 veal->num_elements = count;
475 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { 466 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) {
@@ -521,7 +512,7 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)
521 len = sizeof(struct i40e_virtchnl_vlan_filter_list) + 512 len = sizeof(struct i40e_virtchnl_vlan_filter_list) +
522 (count * sizeof(u16)); 513 (count * sizeof(u16));
523 if (len > I40EVF_MAX_AQ_BUF_SIZE) { 514 if (len > I40EVF_MAX_AQ_BUF_SIZE) {
524 dev_warn(&adapter->pdev->dev, "%s: Too many VLAN changes in one request.\n", 515 dev_warn(&adapter->pdev->dev, "%s: Too many VLAN changes in one request\n",
525 __func__); 516 __func__);
526 count = (I40EVF_MAX_AQ_BUF_SIZE - 517 count = (I40EVF_MAX_AQ_BUF_SIZE -
527 sizeof(struct i40e_virtchnl_vlan_filter_list)) / 518 sizeof(struct i40e_virtchnl_vlan_filter_list)) /
@@ -529,11 +520,9 @@ void i40evf_add_vlans(struct i40evf_adapter *adapter)
529 len = I40EVF_MAX_AQ_BUF_SIZE; 520 len = I40EVF_MAX_AQ_BUF_SIZE;
530 } 521 }
531 vvfl = kzalloc(len, GFP_ATOMIC); 522 vvfl = kzalloc(len, GFP_ATOMIC);
532 if (!vvfl) { 523 if (!vvfl)
533 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
534 __func__);
535 return; 524 return;
536 } 525
537 vvfl->vsi_id = adapter->vsi_res->vsi_id; 526 vvfl->vsi_id = adapter->vsi_res->vsi_id;
538 vvfl->num_elements = count; 527 vvfl->num_elements = count;
539 list_for_each_entry(f, &adapter->vlan_filter_list, list) { 528 list_for_each_entry(f, &adapter->vlan_filter_list, list) {
@@ -583,7 +572,7 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)
583 len = sizeof(struct i40e_virtchnl_vlan_filter_list) + 572 len = sizeof(struct i40e_virtchnl_vlan_filter_list) +
584 (count * sizeof(u16)); 573 (count * sizeof(u16));
585 if (len > I40EVF_MAX_AQ_BUF_SIZE) { 574 if (len > I40EVF_MAX_AQ_BUF_SIZE) {
586 dev_warn(&adapter->pdev->dev, "%s: Too many VLAN changes in one request.\n", 575 dev_warn(&adapter->pdev->dev, "%s: Too many VLAN changes in one request\n",
587 __func__); 576 __func__);
588 count = (I40EVF_MAX_AQ_BUF_SIZE - 577 count = (I40EVF_MAX_AQ_BUF_SIZE -
589 sizeof(struct i40e_virtchnl_vlan_filter_list)) / 578 sizeof(struct i40e_virtchnl_vlan_filter_list)) /
@@ -591,11 +580,9 @@ void i40evf_del_vlans(struct i40evf_adapter *adapter)
591 len = I40EVF_MAX_AQ_BUF_SIZE; 580 len = I40EVF_MAX_AQ_BUF_SIZE;
592 } 581 }
593 vvfl = kzalloc(len, GFP_ATOMIC); 582 vvfl = kzalloc(len, GFP_ATOMIC);
594 if (!vvfl) { 583 if (!vvfl)
595 dev_err(&adapter->pdev->dev, "%s: unable to allocate memory\n",
596 __func__);
597 return; 584 return;
598 } 585
599 vvfl->vsi_id = adapter->vsi_res->vsi_id; 586 vvfl->vsi_id = adapter->vsi_res->vsi_id;
600 vvfl->num_elements = count; 587 vvfl->num_elements = count;
601 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { 588 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) {
@@ -724,7 +711,7 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
724 return; 711 return;
725 } 712 }
726 if (v_opcode != adapter->current_op) { 713 if (v_opcode != adapter->current_op) {
727 dev_err(&adapter->pdev->dev, "%s: Pending op is %d, received %d.\n", 714 dev_err(&adapter->pdev->dev, "%s: Pending op is %d, received %d\n",
728 __func__, adapter->current_op, v_opcode); 715 __func__, adapter->current_op, v_opcode);
729 /* We're probably completely screwed at this point, but clear 716 /* We're probably completely screwed at this point, but clear
730 * the current op and try to carry on.... 717 * the current op and try to carry on....
@@ -733,7 +720,7 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
733 return; 720 return;
734 } 721 }
735 if (v_retval) { 722 if (v_retval) {
736 dev_err(&adapter->pdev->dev, "%s: PF returned error %d to our request %d!\n", 723 dev_err(&adapter->pdev->dev, "%s: PF returned error %d to our request %d\n",
737 __func__, v_retval, v_opcode); 724 __func__, v_retval, v_opcode);
738 } 725 }
739 switch (v_opcode) { 726 switch (v_opcode) {
@@ -783,7 +770,7 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
783 adapter->aq_pending &= ~(I40EVF_FLAG_AQ_MAP_VECTORS); 770 adapter->aq_pending &= ~(I40EVF_FLAG_AQ_MAP_VECTORS);
784 break; 771 break;
785 default: 772 default:
786 dev_warn(&adapter->pdev->dev, "%s: Received unexpected message %d from PF.\n", 773 dev_warn(&adapter->pdev->dev, "%s: Received unexpected message %d from PF\n",
787 __func__, v_opcode); 774 __func__, v_opcode);
788 break; 775 break;
789 } /* switch v_opcode */ 776 } /* switch v_opcode */