diff options
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index ec7b77fea98b..fe50242aa9e6 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -1806,9 +1806,8 @@ void e1000e_set_interrupt_capability(struct e1000_adapter *adapter) | |||
1806 | err = pci_enable_msix(adapter->pdev, | 1806 | err = pci_enable_msix(adapter->pdev, |
1807 | adapter->msix_entries, | 1807 | adapter->msix_entries, |
1808 | adapter->num_vectors); | 1808 | adapter->num_vectors); |
1809 | if (err == 0) { | 1809 | if (err == 0) |
1810 | return; | 1810 | return; |
1811 | } | ||
1812 | } | 1811 | } |
1813 | /* MSI-X failed, so fall through and try MSI */ | 1812 | /* MSI-X failed, so fall through and try MSI */ |
1814 | e_err("Failed to initialize MSI-X interrupts. " | 1813 | e_err("Failed to initialize MSI-X interrupts. " |
@@ -2198,9 +2197,8 @@ void e1000e_free_rx_resources(struct e1000_adapter *adapter) | |||
2198 | 2197 | ||
2199 | e1000_clean_rx_ring(adapter); | 2198 | e1000_clean_rx_ring(adapter); |
2200 | 2199 | ||
2201 | for (i = 0; i < rx_ring->count; i++) { | 2200 | for (i = 0; i < rx_ring->count; i++) |
2202 | kfree(rx_ring->buffer_info[i].ps_pages); | 2201 | kfree(rx_ring->buffer_info[i].ps_pages); |
2203 | } | ||
2204 | 2202 | ||
2205 | vfree(rx_ring->buffer_info); | 2203 | vfree(rx_ring->buffer_info); |
2206 | rx_ring->buffer_info = NULL; | 2204 | rx_ring->buffer_info = NULL; |
@@ -2240,20 +2238,18 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter, | |||
2240 | /* handle TSO and jumbo frames */ | 2238 | /* handle TSO and jumbo frames */ |
2241 | if (bytes/packets > 8000) | 2239 | if (bytes/packets > 8000) |
2242 | retval = bulk_latency; | 2240 | retval = bulk_latency; |
2243 | else if ((packets < 5) && (bytes > 512)) { | 2241 | else if ((packets < 5) && (bytes > 512)) |
2244 | retval = low_latency; | 2242 | retval = low_latency; |
2245 | } | ||
2246 | break; | 2243 | break; |
2247 | case low_latency: /* 50 usec aka 20000 ints/s */ | 2244 | case low_latency: /* 50 usec aka 20000 ints/s */ |
2248 | if (bytes > 10000) { | 2245 | if (bytes > 10000) { |
2249 | /* this if handles the TSO accounting */ | 2246 | /* this if handles the TSO accounting */ |
2250 | if (bytes/packets > 8000) { | 2247 | if (bytes/packets > 8000) |
2251 | retval = bulk_latency; | 2248 | retval = bulk_latency; |
2252 | } else if ((packets < 10) || ((bytes/packets) > 1200)) { | 2249 | else if ((packets < 10) || ((bytes/packets) > 1200)) |
2253 | retval = bulk_latency; | 2250 | retval = bulk_latency; |
2254 | } else if ((packets > 35)) { | 2251 | else if ((packets > 35)) |
2255 | retval = lowest_latency; | 2252 | retval = lowest_latency; |
2256 | } | ||
2257 | } else if (bytes/packets > 2000) { | 2253 | } else if (bytes/packets > 2000) { |
2258 | retval = bulk_latency; | 2254 | retval = bulk_latency; |
2259 | } else if (packets <= 2 && bytes < 512) { | 2255 | } else if (packets <= 2 && bytes < 512) { |
@@ -2262,9 +2258,8 @@ static unsigned int e1000_update_itr(struct e1000_adapter *adapter, | |||
2262 | break; | 2258 | break; |
2263 | case bulk_latency: /* 250 usec aka 4000 ints/s */ | 2259 | case bulk_latency: /* 250 usec aka 4000 ints/s */ |
2264 | if (bytes > 25000) { | 2260 | if (bytes > 25000) { |
2265 | if (packets > 35) { | 2261 | if (packets > 35) |
2266 | retval = low_latency; | 2262 | retval = low_latency; |
2267 | } | ||
2268 | } else if (bytes < 6000) { | 2263 | } else if (bytes < 6000) { |
2269 | retval = low_latency; | 2264 | retval = low_latency; |
2270 | } | 2265 | } |