aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-06 17:30:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-06 17:30:17 -0400
commitb29794ec95c6856b316c2295904208bf11ffddd9 (patch)
tree3016cb5e694f1ef5d63e682841e7ec45e91a5d35 /drivers/net/ethernet/intel/i40e/i40e_main.c
parente87f327ecd166e6cf0205e4e9b8003ec535add51 (diff)
parent1d3028f4c16487d63861ab6c68451768a7a109df (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Made TCP congestion control documentation match current reality, from Anmol Sarma. 2) Various build warning and failure fixes from Arnd Bergmann. 3) Fix SKB list leak in ipv6_gso_segment(). 4) Use after free in ravb driver, from Eugeniu Rosca. 5) Don't use udp_poll() in ping protocol driver, from Eric Dumazet. 6) Don't crash in PCI error recovery of cxgb4 driver, from Guilherme Piccoli. 7) _SRC_NAT_DONE_BIT needs to be cleared using atomics, from Liping Zhang. 8) Use after free in vxlan deletion, from Mark Bloch. 9) Fix ordering of NAPI poll enabled in ethoc driver, from Max Filippov. 10) Fix stmmac hangs with TSO, from Niklas Cassel. 11) Fix crash in CALIPSO ipv6, from Richard Haines. 12) Clear nh_flags properly on mpls link up. From Roopa Prabhu. 13) Fix regression in sk_err socket error queue handling, noticed by ping applications. From Soheil Hassas Yeganeh. 14) Update mlx4/mlx5 MAINTAINERS information. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (78 commits) net: stmmac: fix a broken u32 less than zero check net: stmmac: fix completely hung TX when using TSO net: ethoc: enable NAPI before poll may be scheduled net: bridge: fix a null pointer dereference in br_afspec ravb: Fix use-after-free on `ifconfig eth0 down` net/ipv6: Fix CALIPSO causing GPF with datagram support net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value Revert "sit: reload iphdr in ipip6_rcv" i40e/i40evf: proper update of the page_offset field i40e: Fix state flags for bit set and clean operations of PF iwlwifi: fix host command memory leaks iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265 iwlwifi: mvm: clear new beacon command template struct iwlwifi: mvm: don't fail when removing a key from an inexisting sta iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3 iwlwifi: mvm: fix firmware debug restart recording iwlwifi: tt: move ucode_loaded check under mutex iwlwifi: mvm: support ibss in dqa mode iwlwifi: mvm: Fix command queue number on d0i3 flow iwlwifi: mvm: rs: start using LQ command color ...
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index d5c9c9e06ff5..150caf6ca2b4 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -295,7 +295,7 @@ struct i40e_vsi *i40e_find_vsi_from_id(struct i40e_pf *pf, u16 id)
295 **/ 295 **/
296void i40e_service_event_schedule(struct i40e_pf *pf) 296void i40e_service_event_schedule(struct i40e_pf *pf)
297{ 297{
298 if (!test_bit(__I40E_VSI_DOWN, pf->state) && 298 if (!test_bit(__I40E_DOWN, pf->state) &&
299 !test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state)) 299 !test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state))
300 queue_work(i40e_wq, &pf->service_task); 300 queue_work(i40e_wq, &pf->service_task);
301} 301}
@@ -3611,7 +3611,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
3611 * this is not a performance path and napi_schedule() 3611 * this is not a performance path and napi_schedule()
3612 * can deal with rescheduling. 3612 * can deal with rescheduling.
3613 */ 3613 */
3614 if (!test_bit(__I40E_VSI_DOWN, pf->state)) 3614 if (!test_bit(__I40E_DOWN, pf->state))
3615 napi_schedule_irqoff(&q_vector->napi); 3615 napi_schedule_irqoff(&q_vector->napi);
3616 } 3616 }
3617 3617
@@ -3687,7 +3687,7 @@ static irqreturn_t i40e_intr(int irq, void *data)
3687enable_intr: 3687enable_intr:
3688 /* re-enable interrupt causes */ 3688 /* re-enable interrupt causes */
3689 wr32(hw, I40E_PFINT_ICR0_ENA, ena_mask); 3689 wr32(hw, I40E_PFINT_ICR0_ENA, ena_mask);
3690 if (!test_bit(__I40E_VSI_DOWN, pf->state)) { 3690 if (!test_bit(__I40E_DOWN, pf->state)) {
3691 i40e_service_event_schedule(pf); 3691 i40e_service_event_schedule(pf);
3692 i40e_irq_dynamic_enable_icr0(pf, false); 3692 i40e_irq_dynamic_enable_icr0(pf, false);
3693 } 3693 }
@@ -6203,7 +6203,7 @@ static void i40e_fdir_reinit_subtask(struct i40e_pf *pf)
6203{ 6203{
6204 6204
6205 /* if interface is down do nothing */ 6205 /* if interface is down do nothing */
6206 if (test_bit(__I40E_VSI_DOWN, pf->state)) 6206 if (test_bit(__I40E_DOWN, pf->state))
6207 return; 6207 return;
6208 6208
6209 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state)) 6209 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state))
@@ -6344,7 +6344,7 @@ static void i40e_watchdog_subtask(struct i40e_pf *pf)
6344 int i; 6344 int i;
6345 6345
6346 /* if interface is down do nothing */ 6346 /* if interface is down do nothing */
6347 if (test_bit(__I40E_VSI_DOWN, pf->state) || 6347 if (test_bit(__I40E_DOWN, pf->state) ||
6348 test_bit(__I40E_CONFIG_BUSY, pf->state)) 6348 test_bit(__I40E_CONFIG_BUSY, pf->state))
6349 return; 6349 return;
6350 6350
@@ -6399,9 +6399,9 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
6399 reset_flags |= BIT(__I40E_GLOBAL_RESET_REQUESTED); 6399 reset_flags |= BIT(__I40E_GLOBAL_RESET_REQUESTED);
6400 clear_bit(__I40E_GLOBAL_RESET_REQUESTED, pf->state); 6400 clear_bit(__I40E_GLOBAL_RESET_REQUESTED, pf->state);
6401 } 6401 }
6402 if (test_bit(__I40E_VSI_DOWN_REQUESTED, pf->state)) { 6402 if (test_bit(__I40E_DOWN_REQUESTED, pf->state)) {
6403 reset_flags |= BIT(__I40E_VSI_DOWN_REQUESTED); 6403 reset_flags |= BIT(__I40E_DOWN_REQUESTED);
6404 clear_bit(__I40E_VSI_DOWN_REQUESTED, pf->state); 6404 clear_bit(__I40E_DOWN_REQUESTED, pf->state);
6405 } 6405 }
6406 6406
6407 /* If there's a recovery already waiting, it takes 6407 /* If there's a recovery already waiting, it takes
@@ -6415,7 +6415,7 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
6415 6415
6416 /* If we're already down or resetting, just bail */ 6416 /* If we're already down or resetting, just bail */
6417 if (reset_flags && 6417 if (reset_flags &&
6418 !test_bit(__I40E_VSI_DOWN, pf->state) && 6418 !test_bit(__I40E_DOWN, pf->state) &&
6419 !test_bit(__I40E_CONFIG_BUSY, pf->state)) { 6419 !test_bit(__I40E_CONFIG_BUSY, pf->state)) {
6420 rtnl_lock(); 6420 rtnl_lock();
6421 i40e_do_reset(pf, reset_flags, true); 6421 i40e_do_reset(pf, reset_flags, true);
@@ -7002,7 +7002,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
7002 u32 val; 7002 u32 val;
7003 int v; 7003 int v;
7004 7004
7005 if (test_bit(__I40E_VSI_DOWN, pf->state)) 7005 if (test_bit(__I40E_DOWN, pf->state))
7006 goto clear_recovery; 7006 goto clear_recovery;
7007 dev_dbg(&pf->pdev->dev, "Rebuilding internal switch\n"); 7007 dev_dbg(&pf->pdev->dev, "Rebuilding internal switch\n");
7008 7008
@@ -9767,7 +9767,7 @@ int i40e_vsi_release(struct i40e_vsi *vsi)
9767 return -ENODEV; 9767 return -ENODEV;
9768 } 9768 }
9769 if (vsi == pf->vsi[pf->lan_vsi] && 9769 if (vsi == pf->vsi[pf->lan_vsi] &&
9770 !test_bit(__I40E_VSI_DOWN, pf->state)) { 9770 !test_bit(__I40E_DOWN, pf->state)) {
9771 dev_info(&pf->pdev->dev, "Can't remove PF VSI\n"); 9771 dev_info(&pf->pdev->dev, "Can't remove PF VSI\n");
9772 return -ENODEV; 9772 return -ENODEV;
9773 } 9773 }
@@ -11003,7 +11003,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11003 } 11003 }
11004 pf->next_vsi = 0; 11004 pf->next_vsi = 0;
11005 pf->pdev = pdev; 11005 pf->pdev = pdev;
11006 set_bit(__I40E_VSI_DOWN, pf->state); 11006 set_bit(__I40E_DOWN, pf->state);
11007 11007
11008 hw = &pf->hw; 11008 hw = &pf->hw;
11009 hw->back = pf; 11009 hw->back = pf;
@@ -11293,7 +11293,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11293 * before setting up the misc vector or we get a race and the vector 11293 * before setting up the misc vector or we get a race and the vector
11294 * ends up disabled forever. 11294 * ends up disabled forever.
11295 */ 11295 */
11296 clear_bit(__I40E_VSI_DOWN, pf->state); 11296 clear_bit(__I40E_DOWN, pf->state);
11297 11297
11298 /* In case of MSIX we are going to setup the misc vector right here 11298 /* In case of MSIX we are going to setup the misc vector right here
11299 * to handle admin queue events etc. In case of legacy and MSI 11299 * to handle admin queue events etc. In case of legacy and MSI
@@ -11448,7 +11448,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11448 11448
11449 /* Unwind what we've done if something failed in the setup */ 11449 /* Unwind what we've done if something failed in the setup */
11450err_vsis: 11450err_vsis:
11451 set_bit(__I40E_VSI_DOWN, pf->state); 11451 set_bit(__I40E_DOWN, pf->state);
11452 i40e_clear_interrupt_scheme(pf); 11452 i40e_clear_interrupt_scheme(pf);
11453 kfree(pf->vsi); 11453 kfree(pf->vsi);
11454err_switch_setup: 11454err_switch_setup:
@@ -11500,7 +11500,7 @@ static void i40e_remove(struct pci_dev *pdev)
11500 11500
11501 /* no more scheduling of any task */ 11501 /* no more scheduling of any task */
11502 set_bit(__I40E_SUSPENDED, pf->state); 11502 set_bit(__I40E_SUSPENDED, pf->state);
11503 set_bit(__I40E_VSI_DOWN, pf->state); 11503 set_bit(__I40E_DOWN, pf->state);
11504 if (pf->service_timer.data) 11504 if (pf->service_timer.data)
11505 del_timer_sync(&pf->service_timer); 11505 del_timer_sync(&pf->service_timer);
11506 if (pf->service_task.func) 11506 if (pf->service_task.func)
@@ -11740,7 +11740,7 @@ static void i40e_shutdown(struct pci_dev *pdev)
11740 struct i40e_hw *hw = &pf->hw; 11740 struct i40e_hw *hw = &pf->hw;
11741 11741
11742 set_bit(__I40E_SUSPENDED, pf->state); 11742 set_bit(__I40E_SUSPENDED, pf->state);
11743 set_bit(__I40E_VSI_DOWN, pf->state); 11743 set_bit(__I40E_DOWN, pf->state);
11744 rtnl_lock(); 11744 rtnl_lock();
11745 i40e_prep_for_reset(pf, true); 11745 i40e_prep_for_reset(pf, true);
11746 rtnl_unlock(); 11746 rtnl_unlock();
@@ -11789,7 +11789,7 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
11789 int retval = 0; 11789 int retval = 0;
11790 11790
11791 set_bit(__I40E_SUSPENDED, pf->state); 11791 set_bit(__I40E_SUSPENDED, pf->state);
11792 set_bit(__I40E_VSI_DOWN, pf->state); 11792 set_bit(__I40E_DOWN, pf->state);
11793 11793
11794 if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE)) 11794 if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
11795 i40e_enable_mc_magic_wake(pf); 11795 i40e_enable_mc_magic_wake(pf);
@@ -11841,7 +11841,7 @@ static int i40e_resume(struct pci_dev *pdev)
11841 11841
11842 /* handling the reset will rebuild the device state */ 11842 /* handling the reset will rebuild the device state */
11843 if (test_and_clear_bit(__I40E_SUSPENDED, pf->state)) { 11843 if (test_and_clear_bit(__I40E_SUSPENDED, pf->state)) {
11844 clear_bit(__I40E_VSI_DOWN, pf->state); 11844 clear_bit(__I40E_DOWN, pf->state);
11845 rtnl_lock(); 11845 rtnl_lock();
11846 i40e_reset_and_rebuild(pf, false, true); 11846 i40e_reset_and_rebuild(pf, false, true);
11847 rtnl_unlock(); 11847 rtnl_unlock();