[RESEND][PATCH net-drivers-2.6 5/11] ixgb: Reset status in the Rx descriptor prior to handing it to the controller (fwd)
From: Malli Chilakala <hidden>
Date: 2005-04-27 17:49:12
Reset status in the Rx descriptor prior to handing it to the controller. Leave three Rx descriptors unused Signed-off-by: Mallikarjuna R Chilakala <redacted> Signed-off-by: Ganesh Venkatesan <redacted> Signed-off-by: John Ronciak <redacted> diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c
--- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2005-04-0523:06:36.332229456 -0700
+++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2005-04-0523:06:38.283932752 -0700
@@ -1977,8 +1977,8 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte num_group_tail_writes = IXGB_RX_BUFFER_WRITE; - /* leave one descriptor unused */ - while(--cleancount > 0) { + /* leave three descriptors unused */ + while(--cleancount > 2) { rx_desc = IXGB_RX_DESC(*rx_ring, i); skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN);
@@ -2005,6 +1933,10 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte PCI_DMA_FROMDEVICE); rx_desc->buff_addr = cpu_to_le64(buffer_info->dma); + /* guarantee DD bit not set now before h/w gets descriptor + * this is the rest of the workaround for h/w double + * writeback. */ + rx_desc->status = 0; if((i & ~(num_group_tail_writes- 1)) == i) { /* Force memory writes to complete before letting h/w