diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-15 01:59:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-15 01:59:34 -0400 |
commit | 6b08f516244abda22c07b5e7db10ef109dc43f2d (patch) | |
tree | 098fbb9b45213feeb5e093a9a690ef76e624469a /drivers | |
parent | 0b5c25e8ac3a60bd01a52ca7405ba96aec8c16be (diff) | |
parent | 28c8e4790ca5ef75f54895ca46437f9fbb433ddf (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ixgbe/ixgbe_ethtool.c
With merge conflict help from Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 17 | ||||
-rw-r--r-- | drivers/net/enic/vnic_dev.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 35 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 4 |
4 files changed, 20 insertions, 38 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index ebdea0891665..68a80893dce1 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -1047,15 +1047,14 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
1047 | goto err_register; | 1047 | goto err_register; |
1048 | 1048 | ||
1049 | /* print bus type/speed/width info */ | 1049 | /* print bus type/speed/width info */ |
1050 | e_info("(PCI%s:%s:%s) ", | 1050 | e_info("(PCI%s:%dMHz:%d-bit) %pM\n", |
1051 | ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""), | 1051 | ((hw->bus_type == e1000_bus_type_pcix) ? "-X" : ""), |
1052 | ((hw->bus_speed == e1000_bus_speed_133) ? "133MHz" : | 1052 | ((hw->bus_speed == e1000_bus_speed_133) ? 133 : |
1053 | (hw->bus_speed == e1000_bus_speed_120) ? "120MHz" : | 1053 | (hw->bus_speed == e1000_bus_speed_120) ? 120 : |
1054 | (hw->bus_speed == e1000_bus_speed_100) ? "100MHz" : | 1054 | (hw->bus_speed == e1000_bus_speed_100) ? 100 : |
1055 | (hw->bus_speed == e1000_bus_speed_66) ? "66MHz" : "33MHz"), | 1055 | (hw->bus_speed == e1000_bus_speed_66) ? 66 : 33), |
1056 | ((hw->bus_width == e1000_bus_width_64) ? "64-bit" : "32-bit")); | 1056 | ((hw->bus_width == e1000_bus_width_64) ? 64 : 32), |
1057 | 1057 | netdev->dev_addr); | |
1058 | e_info("%pM\n", netdev->dev_addr); | ||
1059 | 1058 | ||
1060 | /* carrier off reporting is important to ethtool even BEFORE open */ | 1059 | /* carrier off reporting is important to ethtool even BEFORE open */ |
1061 | netif_carrier_off(netdev); | 1060 | netif_carrier_off(netdev); |
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index 2b3e16db5c82..e0d33281ec98 100644 --- a/drivers/net/enic/vnic_dev.c +++ b/drivers/net/enic/vnic_dev.c | |||
@@ -709,7 +709,7 @@ int vnic_dev_init_prov(struct vnic_dev *vdev, u8 *buf, u32 len) | |||
709 | { | 709 | { |
710 | u64 a0, a1 = len; | 710 | u64 a0, a1 = len; |
711 | int wait = 1000; | 711 | int wait = 1000; |
712 | u64 prov_pa; | 712 | dma_addr_t prov_pa; |
713 | void *prov_buf; | 713 | void *prov_buf; |
714 | int ret; | 714 | int ret; |
715 | 715 | ||
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 644e3d21b751..873b45efca40 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -2075,25 +2075,6 @@ static int ixgbe_get_coalesce(struct net_device *netdev, | |||
2075 | return 0; | 2075 | return 0; |
2076 | } | 2076 | } |
2077 | 2077 | ||
2078 | /* | ||
2079 | * this function must be called before setting the new value of | ||
2080 | * rx_itr_setting | ||
2081 | */ | ||
2082 | static bool ixgbe_reenable_rsc(struct ixgbe_adapter *adapter, | ||
2083 | struct ethtool_coalesce *ec) | ||
2084 | { | ||
2085 | /* check the old value and enable RSC if necessary */ | ||
2086 | if ((adapter->rx_itr_setting == 0) && | ||
2087 | (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) { | ||
2088 | adapter->flags2 |= IXGBE_FLAG2_RSC_ENABLED; | ||
2089 | adapter->netdev->features |= NETIF_F_LRO; | ||
2090 | e_info("rx-usecs set to %d, re-enabling RSC\n", | ||
2091 | ec->rx_coalesce_usecs); | ||
2092 | return true; | ||
2093 | } | ||
2094 | return false; | ||
2095 | } | ||
2096 | |||
2097 | static int ixgbe_set_coalesce(struct net_device *netdev, | 2078 | static int ixgbe_set_coalesce(struct net_device *netdev, |
2098 | struct ethtool_coalesce *ec) | 2079 | struct ethtool_coalesce *ec) |
2099 | { | 2080 | { |
@@ -2122,9 +2103,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
2122 | (1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE)) | 2103 | (1000000/ec->rx_coalesce_usecs < IXGBE_MIN_INT_RATE)) |
2123 | return -EINVAL; | 2104 | return -EINVAL; |
2124 | 2105 | ||
2125 | /* check the old value and enable RSC if necessary */ | ||
2126 | need_reset = ixgbe_reenable_rsc(adapter, ec); | ||
2127 | |||
2128 | /* store the value in ints/second */ | 2106 | /* store the value in ints/second */ |
2129 | adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs; | 2107 | adapter->rx_eitr_param = 1000000/ec->rx_coalesce_usecs; |
2130 | 2108 | ||
@@ -2133,9 +2111,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
2133 | /* clear the lower bit as its used for dynamic state */ | 2111 | /* clear the lower bit as its used for dynamic state */ |
2134 | adapter->rx_itr_setting &= ~1; | 2112 | adapter->rx_itr_setting &= ~1; |
2135 | } else if (ec->rx_coalesce_usecs == 1) { | 2113 | } else if (ec->rx_coalesce_usecs == 1) { |
2136 | /* check the old value and enable RSC if necessary */ | ||
2137 | need_reset = ixgbe_reenable_rsc(adapter, ec); | ||
2138 | |||
2139 | /* 1 means dynamic mode */ | 2114 | /* 1 means dynamic mode */ |
2140 | adapter->rx_eitr_param = 20000; | 2115 | adapter->rx_eitr_param = 20000; |
2141 | adapter->rx_itr_setting = 1; | 2116 | adapter->rx_itr_setting = 1; |
@@ -2155,9 +2130,10 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
2155 | */ | 2130 | */ |
2156 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { | 2131 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
2157 | adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; | 2132 | adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; |
2158 | netdev->features &= ~NETIF_F_LRO; | 2133 | if (netdev->features & NETIF_F_LRO) { |
2159 | e_info("rx-usecs set to 0, disabling RSC\n"); | 2134 | netdev->features &= ~NETIF_F_LRO; |
2160 | 2135 | e_info("rx-usecs set to 0, disabling RSC\n"); | |
2136 | } | ||
2161 | need_reset = true; | 2137 | need_reset = true; |
2162 | } | 2138 | } |
2163 | } | 2139 | } |
@@ -2252,6 +2228,9 @@ static int ixgbe_set_flags(struct net_device *netdev, u32 data) | |||
2252 | } | 2228 | } |
2253 | } else if (!adapter->rx_itr_setting) { | 2229 | } else if (!adapter->rx_itr_setting) { |
2254 | netdev->features &= ~ETH_FLAG_LRO; | 2230 | netdev->features &= ~ETH_FLAG_LRO; |
2231 | if (data & ETH_FLAG_LRO) | ||
2232 | e_info("rx-usecs set to 0, " | ||
2233 | "LRO/RSC cannot be enabled.\n"); | ||
2255 | } | 2234 | } |
2256 | } | 2235 | } |
2257 | 2236 | ||
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 6b483d352f23..9cca737e4885 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -5269,6 +5269,10 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter) | |||
5269 | u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; | 5269 | u32 i, missed_rx = 0, mpc, bprc, lxon, lxoff, xon_off_tot; |
5270 | u64 non_eop_descs = 0, restart_queue = 0; | 5270 | u64 non_eop_descs = 0, restart_queue = 0; |
5271 | 5271 | ||
5272 | if (test_bit(__IXGBE_DOWN, &adapter->state) || | ||
5273 | test_bit(__IXGBE_RESETTING, &adapter->state)) | ||
5274 | return; | ||
5275 | |||
5272 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { | 5276 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { |
5273 | u64 rsc_count = 0; | 5277 | u64 rsc_count = 0; |
5274 | u64 rsc_flush = 0; | 5278 | u64 rsc_flush = 0; |