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

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net

Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates

This series contains updates to net, ixgbe and e1000e.

David provides compiler fixes for e1000e.

Don provides a fix for ixgbe to resolve a compile warning.

John provides a fix to net where it is useful to be able to walk all
upper devices when bringing a device online where the RTNL lock is held.
In this case, it is safe to walk the all_adj_list because the RTNL lock is
used to protect the write side as well.  This patch adds a check to see
if the RTNL lock is held before throwing a warning in
netdev_all_upper_get_next_dev_rcu().
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1a1f20bc 8f48f5bc
...@@ -718,8 +718,11 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) ...@@ -718,8 +718,11 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
e1000_release_phy_80003es2lan(hw); e1000_release_phy_80003es2lan(hw);
/* Disable IBIST slave mode (far-end loopback) */ /* Disable IBIST slave mode (far-end loopback) */
e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, ret_val =
&kum_reg_data); e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
&kum_reg_data);
if (ret_val)
return ret_val;
kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
kum_reg_data); kum_reg_data);
......
...@@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev) ...@@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM
static int e1000_suspend(struct device *dev) static int e1000_suspend(struct device *dev)
{ {
struct pci_dev *pdev = to_pci_dev(dev); struct pci_dev *pdev = to_pci_dev(dev);
...@@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev) ...@@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev)
return __e1000_resume(pdev); return __e1000_resume(pdev);
} }
#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM */
#ifdef CONFIG_PM_RUNTIME #ifdef CONFIG_PM_RUNTIME
static int e1000_runtime_suspend(struct device *dev) static int e1000_runtime_suspend(struct device *dev)
......
...@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations, ...@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations,
* it across the board. * it across the board.
*/ */
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
if (ret_val) if (ret_val) {
/* If the first read fails, another entity may have /* If the first read fails, another entity may have
* ownership of the resources, wait and try again to * ownership of the resources, wait and try again to
* see if they have relinquished the resources yet. * see if they have relinquished the resources yet.
*/ */
udelay(usec_interval); if (usec_interval >= 1000)
msleep(usec_interval / 1000);
else
udelay(usec_interval);
}
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
if (ret_val) if (ret_val)
break; break;
if (phy_status & BMSR_LSTATUS) if (phy_status & BMSR_LSTATUS)
break; break;
if (usec_interval >= 1000) if (usec_interval >= 1000)
mdelay(usec_interval / 1000); msleep(usec_interval / 1000);
else else
udelay(usec_interval); udelay(usec_interval);
} }
......
...@@ -291,7 +291,9 @@ static int ixgbe_pci_sriov_disable(struct pci_dev *dev) ...@@ -291,7 +291,9 @@ static int ixgbe_pci_sriov_disable(struct pci_dev *dev)
{ {
struct ixgbe_adapter *adapter = pci_get_drvdata(dev); struct ixgbe_adapter *adapter = pci_get_drvdata(dev);
int err; int err;
#ifdef CONFIG_PCI_IOV
u32 current_flags = adapter->flags; u32 current_flags = adapter->flags;
#endif
err = ixgbe_disable_sriov(adapter); err = ixgbe_disable_sriov(adapter);
......
...@@ -24,6 +24,11 @@ extern int rtnl_trylock(void); ...@@ -24,6 +24,11 @@ extern int rtnl_trylock(void);
extern int rtnl_is_locked(void); extern int rtnl_is_locked(void);
#ifdef CONFIG_PROVE_LOCKING #ifdef CONFIG_PROVE_LOCKING
extern int lockdep_rtnl_is_held(void); extern int lockdep_rtnl_is_held(void);
#else
static inline int lockdep_rtnl_is_held(void)
{
return 1;
}
#endif /* #ifdef CONFIG_PROVE_LOCKING */ #endif /* #ifdef CONFIG_PROVE_LOCKING */
/** /**
......
...@@ -4500,7 +4500,7 @@ struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev, ...@@ -4500,7 +4500,7 @@ struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev,
{ {
struct netdev_adjacent *upper; struct netdev_adjacent *upper;
WARN_ON_ONCE(!rcu_read_lock_held()); WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held());
upper = list_entry_rcu((*iter)->next, struct netdev_adjacent, list); upper = list_entry_rcu((*iter)->next, struct netdev_adjacent, list);
......
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