diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2014-05-10 00:49:04 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-06-08 05:01:29 -0400 |
commit | 249c8b8d7e2d1bf9505dc46458537e77326c24fd (patch) | |
tree | 310078585460899c462c9d787ebf59b0e94bf866 | |
parent | a5282f447d5e50cf285770226156a566e73687c2 (diff) |
i40evf: remove unnecessary log messages
We don't need to print log messages when we encounter an out-of-memory
condition, as the allocator will do this for us. Also, remove a Tx hang
message that duplicates the one emitted by the netdev layer, and a
duplicate message in the watchdog.
Change-ID: If2056e6135fe248f66ea939778f9895660f4d189
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_main.c | 19 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 35 |
2 files changed, 16 insertions, 38 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index feff317befb6..360a91188437 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c | |||
@@ -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; |
@@ -1332,8 +1326,7 @@ static void i40evf_watchdog_task(struct work_struct *work) | |||
1332 | (rd32(hw, I40E_VFGEN_RSTAT) & 0x3) != I40E_VFR_VFACTIVE) { | 1326 | (rd32(hw, I40E_VFGEN_RSTAT) & 0x3) != I40E_VFR_VFACTIVE) { |
1333 | adapter->state = __I40EVF_RESETTING; | 1327 | adapter->state = __I40EVF_RESETTING; |
1334 | adapter->flags |= I40EVF_FLAG_RESET_PENDING; | 1328 | adapter->flags |= I40EVF_FLAG_RESET_PENDING; |
1335 | dev_err(&adapter->pdev->dev, "Hardware reset detected.\n"); | 1329 | 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); | 1330 | schedule_work(&adapter->reset_task); |
1338 | adapter->aq_pending = 0; | 1331 | adapter->aq_pending = 0; |
1339 | adapter->aq_required = 0; | 1332 | adapter->aq_required = 0; |
@@ -1610,11 +1603,9 @@ static void i40evf_adminq_task(struct work_struct *work) | |||
1610 | 1603 | ||
1611 | event.msg_size = I40EVF_MAX_AQ_BUF_SIZE; | 1604 | event.msg_size = I40EVF_MAX_AQ_BUF_SIZE; |
1612 | event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL); | 1605 | event.msg_buf = kzalloc(event.msg_size, GFP_KERNEL); |
1613 | if (!event.msg_buf) { | 1606 | if (!event.msg_buf) |
1614 | dev_info(&adapter->pdev->dev, "%s: no memory for ARQ clean\n", | ||
1615 | __func__); | ||
1616 | return; | 1607 | return; |
1617 | } | 1608 | |
1618 | v_msg = (struct i40e_virtchnl_msg *)&event.desc; | 1609 | v_msg = (struct i40e_virtchnl_msg *)&event.desc; |
1619 | do { | 1610 | do { |
1620 | ret = i40evf_clean_arq_element(hw, &event, &pending); | 1611 | ret = i40evf_clean_arq_element(hw, &event, &pending); |
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c index b3cd3cd644a1..13faacdfabba 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 */ |
@@ -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) { |
@@ -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) { |
@@ -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) { |
@@ -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) { |