Skip to content

Commit c76cb6e

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
i40e: Drop FCoE code that always evaluates to false or 0
Since FCoE isn't supported by the i40e products there isn't much point in carrying around code that will always evaluate to false. This patch goes through and strips out the code in several spots so that we don't go around carrying variables and/or code that is always going to evaluate to false or 0. Change-ID: I39d1d779c66c638b75525839db2b6208fdc809d7 Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 9eed69a commit c76cb6e

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,9 +502,6 @@ struct i40e_pf {
502502
*/
503503
u16 dcbx_cap;
504504

505-
u32 fcoe_hmc_filt_num;
506-
u32 fcoe_hmc_cntx_num;
507-
508505
struct i40e_filter_control_settings filter_settings;
509506

510507
struct ptp_clock *ptp_clock;

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4369,14 +4369,6 @@ static void i40e_quiesce_vsi(struct i40e_vsi *vsi)
43694369
if (test_bit(__I40E_DOWN, &vsi->state))
43704370
return;
43714371

4372-
/* No need to disable FCoE VSI when Tx suspended */
4373-
if ((test_bit(__I40E_PORT_TX_SUSPENDED, &vsi->back->state)) &&
4374-
vsi->type == I40E_VSI_FCOE) {
4375-
dev_dbg(&vsi->back->pdev->dev,
4376-
"VSI seid %d skipping FCoE VSI disable\n", vsi->seid);
4377-
return;
4378-
}
4379-
43804372
set_bit(__I40E_NEEDS_RESTART, &vsi->state);
43814373
if (vsi->netdev && netif_running(vsi->netdev))
43824374
vsi->netdev->netdev_ops->ndo_stop(vsi->netdev);
@@ -4479,8 +4471,7 @@ static int i40e_pf_wait_queues_disabled(struct i40e_pf *pf)
44794471
int v, ret = 0;
44804472

44814473
for (v = 0; v < pf->hw.func_caps.num_vsis; v++) {
4482-
/* No need to wait for FCoE VSI queues */
4483-
if (pf->vsi[v] && pf->vsi[v]->type != I40E_VSI_FCOE) {
4474+
if (pf->vsi[v]) {
44844475
ret = i40e_vsi_wait_queues_disabled(pf->vsi[v]);
44854476
if (ret)
44864477
break;
@@ -6968,8 +6959,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
69686959
goto end_core_reset;
69696960

69706961
ret = i40e_init_lan_hmc(hw, hw->func_caps.num_tx_qp,
6971-
hw->func_caps.num_rx_qp,
6972-
pf->fcoe_hmc_cntx_num, pf->fcoe_hmc_filt_num);
6962+
hw->func_caps.num_rx_qp, 0, 0);
69736963
if (ret) {
69746964
dev_info(&pf->pdev->dev, "init_lan_hmc failed: %d\n", ret);
69756965
goto end_core_reset;
@@ -11014,8 +11004,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1101411004
}
1101511005

1101611006
err = i40e_init_lan_hmc(hw, hw->func_caps.num_tx_qp,
11017-
hw->func_caps.num_rx_qp,
11018-
pf->fcoe_hmc_cntx_num, pf->fcoe_hmc_filt_num);
11007+
hw->func_caps.num_rx_qp, 0, 0);
1101911008
if (err) {
1102011009
dev_info(&pdev->dev, "init_lan_hmc failed: %d\n", err);
1102111010
goto err_init_lan_hmc;

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ struct i40e_vf {
8787
u16 stag;
8888

8989
struct i40e_virtchnl_ether_addr default_lan_addr;
90-
struct i40e_virtchnl_ether_addr default_fcoe_addr;
9190
u16 port_vlan_id;
9291
bool pf_set_mac; /* The VMM admin set the VF MAC address */
9392
bool trusted;

0 commit comments

Comments
 (0)