Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18860
b: refs/heads/master
c: 86c3d59
h: refs/heads/master
v: v3
  • Loading branch information
Jesse Brandeburg authored and Jeff Garzik committed Jan 18, 2006
1 parent 7f84c4e commit ef9a31b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73629bbc84a7d4026ad08edbfefc642eec60f246
refs/heads/master: 86c3d59ff54c31f07d0f0483dd3f668107c8cf85
37 changes: 26 additions & 11 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@
* sessions are active and log a message
* 6.2.2 7/21/05
* o used fixed size descriptors for all MTU sizes, reduces memory load
* 6.2.1 7/21/05
* o Performance tweaks, including copybreak and prefetch
* 6.1.2 4/13/05
* o Fixed ethtool diagnostics
* o Enabled flow control to take default eeprom settings
Expand Down Expand Up @@ -3615,8 +3613,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
{
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;
struct e1000_rx_desc *rx_desc;
struct e1000_buffer *buffer_info;
struct e1000_rx_desc *rx_desc, *next_rxd;
struct e1000_buffer *buffer_info, *next_buffer;
unsigned long flags;
uint32_t length;
uint8_t last_byte;
Expand All @@ -3629,7 +3627,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
buffer_info = &rx_ring->buffer_info[i];

while (rx_desc->status & E1000_RXD_STAT_DD) {
struct sk_buff *skb;
struct sk_buff *skb, *next_skb;
u8 status;
#ifdef CONFIG_E1000_NAPI
if (*work_done >= work_to_do)
Expand All @@ -3638,6 +3636,13 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
#endif
status = rx_desc->status;
skb = buffer_info->skb;
buffer_info->skb = NULL;

if (++i == rx_ring->count) i = 0;
next_rxd = E1000_RX_DESC(*rx_ring, i);
next_buffer = &rx_ring->buffer_info[i];
next_skb = next_buffer->skb;

cleaned = TRUE;
cleaned_count++;
pci_unmap_single(pdev,
Expand Down Expand Up @@ -3769,6 +3774,8 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
cleaned_count = 0;
}

rx_desc = next_rxd;
buffer_info = next_buffer;
}
rx_ring->next_to_clean = i;

Expand All @@ -3794,13 +3801,13 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
struct e1000_rx_ring *rx_ring)
#endif
{
union e1000_rx_desc_packet_split *rx_desc;
union e1000_rx_desc_packet_split *rx_desc, *next_rxd;
struct net_device *netdev = adapter->netdev;
struct pci_dev *pdev = adapter->pdev;
struct e1000_buffer *buffer_info;
struct e1000_buffer *buffer_info, *next_buffer;
struct e1000_ps_page *ps_page;
struct e1000_ps_page_dma *ps_page_dma;
struct sk_buff *skb;
struct sk_buff *skb, *next_skb;
unsigned int i, j;
uint32_t length, staterr;
int cleaned_count = 0;
Expand All @@ -3809,24 +3816,29 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
i = rx_ring->next_to_clean;
rx_desc = E1000_RX_DESC_PS(*rx_ring, i);
staterr = le32_to_cpu(rx_desc->wb.middle.status_error);
buffer_info = &rx_ring->buffer_info[i];

while (staterr & E1000_RXD_STAT_DD) {
buffer_info = &rx_ring->buffer_info[i];
ps_page = &rx_ring->ps_page[i];
ps_page_dma = &rx_ring->ps_page_dma[i];
#ifdef CONFIG_E1000_NAPI
if (unlikely(*work_done >= work_to_do))
break;
(*work_done)++;
#endif
skb = buffer_info->skb;

if (++i == rx_ring->count) i = 0;
next_rxd = E1000_RX_DESC_PS(*rx_ring, i);
next_buffer = &rx_ring->buffer_info[i];
next_skb = next_buffer->skb;

cleaned = TRUE;
cleaned_count++;
pci_unmap_single(pdev, buffer_info->dma,
buffer_info->length,
PCI_DMA_FROMDEVICE);

skb = buffer_info->skb;

if (unlikely(!(staterr & E1000_RXD_STAT_EOP))) {
E1000_DBG("%s: Packet Split buffers didn't pick up"
" the full packet\n", netdev->name);
Expand Down Expand Up @@ -3908,6 +3920,9 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter,
cleaned_count = 0;
}

rx_desc = next_rxd;
buffer_info = next_buffer;

staterr = le32_to_cpu(rx_desc->wb.middle.status_error);
}
rx_ring->next_to_clean = i;
Expand Down

0 comments on commit ef9a31b

Please sign in to comment.