diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2006-01-12 19:50:25 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 07:40:10 -0500 |
commit | 545c67c0a3550545fe50d28c874b0664bc5dc882 (patch) | |
tree | e0ffa97a1137bccbdd0574434bf481cb6e52a56d /drivers/net/e1000/e1000_main.c | |
parent | 9a3056da0d7fde1e19e806824c41857b239954ed (diff) |
[PATCH] e1000: General Fixes
These fixes update the TX and RX ring structures. Prepare driver for up-coming fixes.
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4945a41e3aea..22c8286a4849 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2204,7 +2204,7 @@ static void | |||
2204 | e1000_watchdog_task(struct e1000_adapter *adapter) | 2204 | e1000_watchdog_task(struct e1000_adapter *adapter) |
2205 | { | 2205 | { |
2206 | struct net_device *netdev = adapter->netdev; | 2206 | struct net_device *netdev = adapter->netdev; |
2207 | struct e1000_tx_ring *txdr = &adapter->tx_ring[0]; | 2207 | struct e1000_tx_ring *txdr = adapter->tx_ring; |
2208 | uint32_t link; | 2208 | uint32_t link; |
2209 | 2209 | ||
2210 | e1000_check_for_link(&adapter->hw); | 2210 | e1000_check_for_link(&adapter->hw); |
@@ -2314,6 +2314,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2314 | { | 2314 | { |
2315 | #ifdef NETIF_F_TSO | 2315 | #ifdef NETIF_F_TSO |
2316 | struct e1000_context_desc *context_desc; | 2316 | struct e1000_context_desc *context_desc; |
2317 | struct e1000_buffer *buffer_info; | ||
2317 | unsigned int i; | 2318 | unsigned int i; |
2318 | uint32_t cmd_length = 0; | 2319 | uint32_t cmd_length = 0; |
2319 | uint16_t ipcse = 0, tucse, mss; | 2320 | uint16_t ipcse = 0, tucse, mss; |
@@ -2363,6 +2364,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2363 | 2364 | ||
2364 | i = tx_ring->next_to_use; | 2365 | i = tx_ring->next_to_use; |
2365 | context_desc = E1000_CONTEXT_DESC(*tx_ring, i); | 2366 | context_desc = E1000_CONTEXT_DESC(*tx_ring, i); |
2367 | buffer_info = &tx_ring->buffer_info[i]; | ||
2366 | 2368 | ||
2367 | context_desc->lower_setup.ip_fields.ipcss = ipcss; | 2369 | context_desc->lower_setup.ip_fields.ipcss = ipcss; |
2368 | context_desc->lower_setup.ip_fields.ipcso = ipcso; | 2370 | context_desc->lower_setup.ip_fields.ipcso = ipcso; |
@@ -2374,6 +2376,8 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2374 | context_desc->tcp_seg_setup.fields.hdr_len = hdr_len; | 2376 | context_desc->tcp_seg_setup.fields.hdr_len = hdr_len; |
2375 | context_desc->cmd_and_length = cpu_to_le32(cmd_length); | 2377 | context_desc->cmd_and_length = cpu_to_le32(cmd_length); |
2376 | 2378 | ||
2379 | buffer_info->time_stamp = jiffies; | ||
2380 | |||
2377 | if (++i == tx_ring->count) i = 0; | 2381 | if (++i == tx_ring->count) i = 0; |
2378 | tx_ring->next_to_use = i; | 2382 | tx_ring->next_to_use = i; |
2379 | 2383 | ||
@@ -2389,6 +2393,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2389 | struct sk_buff *skb) | 2393 | struct sk_buff *skb) |
2390 | { | 2394 | { |
2391 | struct e1000_context_desc *context_desc; | 2395 | struct e1000_context_desc *context_desc; |
2396 | struct e1000_buffer *buffer_info; | ||
2392 | unsigned int i; | 2397 | unsigned int i; |
2393 | uint8_t css; | 2398 | uint8_t css; |
2394 | 2399 | ||
@@ -2396,6 +2401,7 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2396 | css = skb->h.raw - skb->data; | 2401 | css = skb->h.raw - skb->data; |
2397 | 2402 | ||
2398 | i = tx_ring->next_to_use; | 2403 | i = tx_ring->next_to_use; |
2404 | buffer_info = &tx_ring->buffer_info[i]; | ||
2399 | context_desc = E1000_CONTEXT_DESC(*tx_ring, i); | 2405 | context_desc = E1000_CONTEXT_DESC(*tx_ring, i); |
2400 | 2406 | ||
2401 | context_desc->upper_setup.tcp_fields.tucss = css; | 2407 | context_desc->upper_setup.tcp_fields.tucss = css; |
@@ -2404,6 +2410,8 @@ e1000_tx_csum(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2404 | context_desc->tcp_seg_setup.data = 0; | 2410 | context_desc->tcp_seg_setup.data = 0; |
2405 | context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT); | 2411 | context_desc->cmd_and_length = cpu_to_le32(E1000_TXD_CMD_DEXT); |
2406 | 2412 | ||
2413 | buffer_info->time_stamp = jiffies; | ||
2414 | |||
2407 | if (unlikely(++i == tx_ring->count)) i = 0; | 2415 | if (unlikely(++i == tx_ring->count)) i = 0; |
2408 | tx_ring->next_to_use = i; | 2416 | tx_ring->next_to_use = i; |
2409 | 2417 | ||
@@ -3255,8 +3263,6 @@ e1000_clean_tx_irq(struct e1000_adapter *adapter, | |||
3255 | if(unlikely(++i == tx_ring->count)) i = 0; | 3263 | if(unlikely(++i == tx_ring->count)) i = 0; |
3256 | } | 3264 | } |
3257 | 3265 | ||
3258 | tx_ring->pkt++; | ||
3259 | |||
3260 | eop = tx_ring->buffer_info[i].next_to_watch; | 3266 | eop = tx_ring->buffer_info[i].next_to_watch; |
3261 | eop_desc = E1000_TX_DESC(*tx_ring, eop); | 3267 | eop_desc = E1000_TX_DESC(*tx_ring, eop); |
3262 | } | 3268 | } |
@@ -3461,7 +3467,6 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3461 | } | 3467 | } |
3462 | #endif /* CONFIG_E1000_NAPI */ | 3468 | #endif /* CONFIG_E1000_NAPI */ |
3463 | netdev->last_rx = jiffies; | 3469 | netdev->last_rx = jiffies; |
3464 | rx_ring->pkt++; | ||
3465 | 3470 | ||
3466 | next_desc: | 3471 | next_desc: |
3467 | rx_desc->status = 0; | 3472 | rx_desc->status = 0; |
@@ -3592,7 +3597,6 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3592 | } | 3597 | } |
3593 | #endif /* CONFIG_E1000_NAPI */ | 3598 | #endif /* CONFIG_E1000_NAPI */ |
3594 | netdev->last_rx = jiffies; | 3599 | netdev->last_rx = jiffies; |
3595 | rx_ring->pkt++; | ||
3596 | 3600 | ||
3597 | next_desc: | 3601 | next_desc: |
3598 | rx_desc->wb.middle.status_error &= ~0xFF; | 3602 | rx_desc->wb.middle.status_error &= ~0xFF; |