aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
authorAuke Kok <auke-jan.h.kok@intel.com>2006-04-14 22:04:59 -0400
committerAuke Kok <auke-jan.h.kok@intel.com>2006-04-14 22:04:59 -0400
commitfe7fe28ea581e090d2908a0d78a2611ae6d43e2c (patch)
tree20ffef790a0ca0f0e8463df68d0628bffdccefe9 /drivers/net/e1000
parente619d52349ab8c0044859c28ab05e4c7a410fe14 (diff)
e1000: Made an adapter struct variable into a local (txb2b)
Made an adapter struct variable into a local (txb2b) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000.h1
-rw-r--r--drivers/net/e1000/e1000_main.c10
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 281de41d030a..764808f3702e 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -334,7 +334,6 @@ struct e1000_adapter {
334 boolean_t have_msi; 334 boolean_t have_msi;
335#endif 335#endif
336 /* to not mess up cache alignment, always add to the bottom */ 336 /* to not mess up cache alignment, always add to the bottom */
337 boolean_t txb2b;
338#ifdef NETIF_F_TSO 337#ifdef NETIF_F_TSO
339 boolean_t tso_force; 338 boolean_t tso_force;
340#endif 339#endif
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 5e7b4ee42ed9..2cc9955ba179 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -2247,6 +2247,7 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
2247 2247
2248 if (link) { 2248 if (link) {
2249 if (!netif_carrier_ok(netdev)) { 2249 if (!netif_carrier_ok(netdev)) {
2250 boolean_t txb2b = 1;
2250 e1000_get_speed_and_duplex(&adapter->hw, 2251 e1000_get_speed_and_duplex(&adapter->hw,
2251 &adapter->link_speed, 2252 &adapter->link_speed,
2252 &adapter->link_duplex); 2253 &adapter->link_duplex);
@@ -2260,23 +2261,22 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
2260 * and adjust the timeout factor */ 2261 * and adjust the timeout factor */
2261 netdev->tx_queue_len = adapter->tx_queue_len; 2262 netdev->tx_queue_len = adapter->tx_queue_len;
2262 adapter->tx_timeout_factor = 1; 2263 adapter->tx_timeout_factor = 1;
2263 adapter->txb2b = 1;
2264 switch (adapter->link_speed) { 2264 switch (adapter->link_speed) {
2265 case SPEED_10: 2265 case SPEED_10:
2266 adapter->txb2b = 0; 2266 txb2b = 0;
2267 netdev->tx_queue_len = 10; 2267 netdev->tx_queue_len = 10;
2268 adapter->tx_timeout_factor = 8; 2268 adapter->tx_timeout_factor = 8;
2269 break; 2269 break;
2270 case SPEED_100: 2270 case SPEED_100:
2271 adapter->txb2b = 0; 2271 txb2b = 0;
2272 netdev->tx_queue_len = 100; 2272 netdev->tx_queue_len = 100;
2273 /* maybe add some timeout factor ? */ 2273 /* maybe add some timeout factor ? */
2274 break; 2274 break;
2275 } 2275 }
2276 2276
2277 if ((adapter->hw.mac_type == e1000_82571 || 2277 if ((adapter->hw.mac_type == e1000_82571 ||
2278 adapter->hw.mac_type == e1000_82572) && 2278 adapter->hw.mac_type == e1000_82572) &&
2279 adapter->txb2b == 0) { 2279 txb2b == 0) {
2280#define SPEED_MODE_BIT (1 << 21) 2280#define SPEED_MODE_BIT (1 << 21)
2281 uint32_t tarc0; 2281 uint32_t tarc0;
2282 tarc0 = E1000_READ_REG(&adapter->hw, TARC0); 2282 tarc0 = E1000_READ_REG(&adapter->hw, TARC0);