diff options
author | David S. Miller <davem@davemloft.net> | 2013-12-19 19:23:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-19 19:23:54 -0500 |
commit | b1aca94efa566551e3ea5ed6ee4adc068ae86d1c (patch) | |
tree | 703dc5dc03ed86e3a266ff86d88861d076928639 | |
parent | 1a1f20bc9debd133549d5b289bd5494a4264a73d (diff) | |
parent | 8f48f5bc759d6f945ff0c3b2bf2a1d5971e561ba (diff) |
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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 5 | ||||
-rw-r--r-- | net/core/dev.c | 2 |
6 files changed, 22 insertions, 8 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index 895450e9bb3c..ff2d806eaef7 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | |||
@@ -718,8 +718,11 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) | |||
718 | e1000_release_phy_80003es2lan(hw); | 718 | e1000_release_phy_80003es2lan(hw); |
719 | 719 | ||
720 | /* Disable IBIST slave mode (far-end loopback) */ | 720 | /* Disable IBIST slave mode (far-end loopback) */ |
721 | e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, | 721 | ret_val = |
722 | &kum_reg_data); | 722 | e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
723 | &kum_reg_data); | ||
724 | if (ret_val) | ||
725 | return ret_val; | ||
723 | kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; | 726 | kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; |
724 | e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, | 727 | e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
725 | kum_reg_data); | 728 | kum_reg_data); |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 8d3945ab7334..c30d41d6e426 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
@@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev) | |||
6174 | return 0; | 6174 | return 0; |
6175 | } | 6175 | } |
6176 | 6176 | ||
6177 | #ifdef CONFIG_PM_SLEEP | 6177 | #ifdef CONFIG_PM |
6178 | static int e1000_suspend(struct device *dev) | 6178 | static int e1000_suspend(struct device *dev) |
6179 | { | 6179 | { |
6180 | struct pci_dev *pdev = to_pci_dev(dev); | 6180 | struct pci_dev *pdev = to_pci_dev(dev); |
@@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev) | |||
6193 | 6193 | ||
6194 | return __e1000_resume(pdev); | 6194 | return __e1000_resume(pdev); |
6195 | } | 6195 | } |
6196 | #endif /* CONFIG_PM_SLEEP */ | 6196 | #endif /* CONFIG_PM */ |
6197 | 6197 | ||
6198 | #ifdef CONFIG_PM_RUNTIME | 6198 | #ifdef CONFIG_PM_RUNTIME |
6199 | static int e1000_runtime_suspend(struct device *dev) | 6199 | static int e1000_runtime_suspend(struct device *dev) |
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index da2be59505c0..20e71f4ca426 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations, | |||
1757 | * it across the board. | 1757 | * it across the board. |
1758 | */ | 1758 | */ |
1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
1760 | if (ret_val) | 1760 | if (ret_val) { |
1761 | /* If the first read fails, another entity may have | 1761 | /* If the first read fails, another entity may have |
1762 | * ownership of the resources, wait and try again to | 1762 | * ownership of the resources, wait and try again to |
1763 | * see if they have relinquished the resources yet. | 1763 | * see if they have relinquished the resources yet. |
1764 | */ | 1764 | */ |
1765 | udelay(usec_interval); | 1765 | if (usec_interval >= 1000) |
1766 | msleep(usec_interval / 1000); | ||
1767 | else | ||
1768 | udelay(usec_interval); | ||
1769 | } | ||
1766 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1770 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
1767 | if (ret_val) | 1771 | if (ret_val) |
1768 | break; | 1772 | break; |
1769 | if (phy_status & BMSR_LSTATUS) | 1773 | if (phy_status & BMSR_LSTATUS) |
1770 | break; | 1774 | break; |
1771 | if (usec_interval >= 1000) | 1775 | if (usec_interval >= 1000) |
1772 | mdelay(usec_interval / 1000); | 1776 | msleep(usec_interval / 1000); |
1773 | else | 1777 | else |
1774 | udelay(usec_interval); | 1778 | udelay(usec_interval); |
1775 | } | 1779 | } |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index d6f0c0d8cf11..72084f70adbb 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | |||
@@ -291,7 +291,9 @@ static int ixgbe_pci_sriov_disable(struct pci_dev *dev) | |||
291 | { | 291 | { |
292 | struct ixgbe_adapter *adapter = pci_get_drvdata(dev); | 292 | struct ixgbe_adapter *adapter = pci_get_drvdata(dev); |
293 | int err; | 293 | int err; |
294 | #ifdef CONFIG_PCI_IOV | ||
294 | u32 current_flags = adapter->flags; | 295 | u32 current_flags = adapter->flags; |
296 | #endif | ||
295 | 297 | ||
296 | err = ixgbe_disable_sriov(adapter); | 298 | err = ixgbe_disable_sriov(adapter); |
297 | 299 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 939428ad25ac..8e3e66ac0a52 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -24,6 +24,11 @@ extern int rtnl_trylock(void); | |||
24 | extern int rtnl_is_locked(void); | 24 | extern int rtnl_is_locked(void); |
25 | #ifdef CONFIG_PROVE_LOCKING | 25 | #ifdef CONFIG_PROVE_LOCKING |
26 | extern int lockdep_rtnl_is_held(void); | 26 | extern int lockdep_rtnl_is_held(void); |
27 | #else | ||
28 | static inline int lockdep_rtnl_is_held(void) | ||
29 | { | ||
30 | return 1; | ||
31 | } | ||
27 | #endif /* #ifdef CONFIG_PROVE_LOCKING */ | 32 | #endif /* #ifdef CONFIG_PROVE_LOCKING */ |
28 | 33 | ||
29 | /** | 34 | /** |
diff --git a/net/core/dev.c b/net/core/dev.c index ba3b7ea5ebb3..4fc17221545d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4500,7 +4500,7 @@ struct net_device *netdev_all_upper_get_next_dev_rcu(struct net_device *dev, | |||
4500 | { | 4500 | { |
4501 | struct netdev_adjacent *upper; | 4501 | struct netdev_adjacent *upper; |
4502 | 4502 | ||
4503 | WARN_ON_ONCE(!rcu_read_lock_held()); | 4503 | WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held()); |
4504 | 4504 | ||
4505 | upper = list_entry_rcu((*iter)->next, struct netdev_adjacent, list); | 4505 | upper = list_entry_rcu((*iter)->next, struct netdev_adjacent, list); |
4506 | 4506 | ||