Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflicts: MAINTAINERS - keep Chandrasekar drivers/net/ethernet/mellanox/mlx5/core/en_main.c - simple fix + trust the code re-added to param.c in -next is fine include/linux/bpf.h - trivial include/linux/ethtool.h - trivial, fix kdoc while at it include/linux/skmsg.h - move to relevant place in tcp.c, comment re-wrapped net/core/skmsg.c - add the sk = sk // sk = NULL around calls net/tipc/crypto.c - trivial Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -3493,15 +3493,14 @@ static int ice_init_interrupt_scheme(struct ice_pf *pf)
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_is_wol_supported - get NVM state of WoL
|
||||
* @pf: board private structure
|
||||
* ice_is_wol_supported - check if WoL is supported
|
||||
* @hw: pointer to hardware info
|
||||
*
|
||||
* Check if WoL is supported based on the HW configuration.
|
||||
* Returns true if NVM supports and enables WoL for this port, false otherwise
|
||||
*/
|
||||
bool ice_is_wol_supported(struct ice_pf *pf)
|
||||
bool ice_is_wol_supported(struct ice_hw *hw)
|
||||
{
|
||||
struct ice_hw *hw = &pf->hw;
|
||||
u16 wol_ctrl;
|
||||
|
||||
/* A bit set to 1 in the NVM Software Reserved Word 2 (WoL control
|
||||
@@ -3510,7 +3509,7 @@ bool ice_is_wol_supported(struct ice_pf *pf)
|
||||
if (ice_read_sr_word(hw, ICE_SR_NVM_WOL_CFG, &wol_ctrl))
|
||||
return false;
|
||||
|
||||
return !(BIT(hw->pf_id) & wol_ctrl);
|
||||
return !(BIT(hw->port_info->lport) & wol_ctrl);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4182,28 +4181,25 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
|
||||
goto err_send_version_unroll;
|
||||
}
|
||||
|
||||
/* not a fatal error if this fails */
|
||||
err = ice_init_nvm_phy_type(pf->hw.port_info);
|
||||
if (err) {
|
||||
if (err)
|
||||
dev_err(dev, "ice_init_nvm_phy_type failed: %d\n", err);
|
||||
goto err_send_version_unroll;
|
||||
}
|
||||
|
||||
/* not a fatal error if this fails */
|
||||
err = ice_update_link_info(pf->hw.port_info);
|
||||
if (err) {
|
||||
if (err)
|
||||
dev_err(dev, "ice_update_link_info failed: %d\n", err);
|
||||
goto err_send_version_unroll;
|
||||
}
|
||||
|
||||
ice_init_link_dflt_override(pf->hw.port_info);
|
||||
|
||||
/* if media available, initialize PHY settings */
|
||||
if (pf->hw.port_info->phy.link_info.link_info &
|
||||
ICE_AQ_MEDIA_AVAILABLE) {
|
||||
/* not a fatal error if this fails */
|
||||
err = ice_init_phy_user_cfg(pf->hw.port_info);
|
||||
if (err) {
|
||||
if (err)
|
||||
dev_err(dev, "ice_init_phy_user_cfg failed: %d\n", err);
|
||||
goto err_send_version_unroll;
|
||||
}
|
||||
|
||||
if (!test_bit(ICE_FLAG_LINK_DOWN_ON_CLOSE_ENA, pf->flags)) {
|
||||
struct ice_vsi *vsi = ice_get_main_vsi(pf);
|
||||
@@ -4564,6 +4560,7 @@ static int __maybe_unused ice_suspend(struct device *dev)
|
||||
continue;
|
||||
ice_vsi_free_q_vectors(pf->vsi[v]);
|
||||
}
|
||||
ice_free_cpu_rx_rmap(ice_get_main_vsi(pf));
|
||||
ice_clear_interrupt_scheme(pf);
|
||||
|
||||
pci_save_state(pdev);
|
||||
@@ -6658,6 +6655,28 @@ static void ice_tx_timeout(struct net_device *netdev, unsigned int txqueue)
|
||||
* Returns 0 on success, negative value on failure
|
||||
*/
|
||||
int ice_open(struct net_device *netdev)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_pf *pf = np->vsi->back;
|
||||
|
||||
if (ice_is_reset_in_progress(pf->state)) {
|
||||
netdev_err(netdev, "can't open net device while reset is in progress");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
return ice_open_internal(netdev);
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_open_internal - Called when a network interface becomes active
|
||||
* @netdev: network interface device structure
|
||||
*
|
||||
* Internal ice_open implementation. Should not be used directly except for ice_open and reset
|
||||
* handling routine
|
||||
*
|
||||
* Returns 0 on success, negative value on failure
|
||||
*/
|
||||
int ice_open_internal(struct net_device *netdev)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_vsi *vsi = np->vsi;
|
||||
@@ -6729,6 +6748,12 @@ int ice_stop(struct net_device *netdev)
|
||||
{
|
||||
struct ice_netdev_priv *np = netdev_priv(netdev);
|
||||
struct ice_vsi *vsi = np->vsi;
|
||||
struct ice_pf *pf = vsi->back;
|
||||
|
||||
if (ice_is_reset_in_progress(pf->state)) {
|
||||
netdev_err(netdev, "can't stop net device while reset is in progress");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
ice_vsi_close(vsi);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user