Commit fd7ce282 authored by David S. Miller's avatar David S. Miller

Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2021-06-24

This series contains updates to i40e driver only.

Dinghao Liu corrects error handling for failed i40e_vsi_request_irq()
call.

Mateusz allows for disabling of autonegotiation for all BaseT media.

Jesse corrects the multiplier being used on 5Gb speeds for PTP.

Jan adds locking in paths calling i40e_setup_pf_switch() that were
missing it.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 624085a3 956e759d
...@@ -1262,8 +1262,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev, ...@@ -1262,8 +1262,7 @@ static int i40e_set_link_ksettings(struct net_device *netdev,
if (ethtool_link_ksettings_test_link_mode(&safe_ks, if (ethtool_link_ksettings_test_link_mode(&safe_ks,
supported, supported,
Autoneg) && Autoneg) &&
hw->phy.link_info.phy_type != hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
I40E_PHY_TYPE_10GBASE_T) {
netdev_info(netdev, "Autoneg cannot be disabled on this phy\n"); netdev_info(netdev, "Autoneg cannot be disabled on this phy\n");
err = -EINVAL; err = -EINVAL;
goto done; goto done;
......
...@@ -32,7 +32,7 @@ static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi); ...@@ -32,7 +32,7 @@ static void i40e_vsi_reinit_locked(struct i40e_vsi *vsi);
static void i40e_handle_reset_warning(struct i40e_pf *pf, bool lock_acquired); static void i40e_handle_reset_warning(struct i40e_pf *pf, bool lock_acquired);
static int i40e_add_vsi(struct i40e_vsi *vsi); static int i40e_add_vsi(struct i40e_vsi *vsi);
static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi); static int i40e_add_veb(struct i40e_veb *veb, struct i40e_vsi *vsi);
static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit); static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit, bool lock_acquired);
static int i40e_setup_misc_vector(struct i40e_pf *pf); static int i40e_setup_misc_vector(struct i40e_pf *pf);
static void i40e_determine_queue_usage(struct i40e_pf *pf); static void i40e_determine_queue_usage(struct i40e_pf *pf);
static int i40e_setup_pf_filter_control(struct i40e_pf *pf); static int i40e_setup_pf_filter_control(struct i40e_pf *pf);
...@@ -8703,6 +8703,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi) ...@@ -8703,6 +8703,8 @@ int i40e_vsi_open(struct i40e_vsi *vsi)
dev_driver_string(&pf->pdev->dev), dev_driver_string(&pf->pdev->dev),
dev_name(&pf->pdev->dev)); dev_name(&pf->pdev->dev));
err = i40e_vsi_request_irq(vsi, int_name); err = i40e_vsi_request_irq(vsi, int_name);
if (err)
goto err_setup_rx;
} else { } else {
err = -EINVAL; err = -EINVAL;
...@@ -10569,7 +10571,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) ...@@ -10569,7 +10571,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
#endif /* CONFIG_I40E_DCB */ #endif /* CONFIG_I40E_DCB */
if (!lock_acquired) if (!lock_acquired)
rtnl_lock(); rtnl_lock();
ret = i40e_setup_pf_switch(pf, reinit); ret = i40e_setup_pf_switch(pf, reinit, true);
if (ret) if (ret)
goto end_unlock; goto end_unlock;
...@@ -14627,10 +14629,11 @@ int i40e_fetch_switch_configuration(struct i40e_pf *pf, bool printconfig) ...@@ -14627,10 +14629,11 @@ int i40e_fetch_switch_configuration(struct i40e_pf *pf, bool printconfig)
* i40e_setup_pf_switch - Setup the HW switch on startup or after reset * i40e_setup_pf_switch - Setup the HW switch on startup or after reset
* @pf: board private structure * @pf: board private structure
* @reinit: if the Main VSI needs to re-initialized. * @reinit: if the Main VSI needs to re-initialized.
* @lock_acquired: indicates whether or not the lock has been acquired
* *
* Returns 0 on success, negative value on failure * Returns 0 on success, negative value on failure
**/ **/
static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit) static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit, bool lock_acquired)
{ {
u16 flags = 0; u16 flags = 0;
int ret; int ret;
...@@ -14732,9 +14735,15 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit) ...@@ -14732,9 +14735,15 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
i40e_ptp_init(pf); i40e_ptp_init(pf);
if (!lock_acquired)
rtnl_lock();
/* repopulate tunnel port filters */ /* repopulate tunnel port filters */
udp_tunnel_nic_reset_ntf(pf->vsi[pf->lan_vsi]->netdev); udp_tunnel_nic_reset_ntf(pf->vsi[pf->lan_vsi]->netdev);
if (!lock_acquired)
rtnl_unlock();
return ret; return ret;
} }
...@@ -15528,7 +15537,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -15528,7 +15537,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pf->flags |= I40E_FLAG_VEB_MODE_ENABLED; pf->flags |= I40E_FLAG_VEB_MODE_ENABLED;
} }
#endif #endif
err = i40e_setup_pf_switch(pf, false); err = i40e_setup_pf_switch(pf, false, false);
if (err) { if (err) {
dev_info(&pdev->dev, "setup_pf_switch failed: %d\n", err); dev_info(&pdev->dev, "setup_pf_switch failed: %d\n", err);
goto err_vsis; goto err_vsis;
......
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
* operate with the nanosecond field directly without fear of overflow. * operate with the nanosecond field directly without fear of overflow.
* *
* Much like the 82599, the update period is dependent upon the link speed: * Much like the 82599, the update period is dependent upon the link speed:
* At 40Gb link or no link, the period is 1.6ns. * At 40Gb, 25Gb, or no link, the period is 1.6ns.
* At 10Gb link, the period is multiplied by 2. (3.2ns) * At 10Gb or 5Gb link, the period is multiplied by 2. (3.2ns)
* At 1Gb link, the period is multiplied by 20. (32ns) * At 1Gb link, the period is multiplied by 20. (32ns)
* 1588 functionality is not supported at 100Mbps. * 1588 functionality is not supported at 100Mbps.
*/ */
#define I40E_PTP_40GB_INCVAL 0x0199999999ULL #define I40E_PTP_40GB_INCVAL 0x0199999999ULL
#define I40E_PTP_10GB_INCVAL_MULT 2 #define I40E_PTP_10GB_INCVAL_MULT 2
#define I40E_PTP_5GB_INCVAL_MULT 2
#define I40E_PTP_1GB_INCVAL_MULT 20 #define I40E_PTP_1GB_INCVAL_MULT 20
#define I40E_PRTTSYN_CTL1_TSYNTYPE_V1 BIT(I40E_PRTTSYN_CTL1_TSYNTYPE_SHIFT) #define I40E_PRTTSYN_CTL1_TSYNTYPE_V1 BIT(I40E_PRTTSYN_CTL1_TSYNTYPE_SHIFT)
...@@ -465,6 +466,9 @@ void i40e_ptp_set_increment(struct i40e_pf *pf) ...@@ -465,6 +466,9 @@ void i40e_ptp_set_increment(struct i40e_pf *pf)
case I40E_LINK_SPEED_10GB: case I40E_LINK_SPEED_10GB:
mult = I40E_PTP_10GB_INCVAL_MULT; mult = I40E_PTP_10GB_INCVAL_MULT;
break; break;
case I40E_LINK_SPEED_5GB:
mult = I40E_PTP_5GB_INCVAL_MULT;
break;
case I40E_LINK_SPEED_1GB: case I40E_LINK_SPEED_1GB:
mult = I40E_PTP_1GB_INCVAL_MULT; mult = I40E_PTP_1GB_INCVAL_MULT;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment