igb: update name to reflect new hardware
Subsystems (2)
PATCH 1/3 igb: update name to reflect new hardware
From: Alexander Duyck <[email protected]>
This patch adds the 82576 device to the description for igb in Kconfig.
---
drivers/net/Kconfig | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/Kconfig +2 -2
@@ -1982,10 +1982,10 @@ config IP1000 will be called ipg. This is recommended. config IGB - tristate "Intel(R) 82575 PCI-Express Gigabit Ethernet support" + tristate "Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support" depends on PCI ---help--- - This driver supports Intel(R) 82575 gigabit ethernet family of + This driver supports Intel(R) 82575/82576 gigabit ethernet family of adapters. For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at:
PATCH 2/3 igb: simplify swap in clean_rx_irq if using packet split
From: Alexander Duyck <[email protected]>
This update replaces the xchg calls that were added with a pair of assignments as there is no need for the xchg calls and they were found to cause issues on some architectures.
---
drivers/net/igb/igb_main.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/igb/igb_main.c +4 -2
@@ -3921,8 +3921,10 @@ send_up: next_buffer = &rx_ring->buffer_info[i];if (!(staterr &E1000_RXD_STAT_EOP )) { - buffer_info->skb =xchg (&next_buffer->skb, skb); - buffer_info->dma =xchg (&next_buffer->dma,0 ); + buffer_info->skb = next_buffer->skb; + buffer_info->dma = next_buffer->dma; + next_buffer->skb = skb; + next_buffer->dma =0 ; goto next_desc; }
Re: [NET-NEXT PATCH 2/3] igb: simplify swap in clean_rx_irq if using packet split
From: Jeff Kirsher <[email protected]>
Date: Mon, 17 Nov 2008 18:05:31 -0800
Quoted 8 lines
From: Alexander Duyck <[email protected]>
This update replaces the xchg calls that were added with a pair of assignments as there is no need for the xchg calls and they were found to cause issues on some architectures.
Signed-off-by Alexander Duyck <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
PATCH 3/3 igb: Fix tx/rx_ring_count parameters for igb on suspend/resume/ring resize
In reply to Jeff KirsherFrom: Alexander Duyck <[email protected]>
When suspending the device the ring structure is freed which causes it to loose track of the count. To resolve this we need to move the ring count outside of the ring structure and store it in the adapter struct.
In addition to resolving the suspend/resume issue this patch also addresses issues seen in the event of memory allocation errors causing uneven ring sizes on multiple queues.
---
drivers/net/igb/igb.h | 4 ++ drivers/net/igb/igb_ethtool.c | 102 ++++++++++++++++++++--------------------- drivers/net/igb/igb_main.c | 10 ++-- 3 files changed, 59 insertions(+), 57 deletions(-)
drivers/net/igb/igb.h +4 -0
@@ -294,6 +294,8 @@ struct igb_adapter {unsigned int lro_flushed;unsigned int lro_no_desc;#endif +unsigned int tx_ring_count; +unsigned int rx_ring_count; };#define IGB_FLAG_HAS_MSI (1 << 0)
@@ -325,6 +327,8 @@ extern void igb_reset(struct igb_adapter *);extern int igb_set_spd_dplx (struct igb_adapter *,u16 );extern int igb_setup_tx_resources (struct igb_adapter *,struct igb_ring *);extern int igb_setup_rx_resources (struct igb_adapter *,struct igb_ring *); +extern void igb_free_tx_resources (struct igb_ring *); +extern void igb_free_rx_resources (struct igb_ring *);extern void igb_update_stats (struct igb_adapter *);extern void igb_set_ethtool_ops (struct net_device *);
drivers/net/igb/igb_ethtool.c +49 -53
156 lines not on this page · raw message
drivers/net/igb/igb_main.c +6 -4
@@ -76,8 +76,6 @@ static int igb_setup_all_tx_resources(struct igb_adapter *);static int igb_setup_all_rx_resources (struct igb_adapter *);static void igb_free_all_tx_resources (struct igb_adapter *);static void igb_free_all_rx_resources (struct igb_adapter *); -static void igb_free_tx_resources (struct igb_ring *); -static void igb_free_rx_resources (struct igb_ring *);void igb_update_stats (struct igb_adapter *);static int igb_probe (struct pci_dev *,const struct pci_device_id *); static void __devexit igb_remove(struct pci_dev *pdev);
@@ -259,11 +257,13 @@ static int igb_alloc_queues(struct igb_adapter *adapter)for (i =0 ; i < adapter->num_tx_queues; i++) {struct igb_ring *ring = &(adapter->tx_ring[i]); + ring->count = adapter->tx_ring_count; ring->adapter = adapter; ring->queue_index = i; }for (i =0 ; i < adapter->num_rx_queues; i++) {struct igb_ring *ring = &(adapter->rx_ring[i]); + ring->count = adapter->rx_ring_count; ring->adapter = adapter; ring->queue_index = i; ring->itr_register =E1000_ITR ;
@@ -1395,6 +1395,8 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)pci_read_config_word (pdev,PCI_COMMAND , &hw->bus.pci_cmd_word); + adapter->tx_ring_count =IGB_DEFAULT_TXD ; + adapter->rx_ring_count =IGB_DEFAULT_RXD ; adapter->rx_buffer_len =MAXIMUM_ETHERNET_VLAN_SIZE ; adapter->rx_ps_hdr_size =0 ;/* disable packet split */ adapter->max_frame_size = netdev->mtu +ETH_HLEN +ETH_FCS_LEN ;
@@ -1983,7 +1985,7 @@ static void igb_configure_rx(struct igb_adapter *adapter)* * Free all transmit software resources **/ -static void igb_free_tx_resources (struct igb_ring *tx_ring) +void igb_free_tx_resources (struct igb_ring *tx_ring) {struct pci_dev *pdev = tx_ring->adapter->pdev;
@@ -2083,7 +2085,7 @@ static void igb_clean_all_tx_rings(struct igb_adapter *adapter)* * Free all receive software resources **/ -static void igb_free_rx_resources (struct igb_ring *rx_ring) +void igb_free_rx_resources (struct igb_ring *rx_ring) {struct pci_dev *pdev = rx_ring->adapter->pdev;
Re: [NET-NEXT PATCH 3/3] igb: Fix tx/rx_ring_count parameters for igb on suspend/resume/ring resize
From: Jeff Kirsher <[email protected]>
Date: Mon, 17 Nov 2008 18:05:50 -0800
Quoted 6 lines
From: Alexander Duyck <[email protected]>
When suspending the device the ring structure is freed which causes it to loose track of the count. To resolve this we need to move the ring count outside of the ring structure and store it in the adapter struct.
Quoted 6 lines
In addition to resolving the suspend/resume issue this patch also addresses issues seen in the event of memory allocation errors causing uneven ring sizes on multiple queues.
Signed-off-by Alexander Duyck <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.
From: Jeff Kirsher <[email protected]>
Date: Mon, 17 Nov 2008 18:05:10 -0800
Quoted 6 lines
From: Alexander Duyck <[email protected]>
This patch adds the 82576 device to the description for igb in
Kconfig.Signed-off-by Alexander Duyck <[email protected]>Signed-off-by Jeff Kirsher <[email protected]>
Applied.