[kernel] r17923 - in dists/squeeze/linux-2.6/debian: . config patches/features/all/igb patches/series

Ben Hutchings benh at alioth.debian.org
Mon Aug 15 00:11:57 UTC 2011


Author: benh
Date: Mon Aug 15 00:11:56 2011
New Revision: 17923

Log:
Backport igb,igbvf changes up to 3.0

Added:
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0166-igb-Add-support-for-i340-Quad-Port-Fiber-Adapter.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0167-igb-Enable-PF-side-of-SR-IOV-support-for-i350-device.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0168-igbvf-remove-Tx-hang-detection.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0169-igb-Update-Intel-copyright-notice-for-driver-source.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0170-igb-update-version-string.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0171-net-use-pci_dev-revision-again.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0172-igb-warn-if-max_vfs-limit-is-exceeded.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0173-igb-Fix-reg-pattern-test-in-ethtool-for-i350-devices.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0174-igb-Fix-strncpy-calls-to-be-safe-per-source-code-rev.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0175-igb-Add-stats-output-for-OS2BMC-feature-on-i350-devi.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0176-igb-Add-Energy-Efficient-Ethernet-EEE-for-i350-devic.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0177-igb-Update-NVM-functions-to-work-with-i350-devices.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0178-igb-Add-DMA-Coalescing-feature-to-driver.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0179-igb-Bump-version-to-3.0.6.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0180-igb-fix-hw-timestamping.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0181-igb-Add-messaging-for-thermal-sensor-events-on-i350-.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0182-Fix-common-misspellings.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0183-igb-fix-typo-in-igb_validate_nvm_checksum_82580.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0184-igb-introduce-igb_thermal_sensor_event-for-sensor-ch.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0185-ethtool-Use-full-32-bit-speed-range-in-ethtool-s-set.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0186-ethtool-cosmetic-Use-ethtool-ethtool_cmd_speed-API.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0187-net-igb-e1000-e1000e-more-robust-ethtool-duplex-spee.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0188-igb-Add-check-for-invalid-size-to-igb_get_invariants.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0189-igbvf-remove-bogus-phys_id.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0190-Add-appropriate-linux-prefetch.h-include-for-prefetc.patch
   dists/squeeze/linux-2.6/debian/patches/features/all/igb/0191-igb-fix-i350-SR-IOV-failture.patch
Modified:
   dists/squeeze/linux-2.6/debian/changelog
   dists/squeeze/linux-2.6/debian/config/defines
   dists/squeeze/linux-2.6/debian/patches/series/36

Modified: dists/squeeze/linux-2.6/debian/changelog
==============================================================================
--- dists/squeeze/linux-2.6/debian/changelog	Sun Aug 14 22:55:28 2011	(r17922)
+++ dists/squeeze/linux-2.6/debian/changelog	Mon Aug 15 00:11:56 2011	(r17923)
@@ -40,8 +40,8 @@
   * e1000e: Backport changes up to Linux 2.6.38 (Closes: #627700)
     - Add support for i82567V-4 and i82579
     - Fix support for i82577, i82578 and i82583
-  * igb,igbvf: Backport changes up to Linux 2.6.38 (Closes: #627702)
-    - Add support for i82576-ET2, i82580, DH89xxCC and i350
+  * igb,igbvf: Backport changes up to Linux 3.0 (Closes: #627702)
+    - Add support for i82576-ET2, i82580, DH89xxCC, i340 and i350
   * r8169: Backport changes up to Linux 2.6.38 (Closes: #627704)
     - Fix support for RTL8102E and RTL8168DP
   * tg3,broadcom: Backport changes up to Linux 2.6.38 (Closes: #627705)

Modified: dists/squeeze/linux-2.6/debian/config/defines
==============================================================================
--- dists/squeeze/linux-2.6/debian/config/defines	Sun Aug 14 22:55:28 2011	(r17922)
+++ dists/squeeze/linux-2.6/debian/config/defines	Mon Aug 15 00:11:56 2011	(r17923)
@@ -74,7 +74,8 @@
 drivers/staging/ramzswap/: 2.6.33
 drivers/media/dvb/mantis/: 2.6.34
 drivers/net/e1000e/: 2.6.38
-drivers/net/igb/: 2.6.38
+drivers/net/igb/: 3.0
+drivers/net/igbvf/: 3.0
 drivers/net/macvtap.c: 2.6.34
 drivers/net/r8169.c: 2.6.38
 drivers/net/sky2.c: 2.6.35

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0166-igb-Add-support-for-i340-Quad-Port-Fiber-Adapter.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0166-igb-Add-support-for-i340-Quad-Port-Fiber-Adapter.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,56 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Fri, 14 Jan 2011 05:33:46 +0000
+Subject: [PATCH 166/200] igb: Add support for i340 Quad Port Fiber Adapter
+
+commit 6493d24f77d8e4fe94913eb504ed9ffebb433402 upstream.
+
+This patch enables support for Intel i340 Quad Port Fiber Adapter.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_82575.c |    1 +
+ drivers/net/igb/e1000_hw.h    |    1 +
+ drivers/net/igb/igb_main.c    |    1 +
+ 3 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index 0a2368f..c1552b6 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -129,6 +129,7 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
+ 		break;
+ 	case E1000_DEV_ID_82580_COPPER:
+ 	case E1000_DEV_ID_82580_FIBER:
++	case E1000_DEV_ID_82580_QUAD_FIBER:
+ 	case E1000_DEV_ID_82580_SERDES:
+ 	case E1000_DEV_ID_82580_SGMII:
+ 	case E1000_DEV_ID_82580_COPPER_DUAL:
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index e2638af..281324e 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
+@@ -54,6 +54,7 @@ struct e1000_hw;
+ #define E1000_DEV_ID_82580_SERDES             0x1510
+ #define E1000_DEV_ID_82580_SGMII              0x1511
+ #define E1000_DEV_ID_82580_COPPER_DUAL        0x1516
++#define E1000_DEV_ID_82580_QUAD_FIBER         0x1527
+ #define E1000_DEV_ID_DH89XXCC_SGMII           0x0438
+ #define E1000_DEV_ID_DH89XXCC_SERDES          0x043A
+ #define E1000_DEV_ID_DH89XXCC_BACKPLANE       0x043C
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 860830f..1c95663 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -68,6 +68,7 @@ static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I350_SGMII), board_82575 },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER), board_82575 },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_FIBER), board_82575 },
++	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_QUAD_FIBER), board_82575 },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SERDES), board_82575 },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_SGMII), board_82575 },
+ 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_82580_COPPER_DUAL), board_82575 },
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0167-igb-Enable-PF-side-of-SR-IOV-support-for-i350-device.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0167-igb-Enable-PF-side-of-SR-IOV-support-for-i350-device.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,114 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Thu, 20 Jan 2011 06:40:45 +0000
+Subject: [PATCH 167/200] igb: Enable PF side of SR-IOV support for i350
+ devices
+
+commit 6b78bb1d46cfae6502826ec31a6e9f7222ab3cb4 upstream.
+
+This patch adds full support for SR-IOV by enabling the PF side.
+VF side has already been committed.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+[bwh: Adjust context for omitted stats64 support]
+---
+ drivers/net/igb/e1000_82575.c |   10 ++++++++--
+ drivers/net/igb/e1000_mbx.c   |   38 ++++++++++++++++++--------------------
+ drivers/net/igb/igb_main.c    |    9 +++++++--
+ 3 files changed, 33 insertions(+), 24 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index c1552b6..65c1833 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -238,9 +238,15 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
+ 		size = 14;
+ 	nvm->word_size = 1 << size;
+ 
+-	/* if 82576 then initialize mailbox parameters */
+-	if (mac->type == e1000_82576)
++	/* if part supports SR-IOV then initialize mailbox parameters */
++	switch (mac->type) {
++	case e1000_82576:
++	case e1000_i350:
+ 		igb_init_mbx_params_pf(hw);
++		break;
++	default:
++		break;
++	}
+ 
+ 	/* setup PHY parameters */
+ 	if (phy->media_type != e1000_media_type_copper) {
+diff --git a/drivers/net/igb/e1000_mbx.c b/drivers/net/igb/e1000_mbx.c
+index c474cdb..78d48c7 100644
+--- a/drivers/net/igb/e1000_mbx.c
++++ b/drivers/net/igb/e1000_mbx.c
+@@ -422,26 +422,24 @@ s32 igb_init_mbx_params_pf(struct e1000_hw *hw)
+ {
+ 	struct e1000_mbx_info *mbx = &hw->mbx;
+ 
+-	if (hw->mac.type == e1000_82576) {
+-		mbx->timeout = 0;
+-		mbx->usec_delay = 0;
+-
+-		mbx->size = E1000_VFMAILBOX_SIZE;
+-
+-		mbx->ops.read = igb_read_mbx_pf;
+-		mbx->ops.write = igb_write_mbx_pf;
+-		mbx->ops.read_posted = igb_read_posted_mbx;
+-		mbx->ops.write_posted = igb_write_posted_mbx;
+-		mbx->ops.check_for_msg = igb_check_for_msg_pf;
+-		mbx->ops.check_for_ack = igb_check_for_ack_pf;
+-		mbx->ops.check_for_rst = igb_check_for_rst_pf;
+-
+-		mbx->stats.msgs_tx = 0;
+-		mbx->stats.msgs_rx = 0;
+-		mbx->stats.reqs = 0;
+-		mbx->stats.acks = 0;
+-		mbx->stats.rsts = 0;
+-	}
++	mbx->timeout = 0;
++	mbx->usec_delay = 0;
++
++	mbx->size = E1000_VFMAILBOX_SIZE;
++
++	mbx->ops.read = igb_read_mbx_pf;
++	mbx->ops.write = igb_write_mbx_pf;
++	mbx->ops.read_posted = igb_read_posted_mbx;
++	mbx->ops.write_posted = igb_write_posted_mbx;
++	mbx->ops.check_for_msg = igb_check_for_msg_pf;
++	mbx->ops.check_for_ack = igb_check_for_ack_pf;
++	mbx->ops.check_for_rst = igb_check_for_rst_pf;
++
++	mbx->stats.msgs_tx = 0;
++	mbx->stats.msgs_rx = 0;
++	mbx->stats.reqs = 0;
++	mbx->stats.acks = 0;
++	mbx->stats.rsts = 0;
+ 
+ 	return 0;
+ }
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 1c95663..33826fa 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -2267,9 +2267,14 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
+ 	adapter->min_frame_size = ETH_ZLEN + ETH_FCS_LEN;
+ 
+ #ifdef CONFIG_PCI_IOV
+-	if (hw->mac.type == e1000_82576)
++	switch (hw->mac.type) {
++	case e1000_82576:
++	case e1000_i350:
+ 		adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs;
+-
++		break;
++	default:
++		break;
++	}
+ #endif /* CONFIG_PCI_IOV */
+ 	adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus());
+ 
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0168-igbvf-remove-Tx-hang-detection.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0168-igbvf-remove-Tx-hang-detection.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,133 @@
+From: Lior Levy <lior.levy at intel.com>
+Date: Fri, 11 Feb 2011 03:38:04 +0000
+Subject: [PATCH 168/200] igbvf: remove Tx hang detection
+
+commit 6799746ad63b3df7ddf47797bb06467db35c6f94 upstream.
+
+Removed Tx hang detection mechanism from igbvf.
+This mechanism has no affect and can cause false alarm message in some cases.
+
+Signed-off-by: Lior Levy <lior.levy at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igbvf/igbvf.h  |    3 --
+ drivers/net/igbvf/netdev.c |   60 --------------------------------------------
+ 2 files changed, 0 insertions(+), 63 deletions(-)
+
+diff --git a/drivers/net/igbvf/igbvf.h b/drivers/net/igbvf/igbvf.h
+index 990c329..d5dad5d 100644
+--- a/drivers/net/igbvf/igbvf.h
++++ b/drivers/net/igbvf/igbvf.h
+@@ -201,9 +201,6 @@ struct igbvf_adapter {
+ 	unsigned int restart_queue;
+ 	u32 txd_cmd;
+ 
+-	bool detect_tx_hung;
+-	u8 tx_timeout_factor;
+-
+ 	u32 tx_int_delay;
+ 	u32 tx_abs_int_delay;
+ 
+diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
+index 5875249..ac2de4c 100644
+--- a/drivers/net/igbvf/netdev.c
++++ b/drivers/net/igbvf/netdev.c
+@@ -396,35 +396,6 @@ static void igbvf_put_txbuf(struct igbvf_adapter *adapter,
+ 	buffer_info->time_stamp = 0;
+ }
+ 
+-static void igbvf_print_tx_hang(struct igbvf_adapter *adapter)
+-{
+-	struct igbvf_ring *tx_ring = adapter->tx_ring;
+-	unsigned int i = tx_ring->next_to_clean;
+-	unsigned int eop = tx_ring->buffer_info[i].next_to_watch;
+-	union e1000_adv_tx_desc *eop_desc = IGBVF_TX_DESC_ADV(*tx_ring, eop);
+-
+-	/* detected Tx unit hang */
+-	dev_err(&adapter->pdev->dev,
+-	        "Detected Tx Unit Hang:\n"
+-	        "  TDH                  <%x>\n"
+-	        "  TDT                  <%x>\n"
+-	        "  next_to_use          <%x>\n"
+-	        "  next_to_clean        <%x>\n"
+-	        "buffer_info[next_to_clean]:\n"
+-	        "  time_stamp           <%lx>\n"
+-	        "  next_to_watch        <%x>\n"
+-	        "  jiffies              <%lx>\n"
+-	        "  next_to_watch.status <%x>\n",
+-	        readl(adapter->hw.hw_addr + tx_ring->head),
+-	        readl(adapter->hw.hw_addr + tx_ring->tail),
+-	        tx_ring->next_to_use,
+-	        tx_ring->next_to_clean,
+-	        tx_ring->buffer_info[eop].time_stamp,
+-	        eop,
+-	        jiffies,
+-	        eop_desc->wb.status);
+-}
+-
+ /**
+  * igbvf_setup_tx_resources - allocate Tx resources (Descriptors)
+  * @adapter: board private structure
+@@ -773,7 +744,6 @@ static void igbvf_set_itr(struct igbvf_adapter *adapter)
+ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
+ {
+ 	struct igbvf_adapter *adapter = tx_ring->adapter;
+-	struct e1000_hw *hw = &adapter->hw;
+ 	struct net_device *netdev = adapter->netdev;
+ 	struct igbvf_buffer *buffer_info;
+ 	struct sk_buff *skb;
+@@ -834,22 +804,6 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring)
+ 		}
+ 	}
+ 
+-	if (adapter->detect_tx_hung) {
+-		/* Detect a transmit hang in hardware, this serializes the
+-		 * check with the clearing of time_stamp and movement of i */
+-		adapter->detect_tx_hung = false;
+-		if (tx_ring->buffer_info[i].time_stamp &&
+-		    time_after(jiffies, tx_ring->buffer_info[i].time_stamp +
+-		               (adapter->tx_timeout_factor * HZ)) &&
+-		    !(er32(STATUS) & E1000_STATUS_TXOFF)) {
+-
+-			tx_desc = IGBVF_TX_DESC_ADV(*tx_ring, i);
+-			/* detected Tx unit hang */
+-			igbvf_print_tx_hang(adapter);
+-
+-			netif_stop_queue(netdev);
+-		}
+-	}
+ 	adapter->net_stats.tx_bytes += total_bytes;
+ 	adapter->net_stats.tx_packets += total_packets;
+ 	return count < tx_ring->count;
+@@ -1865,17 +1819,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
+ 			                          &adapter->link_duplex);
+ 			igbvf_print_link_info(adapter);
+ 
+-			/* adjust timeout factor according to speed/duplex */
+-			adapter->tx_timeout_factor = 1;
+-			switch (adapter->link_speed) {
+-			case SPEED_10:
+-				adapter->tx_timeout_factor = 16;
+-				break;
+-			case SPEED_100:
+-				/* maybe add some timeout factor ? */
+-				break;
+-			}
+-
+ 			netif_carrier_on(netdev);
+ 			netif_wake_queue(netdev);
+ 		}
+@@ -1909,9 +1852,6 @@ static void igbvf_watchdog_task(struct work_struct *work)
+ 	/* Cause software interrupt to ensure Rx ring is cleaned */
+ 	ew32(EICS, adapter->rx_ring->eims_value);
+ 
+-	/* Force detection of hung controller every watchdog period */
+-	adapter->detect_tx_hung = 1;
+-
+ 	/* Reset the timer */
+ 	if (!test_bit(__IGBVF_DOWN, &adapter->state))
+ 		mod_timer(&adapter->watchdog_timer,
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0169-igb-Update-Intel-copyright-notice-for-driver-source.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0169-igb-Update-Intel-copyright-notice-for-driver-source.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,32 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Thu, 17 Feb 2011 09:02:30 +0000
+Subject: [PATCH 169/200] igb: Update Intel copyright notice for driver
+ source.
+
+commit 4c4b42cb2f7b8273f8e458a23f08b62d89c337f3 upstream.
+
+This fix updates copyright information to include current year 2011.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 33826fa..0c64a9a 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -55,7 +55,7 @@ char igb_driver_name[] = "igb";
+ char igb_driver_version[] = DRV_VERSION;
+ static const char igb_driver_string[] =
+ 				"Intel(R) Gigabit Ethernet Network Driver";
+-static const char igb_copyright[] = "Copyright (c) 2007-2009 Intel Corporation.";
++static const char igb_copyright[] = "Copyright (c) 2007-2011 Intel Corporation.";
+ 
+ static const struct e1000_info *igb_info_tbl[] = {
+ 	[board_82575] = &e1000_82575_info,
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0170-igb-update-version-string.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0170-igb-update-version-string.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,32 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Wed, 16 Feb 2011 05:09:46 +0000
+Subject: [PATCH 170/200] igb: update version string
+
+commit c2b6a059cf4d527e1e71f384e9e45326bcc8b41f upstream.
+
+This will synchronize the version with the out of tree driver which
+shares its functionality.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 0c64a9a..d91d9a6 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -50,7 +50,7 @@
+ #endif
+ #include "igb.h"
+ 
+-#define DRV_VERSION "2.1.0-k2"
++#define DRV_VERSION "2.4.13-k2"
+ char igb_driver_name[] = "igb";
+ char igb_driver_version[] = DRV_VERSION;
+ static const char igb_driver_string[] =
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0171-net-use-pci_dev-revision-again.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0171-net-use-pci_dev-revision-again.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,58 @@
+From: Sergei Shtylyov <sshtylyov at ru.mvista.com>
+Date: Mon, 28 Feb 2011 11:57:33 -0800
+Subject: [PATCH 171/200] net: use pci_dev->revision, again
+
+commit ff938e43d39e926de74b32a3656c190f979ab642 upstream.
+
+Several more network drivers that read the device's revision ID
+from the PCI configuration register were merged after the commit
+44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all drivers
+to use pci_device->revision), so it's time to do another pass of
+conversion to using the 'revision' field of 'struct pci_dev'...
+
+Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
+Acked-by: "John W. Linville" <linville at tuxdriver.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igbvf/ethtool.c |    6 ++----
+ drivers/net/igbvf/netdev.c  |    3 +--
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/igbvf/ethtool.c b/drivers/net/igbvf/ethtool.c
+index abb3606..79cb65f 100644
+--- a/drivers/net/igbvf/ethtool.c
++++ b/drivers/net/igbvf/ethtool.c
+@@ -206,13 +206,11 @@ static void igbvf_get_regs(struct net_device *netdev,
+ 	struct igbvf_adapter *adapter = netdev_priv(netdev);
+ 	struct e1000_hw *hw = &adapter->hw;
+ 	u32 *regs_buff = p;
+-	u8 revision_id;
+ 
+ 	memset(p, 0, IGBVF_REGS_LEN * sizeof(u32));
+ 
+-	pci_read_config_byte(adapter->pdev, PCI_REVISION_ID, &revision_id);
+-
+-	regs->version = (1 << 24) | (revision_id << 16) | adapter->pdev->device;
++	regs->version = (1 << 24) | (adapter->pdev->revision << 16) |
++			adapter->pdev->device;
+ 
+ 	regs_buff[0] = er32(CTRL);
+ 	regs_buff[1] = er32(STATUS);
+diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
+index ac2de4c..a163da1 100644
+--- a/drivers/net/igbvf/netdev.c
++++ b/drivers/net/igbvf/netdev.c
+@@ -2641,8 +2641,7 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
+ 	hw->device_id = pdev->device;
+ 	hw->subsystem_vendor_id = pdev->subsystem_vendor;
+ 	hw->subsystem_device_id = pdev->subsystem_device;
+-
+-	pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id);
++	hw->revision_id = pdev->revision;
+ 
+ 	err = -EIO;
+ 	adapter->hw.hw_addr = ioremap(pci_resource_start(pdev, 0),
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0172-igb-warn-if-max_vfs-limit-is-exceeded.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0172-igb-warn-if-max_vfs-limit-is-exceeded.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,38 @@
+From: Stefan Assmann <sassmann at redhat.com>
+Date: Thu, 24 Feb 2011 20:03:31 +0000
+Subject: [PATCH 172/200] igb: warn if max_vfs limit is exceeded
+
+commit 9b082d734a938b951ed4b9b5a850ae3513d4a7e3 upstream.
+
+Currently there's no warning printed when max_vfs > 7 is specified with
+igb and the maximum of 7 is silently enforced. This patch prints a
+warning and informs the user of the actions taken.
+
+Signed-off-by: Stefan Assmann <sassmann at redhat.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |    7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index d91d9a6..363ae14 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -2270,7 +2270,12 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
+ 	switch (hw->mac.type) {
+ 	case e1000_82576:
+ 	case e1000_i350:
+-		adapter->vfs_allocated_count = (max_vfs > 7) ? 7 : max_vfs;
++		if (max_vfs > 7) {
++			dev_warn(&pdev->dev,
++				 "Maximum of 7 VFs per PF, using max\n");
++			adapter->vfs_allocated_count = 7;
++		} else
++			adapter->vfs_allocated_count = max_vfs;
+ 		break;
+ 	default:
+ 		break;
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0173-igb-Fix-reg-pattern-test-in-ethtool-for-i350-devices.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0173-igb-Fix-reg-pattern-test-in-ethtool-for-i350-devices.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,33 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Thu, 24 Feb 2011 03:12:15 +0000
+Subject: [PATCH 173/200] igb: Fix reg pattern test in ethtool for i350
+ devices
+
+commit 93ed835928f3100c95e0408df0543f35d03f7c23 upstream.
+
+This fixes the reg_pattern_test so that the test does not fail
+on i350 parts.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_ethtool.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 26bf6a1..738fb41 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -1069,7 +1069,7 @@ static bool reg_pattern_test(struct igb_adapter *adapter, u64 *data,
+ 		{0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF};
+ 	for (pat = 0; pat < ARRAY_SIZE(_test); pat++) {
+ 		wr32(reg, (_test[pat] & write));
+-		val = rd32(reg);
++		val = rd32(reg) & mask;
+ 		if (val != (_test[pat] & write & mask)) {
+ 			dev_err(&adapter->pdev->dev, "pattern test reg %04X "
+ 				"failed: got 0x%08X expected 0x%08X\n",
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0174-igb-Fix-strncpy-calls-to-be-safe-per-source-code-rev.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0174-igb-Fix-strncpy-calls-to-be-safe-per-source-code-rev.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,50 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Wed, 2 Mar 2011 01:11:26 +0000
+Subject: [PATCH 174/200] igb: Fix strncpy calls to be safe per source code
+ review tools
+
+commit 3b668a77bad7f03c3df28971760a3883a395ce55 upstream.
+
+This fix changes the remaining calls to strncpy that have not yet
+been changed to use the "sizeof(buf) - 1" syntax rather than just
+a number for buffer size.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Aaron Brown <aaron.f.brown at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_ethtool.c |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 738fb41..6a1fafc 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -726,8 +726,9 @@ static void igb_get_drvinfo(struct net_device *netdev,
+ 	char firmware_version[32];
+ 	u16 eeprom_data;
+ 
+-	strncpy(drvinfo->driver,  igb_driver_name, 32);
+-	strncpy(drvinfo->version, igb_driver_version, 32);
++	strncpy(drvinfo->driver,  igb_driver_name, sizeof(drvinfo->driver) - 1);
++	strncpy(drvinfo->version, igb_driver_version,
++		sizeof(drvinfo->version) - 1);
+ 
+ 	/* EEPROM image version # is reported as firmware version # for
+ 	 * 82575 controllers */
+@@ -737,8 +738,10 @@ static void igb_get_drvinfo(struct net_device *netdev,
+ 		(eeprom_data & 0x0FF0) >> 4,
+ 		eeprom_data & 0x000F);
+ 
+-	strncpy(drvinfo->fw_version, firmware_version, 32);
+-	strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
++	strncpy(drvinfo->fw_version, firmware_version,
++		sizeof(drvinfo->fw_version) - 1);
++	strncpy(drvinfo->bus_info, pci_name(adapter->pdev),
++		sizeof(drvinfo->bus_info) - 1);
+ 	drvinfo->n_stats = IGB_STATS_LEN;
+ 	drvinfo->testinfo_len = IGB_TEST_LEN;
+ 	drvinfo->regdump_len = igb_get_regs_len(netdev);
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0175-igb-Add-stats-output-for-OS2BMC-feature-on-i350-devi.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0175-igb-Add-stats-output-for-OS2BMC-feature-on-i350-devi.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,114 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Sat, 26 Feb 2011 07:42:37 +0000
+Subject: [PATCH 175/200] igb: Add stats output for OS2BMC feature on i350
+ devices
+
+commit 0a915b95d67f3bf63121c04aeb4eaebb183feb58 upstream.
+
+This patch adds statistics output for OS2BMC feature which is configured
+by eeprom on capable devices.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Aaron Brown <aaron.f.brown at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_defines.h |    1 +
+ drivers/net/igb/e1000_hw.h      |    4 ++++
+ drivers/net/igb/e1000_regs.h    |    7 +++++++
+ drivers/net/igb/igb_ethtool.c   |    9 ++++++++-
+ drivers/net/igb/igb_main.c      |    9 +++++++++
+ 5 files changed, 29 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
+index 6319ed9..88d6195 100644
+--- a/drivers/net/igb/e1000_defines.h
++++ b/drivers/net/igb/e1000_defines.h
+@@ -110,6 +110,7 @@
+ /* Management Control */
+ #define E1000_MANC_SMBUS_EN      0x00000001 /* SMBus Enabled - RO */
+ #define E1000_MANC_ASF_EN        0x00000002 /* ASF Enabled - RO */
++#define E1000_MANC_EN_BMC2OS     0x10000000 /* OSBMC is Enabled or not */
+ /* Enable Neighbor Discovery Filtering */
+ #define E1000_MANC_RCV_TCO_EN    0x00020000 /* Receive TCO Packets Enabled */
+ #define E1000_MANC_BLK_PHY_RST_ON_IDE   0x00040000 /* Block phy resets */
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index 281324e..eec9ed7 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
+@@ -248,6 +248,10 @@ struct e1000_hw_stats {
+ 	u64 scvpc;
+ 	u64 hrmpc;
+ 	u64 doosync;
++	u64 o2bgptc;
++	u64 o2bspc;
++	u64 b2ospc;
++	u64 b2ogprc;
+ };
+ 
+ struct e1000_phy_stats {
+diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
+index 78be261..9742fe7 100644
+--- a/drivers/net/igb/e1000_regs.h
++++ b/drivers/net/igb/e1000_regs.h
+@@ -323,4 +323,11 @@
+ 
+ /* DMA Coalescing registers */
+ #define E1000_PCIEMISC          0x05BB8 /* PCIE misc config register */
++
++/* OS2BMC Registers */
++#define E1000_B2OSPC    0x08FE0 /* BMC2OS packets sent by BMC */
++#define E1000_B2OGPRC   0x04158 /* BMC2OS packets received by host */
++#define E1000_O2BGPTC   0x08FE4 /* OS2BMC packets received by BMC */
++#define E1000_O2BSPC    0x0415C /* OS2BMC packets transmitted by host */
++
+ #endif
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 6a1fafc..04335cf 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -86,6 +86,10 @@ static const struct igb_stats igb_gstrings_stats[] = {
+ 	IGB_STAT("tx_smbus", stats.mgptc),
+ 	IGB_STAT("rx_smbus", stats.mgprc),
+ 	IGB_STAT("dropped_smbus", stats.mgpdc),
++	IGB_STAT("os2bmc_rx_by_bmc", stats.o2bgptc),
++	IGB_STAT("os2bmc_tx_by_bmc", stats.b2ospc),
++	IGB_STAT("os2bmc_tx_by_host", stats.o2bspc),
++	IGB_STAT("os2bmc_rx_by_host", stats.b2ogprc),
+ };
+ 
+ #define IGB_NETDEV_STAT(_net_stat) { \
+@@ -602,7 +606,10 @@ static void igb_get_regs(struct net_device *netdev,
+ 	regs_buff[548] = rd32(E1000_TDFT);
+ 	regs_buff[549] = rd32(E1000_TDFHS);
+ 	regs_buff[550] = rd32(E1000_TDFPC);
+-
++	regs_buff[551] = adapter->stats.o2bgptc;
++	regs_buff[552] = adapter->stats.b2ospc;
++	regs_buff[553] = adapter->stats.o2bspc;
++	regs_buff[554] = adapter->stats.b2ogprc;
+ }
+ 
+ static int igb_get_eeprom_len(struct net_device *netdev)
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 363ae14..75d0794 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -4504,6 +4504,15 @@ void igb_update_stats(struct igb_adapter *adapter)
+ 	adapter->stats.mgptc += rd32(E1000_MGTPTC);
+ 	adapter->stats.mgprc += rd32(E1000_MGTPRC);
+ 	adapter->stats.mgpdc += rd32(E1000_MGTPDC);
++
++	/* OS2BMC Stats */
++	reg = rd32(E1000_MANC);
++	if (reg & E1000_MANC_EN_BMC2OS) {
++		adapter->stats.o2bgptc += rd32(E1000_O2BGPTC);
++		adapter->stats.o2bspc += rd32(E1000_O2BSPC);
++		adapter->stats.b2ospc += rd32(E1000_B2OSPC);
++		adapter->stats.b2ogprc += rd32(E1000_B2OGPRC);
++	}
+ }
+ 
+ static irqreturn_t igb_msix_other(int irq, void *data)
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0176-igb-Add-Energy-Efficient-Ethernet-EEE-for-i350-devic.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0176-igb-Add-Energy-Efficient-Ethernet-EEE-for-i350-devic.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,163 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Fri, 11 Mar 2011 20:42:13 -0800
+Subject: [PATCH 176/200] igb: Add Energy Efficient Ethernet (EEE) for i350
+ devices.
+
+commit 09b068d45737abb49320ab25cb4ed2916017ace7 upstream.
+
+This patch adds the EEE feature for i350 devices, enabled by default.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_82575.c   |   46 ++++++++++++++++++++++++++++++++++++++-
+ drivers/net/igb/e1000_82575.h   |    1 +
+ drivers/net/igb/e1000_defines.h |    7 ++++++
+ drivers/net/igb/e1000_hw.h      |    1 +
+ drivers/net/igb/e1000_regs.h    |    4 +++
+ drivers/net/igb/igb_main.c      |    8 ++++++-
+ 6 files changed, 65 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index 65c1833..20d172a 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -195,7 +195,11 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
+ 	mac->arc_subsystem_valid =
+ 		(rd32(E1000_FWSM) & E1000_FWSM_MODE_MASK)
+ 			? true : false;
+-
++	/* enable EEE on i350 parts */
++	if (mac->type == e1000_i350)
++		dev_spec->eee_disable = false;
++	else
++		dev_spec->eee_disable = true;
+ 	/* physical interface link setup */
+ 	mac->ops.setup_physical_interface =
+ 		(hw->phy.media_type == e1000_media_type_copper)
+@@ -1754,6 +1758,46 @@ u16 igb_rxpbs_adjust_82580(u32 data)
+ 	return ret_val;
+ }
+ 
++/**
++ *  igb_set_eee_i350 - Enable/disable EEE support
++ *  @hw: pointer to the HW structure
++ *
++ *  Enable/disable EEE based on setting in dev_spec structure.
++ *
++ **/
++s32 igb_set_eee_i350(struct e1000_hw *hw)
++{
++	s32 ret_val = 0;
++	u32 ipcnfg, eeer, ctrl_ext;
++
++	ctrl_ext = rd32(E1000_CTRL_EXT);
++	if ((hw->mac.type != e1000_i350) ||
++	    (ctrl_ext & E1000_CTRL_EXT_LINK_MODE_MASK))
++		goto out;
++	ipcnfg = rd32(E1000_IPCNFG);
++	eeer = rd32(E1000_EEER);
++
++	/* enable or disable per user setting */
++	if (!(hw->dev_spec._82575.eee_disable)) {
++		ipcnfg |= (E1000_IPCNFG_EEE_1G_AN |
++			E1000_IPCNFG_EEE_100M_AN);
++		eeer |= (E1000_EEER_TX_LPI_EN |
++			E1000_EEER_RX_LPI_EN |
++			E1000_EEER_LPI_FC);
++
++	} else {
++		ipcnfg &= ~(E1000_IPCNFG_EEE_1G_AN |
++			E1000_IPCNFG_EEE_100M_AN);
++		eeer &= ~(E1000_EEER_TX_LPI_EN |
++			E1000_EEER_RX_LPI_EN |
++			E1000_EEER_LPI_FC);
++	}
++	wr32(E1000_IPCNFG, ipcnfg);
++	wr32(E1000_EEER, eeer);
++out:
++
++	return ret_val;
++}
+ static struct e1000_mac_operations e1000_mac_ops_82575 = {
+ 	.init_hw              = igb_init_hw_82575,
+ 	.check_for_link       = igb_check_for_link_82575,
+diff --git a/drivers/net/igb/e1000_82575.h b/drivers/net/igb/e1000_82575.h
+index 1518691..60dd9ab 100644
+--- a/drivers/net/igb/e1000_82575.h
++++ b/drivers/net/igb/e1000_82575.h
+@@ -248,5 +248,6 @@ void igb_vmdq_set_anti_spoofing_pf(struct e1000_hw *, bool, int);
+ void igb_vmdq_set_loopback_pf(struct e1000_hw *, bool);
+ void igb_vmdq_set_replication_pf(struct e1000_hw *, bool);
+ u16 igb_rxpbs_adjust_82580(u32 data);
++s32 igb_set_eee_i350(struct e1000_hw *);
+ 
+ #endif
+diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
+index 88d6195..ccc3653 100644
+--- a/drivers/net/igb/e1000_defines.h
++++ b/drivers/net/igb/e1000_defines.h
+@@ -758,6 +758,13 @@
+ #define E1000_MDIC_ERROR     0x40000000
+ #define E1000_MDIC_DEST      0x80000000
+ 
++/* Energy Efficient Ethernet */
++#define E1000_IPCNFG_EEE_1G_AN       0x00000008  /* EEE Enable 1G AN */
++#define E1000_IPCNFG_EEE_100M_AN     0x00000004  /* EEE Enable 100M AN */
++#define E1000_EEER_TX_LPI_EN         0x00010000  /* EEE Tx LPI Enable */
++#define E1000_EEER_RX_LPI_EN         0x00020000  /* EEE Rx LPI Enable */
++#define E1000_EEER_LPI_FC            0x00040000  /* EEE Enable on FC */
++
+ /* SerDes Control */
+ #define E1000_GEN_CTL_READY             0x80000000
+ #define E1000_GEN_CTL_ADDRESS_SHIFT     8
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index eec9ed7..17569bf 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
+@@ -488,6 +488,7 @@ struct e1000_mbx_info {
+ struct e1000_dev_spec_82575 {
+ 	bool sgmii_active;
+ 	bool global_device_reset;
++	bool eee_disable;
+ };
+ 
+ struct e1000_hw {
+diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
+index 9742fe7..d5e190a 100644
+--- a/drivers/net/igb/e1000_regs.h
++++ b/drivers/net/igb/e1000_regs.h
+@@ -324,6 +324,10 @@
+ /* DMA Coalescing registers */
+ #define E1000_PCIEMISC          0x05BB8 /* PCIE misc config register */
+ 
++/* Energy Efficient Ethernet "EEE" register */
++#define E1000_IPCNFG  0x0E38  /* Internal PHY Configuration */
++#define E1000_EEER    0x0E30  /* Energy Efficient Ethernet */
++
+ /* OS2BMC Registers */
+ #define E1000_B2OSPC    0x08FE0 /* BMC2OS packets sent by BMC */
+ #define E1000_B2OGPRC   0x04158 /* BMC2OS packets received by host */
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 75d0794..e972244 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -1997,7 +1997,13 @@ static int __devinit igb_probe(struct pci_dev *pdev,
+ 		adapter->msix_entries ? "MSI-X" :
+ 		(adapter->flags & IGB_FLAG_HAS_MSI) ? "MSI" : "legacy",
+ 		adapter->num_rx_queues, adapter->num_tx_queues);
+-
++	switch (hw->mac.type) {
++	case e1000_i350:
++		igb_set_eee_i350(hw);
++		break;
++	default:
++		break;
++	}
+ 	return 0;
+ 
+ err_register:
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0177-igb-Update-NVM-functions-to-work-with-i350-devices.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0177-igb-Update-NVM-functions-to-work-with-i350-devices.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,460 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Fri, 11 Mar 2011 20:43:18 -0800
+Subject: [PATCH 177/200] igb: Update NVM functions to work with i350 devices
+
+commit 4322e561a93ec7ee034b603a6c610e7be90d4e8a upstream.
+
+This patch adds functions and functions pointers to accommodate
+differences between NVM interfaces and options for i350 devices,
+82580 devices and the rest.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_82575.c   |  239 ++++++++++++++++++++++++++++++++++++++-
+ drivers/net/igb/e1000_defines.h |    3 +
+ drivers/net/igb/e1000_hw.h      |    3 +-
+ drivers/net/igb/e1000_nvm.c     |   64 ++++++++++-
+ drivers/net/igb/e1000_nvm.h     |    1 +
+ drivers/net/igb/igb_ethtool.c   |    2 +-
+ drivers/net/igb/igb_main.c      |    2 +-
+ 7 files changed, 306 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index 20d172a..6b256c2 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -64,7 +64,14 @@ static s32  igb_reset_init_script_82575(struct e1000_hw *);
+ static s32  igb_read_mac_addr_82575(struct e1000_hw *);
+ static s32  igb_set_pcie_completion_timeout(struct e1000_hw *hw);
+ static s32  igb_reset_mdicnfg_82580(struct e1000_hw *hw);
+-
++static s32  igb_validate_nvm_checksum_82580(struct e1000_hw *hw);
++static s32  igb_update_nvm_checksum_82580(struct e1000_hw *hw);
++static s32  igb_update_nvm_checksum_with_offset(struct e1000_hw *hw,
++						u16 offset);
++static s32 igb_validate_nvm_checksum_with_offset(struct e1000_hw *hw,
++						u16 offset);
++static s32 igb_validate_nvm_checksum_i350(struct e1000_hw *hw);
++static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw);
+ static const u16 e1000_82580_rxpbs_table[] =
+ 	{ 36, 72, 144, 1, 2, 4, 8, 16,
+ 	  35, 70, 140 };
+@@ -237,10 +244,32 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
+ 	 */
+ 	size += NVM_WORD_SIZE_BASE_SHIFT;
+ 
+-	/* EEPROM access above 16k is unsupported */
+-	if (size > 14)
+-		size = 14;
+ 	nvm->word_size = 1 << size;
++	if (nvm->word_size == (1 << 15))
++		nvm->page_size = 128;
++
++	/* NVM Function Pointers */
++	nvm->ops.acquire = igb_acquire_nvm_82575;
++	if (nvm->word_size < (1 << 15))
++		nvm->ops.read = igb_read_nvm_eerd;
++	else
++		nvm->ops.read = igb_read_nvm_spi;
++
++	nvm->ops.release = igb_release_nvm_82575;
++	switch (hw->mac.type) {
++	case e1000_82580:
++		nvm->ops.validate = igb_validate_nvm_checksum_82580;
++		nvm->ops.update = igb_update_nvm_checksum_82580;
++		break;
++	case e1000_i350:
++		nvm->ops.validate = igb_validate_nvm_checksum_i350;
++		nvm->ops.update = igb_update_nvm_checksum_i350;
++		break;
++	default:
++		nvm->ops.validate = igb_validate_nvm_checksum;
++		nvm->ops.update = igb_update_nvm_checksum;
++	}
++	nvm->ops.write = igb_write_nvm_spi;
+ 
+ 	/* if part supports SR-IOV then initialize mailbox parameters */
+ 	switch (mac->type) {
+@@ -1759,6 +1788,207 @@ u16 igb_rxpbs_adjust_82580(u32 data)
+ }
+ 
+ /**
++ *  igb_validate_nvm_checksum_with_offset - Validate EEPROM
++ *  checksum
++ *  @hw: pointer to the HW structure
++ *  @offset: offset in words of the checksum protected region
++ *
++ *  Calculates the EEPROM checksum by reading/adding each word of the EEPROM
++ *  and then verifies that the sum of the EEPROM is equal to 0xBABA.
++ **/
++s32 igb_validate_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)
++{
++	s32 ret_val = 0;
++	u16 checksum = 0;
++	u16 i, nvm_data;
++
++	for (i = offset; i < ((NVM_CHECKSUM_REG + offset) + 1); i++) {
++		ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data);
++		if (ret_val) {
++			hw_dbg("NVM Read Error\n");
++			goto out;
++		}
++		checksum += nvm_data;
++	}
++
++	if (checksum != (u16) NVM_SUM) {
++		hw_dbg("NVM Checksum Invalid\n");
++		ret_val = -E1000_ERR_NVM;
++		goto out;
++	}
++
++out:
++	return ret_val;
++}
++
++/**
++ *  igb_update_nvm_checksum_with_offset - Update EEPROM
++ *  checksum
++ *  @hw: pointer to the HW structure
++ *  @offset: offset in words of the checksum protected region
++ *
++ *  Updates the EEPROM checksum by reading/adding each word of the EEPROM
++ *  up to the checksum.  Then calculates the EEPROM checksum and writes the
++ *  value to the EEPROM.
++ **/
++s32 igb_update_nvm_checksum_with_offset(struct e1000_hw *hw, u16 offset)
++{
++	s32 ret_val;
++	u16 checksum = 0;
++	u16 i, nvm_data;
++
++	for (i = offset; i < (NVM_CHECKSUM_REG + offset); i++) {
++		ret_val = hw->nvm.ops.read(hw, i, 1, &nvm_data);
++		if (ret_val) {
++			hw_dbg("NVM Read Error while updating checksum.\n");
++			goto out;
++		}
++		checksum += nvm_data;
++	}
++	checksum = (u16) NVM_SUM - checksum;
++	ret_val = hw->nvm.ops.write(hw, (NVM_CHECKSUM_REG + offset), 1,
++				&checksum);
++	if (ret_val)
++		hw_dbg("NVM Write Error while updating checksum.\n");
++
++out:
++	return ret_val;
++}
++
++/**
++ *  igb_validate_nvm_checksum_82580 - Validate EEPROM checksum
++ *  @hw: pointer to the HW structure
++ *
++ *  Calculates the EEPROM section checksum by reading/adding each word of
++ *  the EEPROM and then verifies that the sum of the EEPROM is
++ *  equal to 0xBABA.
++ **/
++static s32 igb_validate_nvm_checksum_82580(struct e1000_hw *hw)
++{
++	s32 ret_val = 0;
++	u16 eeprom_regions_count = 1;
++	u16 j, nvm_data;
++	u16 nvm_offset;
++
++	ret_val = hw->nvm.ops.read(hw, NVM_COMPATIBILITY_REG_3, 1, &nvm_data);
++	if (ret_val) {
++		hw_dbg("NVM Read Error\n");
++		goto out;
++	}
++
++	if (nvm_data & NVM_COMPATIBILITY_BIT_MASK) {
++		/* if chekcsums compatibility bit is set validate checksums
++		 * for all 4 ports. */
++		eeprom_regions_count = 4;
++	}
++
++	for (j = 0; j < eeprom_regions_count; j++) {
++		nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
++		ret_val = igb_validate_nvm_checksum_with_offset(hw,
++								nvm_offset);
++		if (ret_val != 0)
++			goto out;
++	}
++
++out:
++	return ret_val;
++}
++
++/**
++ *  igb_update_nvm_checksum_82580 - Update EEPROM checksum
++ *  @hw: pointer to the HW structure
++ *
++ *  Updates the EEPROM section checksums for all 4 ports by reading/adding
++ *  each word of the EEPROM up to the checksum.  Then calculates the EEPROM
++ *  checksum and writes the value to the EEPROM.
++ **/
++static s32 igb_update_nvm_checksum_82580(struct e1000_hw *hw)
++{
++	s32 ret_val;
++	u16 j, nvm_data;
++	u16 nvm_offset;
++
++	ret_val = hw->nvm.ops.read(hw, NVM_COMPATIBILITY_REG_3, 1, &nvm_data);
++	if (ret_val) {
++		hw_dbg("NVM Read Error while updating checksum"
++			" compatibility bit.\n");
++		goto out;
++	}
++
++	if ((nvm_data & NVM_COMPATIBILITY_BIT_MASK) == 0) {
++		/* set compatibility bit to validate checksums appropriately */
++		nvm_data = nvm_data | NVM_COMPATIBILITY_BIT_MASK;
++		ret_val = hw->nvm.ops.write(hw, NVM_COMPATIBILITY_REG_3, 1,
++					&nvm_data);
++		if (ret_val) {
++			hw_dbg("NVM Write Error while updating checksum"
++				" compatibility bit.\n");
++			goto out;
++		}
++	}
++
++	for (j = 0; j < 4; j++) {
++		nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
++		ret_val = igb_update_nvm_checksum_with_offset(hw, nvm_offset);
++		if (ret_val)
++			goto out;
++	}
++
++out:
++	return ret_val;
++}
++
++/**
++ *  igb_validate_nvm_checksum_i350 - Validate EEPROM checksum
++ *  @hw: pointer to the HW structure
++ *
++ *  Calculates the EEPROM section checksum by reading/adding each word of
++ *  the EEPROM and then verifies that the sum of the EEPROM is
++ *  equal to 0xBABA.
++ **/
++static s32 igb_validate_nvm_checksum_i350(struct e1000_hw *hw)
++{
++	s32 ret_val = 0;
++	u16 j;
++	u16 nvm_offset;
++
++	for (j = 0; j < 4; j++) {
++		nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
++		ret_val = igb_validate_nvm_checksum_with_offset(hw,
++								nvm_offset);
++		if (ret_val != 0)
++			goto out;
++	}
++
++out:
++	return ret_val;
++}
++
++/**
++ *  igb_update_nvm_checksum_i350 - Update EEPROM checksum
++ *  @hw: pointer to the HW structure
++ *
++ *  Updates the EEPROM section checksums for all 4 ports by reading/adding
++ *  each word of the EEPROM up to the checksum.  Then calculates the EEPROM
++ *  checksum and writes the value to the EEPROM.
++ **/
++static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw)
++{
++	s32 ret_val = 0;
++	u16 j;
++	u16 nvm_offset;
++
++	for (j = 0; j < 4; j++) {
++		nvm_offset = NVM_82580_LAN_FUNC_OFFSET(j);
++		ret_val = igb_update_nvm_checksum_with_offset(hw, nvm_offset);
++		if (ret_val != 0)
++			goto out;
++	}
++
++out:
++	return ret_val;
++}
++/**
+  *  igb_set_eee_i350 - Enable/disable EEE support
+  *  @hw: pointer to the HW structure
+  *
+@@ -1798,6 +2028,7 @@ out:
+ 
+ 	return ret_val;
+ }
++
+ static struct e1000_mac_operations e1000_mac_ops_82575 = {
+ 	.init_hw              = igb_init_hw_82575,
+ 	.check_for_link       = igb_check_for_link_82575,
+diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
+index ccc3653..0a24acc 100644
+--- a/drivers/net/igb/e1000_defines.h
++++ b/drivers/net/igb/e1000_defines.h
+@@ -566,6 +566,8 @@
+ #define NVM_INIT_CONTROL3_PORT_A   0x0024
+ #define NVM_ALT_MAC_ADDR_PTR       0x0037
+ #define NVM_CHECKSUM_REG           0x003F
++#define NVM_COMPATIBILITY_REG_3    0x0003
++#define NVM_COMPATIBILITY_BIT_MASK 0x8000
+ 
+ #define E1000_NVM_CFG_DONE_PORT_0  0x040000 /* MNG config cycle done */
+ #define E1000_NVM_CFG_DONE_PORT_1  0x080000 /* ...for second port */
+@@ -600,6 +602,7 @@
+ /* NVM Commands - SPI */
+ #define NVM_MAX_RETRY_SPI          5000 /* Max wait of 5ms, for RDY signal */
+ #define NVM_WRITE_OPCODE_SPI       0x02 /* NVM write opcode */
++#define NVM_READ_OPCODE_SPI        0x03 /* NVM read opcode */
+ #define NVM_A8_OPCODE_SPI          0x08 /* opcode bit-3 = address bit-8 */
+ #define NVM_WREN_OPCODE_SPI        0x06 /* NVM set Write Enable latch */
+ #define NVM_RDSR_OPCODE_SPI        0x05 /* NVM read Status register */
+diff --git a/drivers/net/igb/e1000_hw.h b/drivers/net/igb/e1000_hw.h
+index 17569bf..27153e8 100644
+--- a/drivers/net/igb/e1000_hw.h
++++ b/drivers/net/igb/e1000_hw.h
+@@ -336,6 +336,8 @@ struct e1000_nvm_operations {
+ 	s32  (*read)(struct e1000_hw *, u16, u16, u16 *);
+ 	void (*release)(struct e1000_hw *);
+ 	s32  (*write)(struct e1000_hw *, u16, u16, u16 *);
++	s32  (*update)(struct e1000_hw *);
++	s32  (*validate)(struct e1000_hw *);
+ };
+ 
+ struct e1000_info {
+@@ -422,7 +424,6 @@ struct e1000_phy_info {
+ 
+ struct e1000_nvm_info {
+ 	struct e1000_nvm_operations ops;
+-
+ 	enum e1000_nvm_type type;
+ 	enum e1000_nvm_override override;
+ 
+diff --git a/drivers/net/igb/e1000_nvm.c b/drivers/net/igb/e1000_nvm.c
+index 6b5cc2c..75bf36a 100644
+--- a/drivers/net/igb/e1000_nvm.c
++++ b/drivers/net/igb/e1000_nvm.c
+@@ -318,6 +318,68 @@ out:
+ }
+ 
+ /**
++ *  igb_read_nvm_spi - Read EEPROM's using SPI
++ *  @hw: pointer to the HW structure
++ *  @offset: offset of word in the EEPROM to read
++ *  @words: number of words to read
++ *  @data: word read from the EEPROM
++ *
++ *  Reads a 16 bit word from the EEPROM.
++ **/
++s32 igb_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
++{
++	struct e1000_nvm_info *nvm = &hw->nvm;
++	u32 i = 0;
++	s32 ret_val;
++	u16 word_in;
++	u8 read_opcode = NVM_READ_OPCODE_SPI;
++
++	/*
++	 * A check for invalid values:  offset too large, too many words,
++	 * and not enough words.
++	 */
++	if ((offset >= nvm->word_size) || (words > (nvm->word_size - offset)) ||
++	    (words == 0)) {
++		hw_dbg("nvm parameter(s) out of bounds\n");
++		ret_val = -E1000_ERR_NVM;
++		goto out;
++	}
++
++	ret_val = nvm->ops.acquire(hw);
++	if (ret_val)
++		goto out;
++
++	ret_val = igb_ready_nvm_eeprom(hw);
++	if (ret_val)
++		goto release;
++
++	igb_standby_nvm(hw);
++
++	if ((nvm->address_bits == 8) && (offset >= 128))
++		read_opcode |= NVM_A8_OPCODE_SPI;
++
++	/* Send the READ command (opcode + addr) */
++	igb_shift_out_eec_bits(hw, read_opcode, nvm->opcode_bits);
++	igb_shift_out_eec_bits(hw, (u16)(offset*2), nvm->address_bits);
++
++	/*
++	 * Read the data.  SPI NVMs increment the address with each byte
++	 * read and will roll over if reading beyond the end.  This allows
++	 * us to read the whole NVM from any offset
++	 */
++	for (i = 0; i < words; i++) {
++		word_in = igb_shift_in_eec_bits(hw, 16);
++		data[i] = (word_in >> 8) | (word_in << 8);
++	}
++
++release:
++	nvm->ops.release(hw);
++
++out:
++	return ret_val;
++}
++
++/**
+  *  igb_read_nvm_eerd - Reads EEPROM using EERD register
+  *  @hw: pointer to the HW structure
+  *  @offset: offset of word in the EEPROM to read
+@@ -353,7 +415,7 @@ s32 igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
+ 			break;
+ 
+ 		data[i] = (rd32(E1000_EERD) >>
+-			   E1000_NVM_RW_REG_DATA);
++			E1000_NVM_RW_REG_DATA);
+ 	}
+ 
+ out:
+diff --git a/drivers/net/igb/e1000_nvm.h b/drivers/net/igb/e1000_nvm.h
+index 29c956a..7f43564 100644
+--- a/drivers/net/igb/e1000_nvm.h
++++ b/drivers/net/igb/e1000_nvm.h
+@@ -35,6 +35,7 @@ s32  igb_read_part_num(struct e1000_hw *hw, u32 *part_num);
+ s32  igb_read_part_string(struct e1000_hw *hw, u8 *part_num,
+                           u32 part_num_size);
+ s32  igb_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
++s32  igb_read_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
+ s32  igb_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data);
+ s32  igb_validate_nvm_checksum(struct e1000_hw *hw);
+ s32  igb_update_nvm_checksum(struct e1000_hw *hw);
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 04335cf..8b0d98e 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -720,7 +720,7 @@ static int igb_set_eeprom(struct net_device *netdev,
+ 	/* Update the checksum over the first part of the EEPROM if needed
+ 	 * and flush shadow RAM for 82573 controllers */
+ 	if ((ret_val == 0) && ((first_word <= NVM_CHECKSUM_REG)))
+-		igb_update_nvm_checksum(hw);
++		hw->nvm.ops.update(hw);
+ 
+ 	kfree(eeprom_buff);
+ 	return ret_val;
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index e972244..037c152 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -1867,7 +1867,7 @@ static int __devinit igb_probe(struct pci_dev *pdev,
+ 	hw->mac.ops.reset_hw(hw);
+ 
+ 	/* make sure the NVM is good */
+-	if (igb_validate_nvm_checksum(hw) < 0) {
++	if (hw->nvm.ops.validate(hw) < 0) {
+ 		dev_err(&pdev->dev, "The NVM Checksum Is Not Valid\n");
+ 		err = -EIO;
+ 		goto err_eeprom;
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0178-igb-Add-DMA-Coalescing-feature-to-driver.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0178-igb-Add-DMA-Coalescing-feature-to-driver.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,202 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Fri, 11 Mar 2011 20:43:54 -0800
+Subject: [PATCH 178/200] igb: Add DMA Coalescing feature to driver
+
+commit 831ec0b4226cec7ea34f5c4c9810e78aeb2069bf upstream.
+
+This patch add DMA Coalescing which is a power-saving feature that
+coalesces DMA writes in order to stay in a low-power state as much
+as possible.  Feature is disabled by default.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+[bwh: Adjust context for omitted VF-control support]
+---
+ drivers/net/igb/e1000_defines.h |   29 ++++++++++++++++++-
+ drivers/net/igb/e1000_regs.h    |    9 ++++++
+ drivers/net/igb/igb.h           |    6 ++++
+ drivers/net/igb/igb_ethtool.c   |    6 ++++
+ drivers/net/igb/igb_main.c      |   59 ++++++++++++++++++++++++++++++++++++++-
+ 5 files changed, 107 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
+index 0a24acc..e9f80c9 100644
+--- a/drivers/net/igb/e1000_defines.h
++++ b/drivers/net/igb/e1000_defines.h
+@@ -287,7 +287,34 @@
+ #define E1000_TCTL_COLD   0x003ff000    /* collision distance */
+ #define E1000_TCTL_RTLC   0x01000000    /* Re-transmit on late collision */
+ 
+-/* Transmit Arbitration Count */
++/* DMA Coalescing register fields */
++#define E1000_DMACR_DMACWT_MASK         0x00003FFF /* DMA Coalescing
++							* Watchdog Timer */
++#define E1000_DMACR_DMACTHR_MASK        0x00FF0000 /* DMA Coalescing Receive
++							* Threshold */
++#define E1000_DMACR_DMACTHR_SHIFT       16
++#define E1000_DMACR_DMAC_LX_MASK        0x30000000 /* Lx when no PCIe
++							* transactions */
++#define E1000_DMACR_DMAC_LX_SHIFT       28
++#define E1000_DMACR_DMAC_EN             0x80000000 /* Enable DMA Coalescing */
++
++#define E1000_DMCTXTH_DMCTTHR_MASK      0x00000FFF /* DMA Coalescing Transmit
++							* Threshold */
++
++#define E1000_DMCTLX_TTLX_MASK          0x00000FFF /* Time to LX request */
++
++#define E1000_DMCRTRH_UTRESH_MASK       0x0007FFFF /* Receive Traffic Rate
++							* Threshold */
++#define E1000_DMCRTRH_LRPRCW            0x80000000 /* Rcv packet rate in
++							* current window */
++
++#define E1000_DMCCNT_CCOUNT_MASK        0x01FFFFFF /* DMA Coal Rcv Traffic
++							* Current Cnt */
++
++#define E1000_FCRTC_RTH_COAL_MASK       0x0003FFF0 /* Flow ctrl Rcv Threshold
++							* High val */
++#define E1000_FCRTC_RTH_COAL_SHIFT      4
++#define E1000_PCIEMISC_LX_DECISION      0x00000080 /* Lx power decision */
+ 
+ /* SerDes Control */
+ #define E1000_SCTL_DISABLE_SERDES_LOOPBACK 0x0400
+diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
+index d5e190a..58591bf 100644
+--- a/drivers/net/igb/e1000_regs.h
++++ b/drivers/net/igb/e1000_regs.h
+@@ -106,6 +106,15 @@
+ 
+ #define E1000_RQDPC(_n) (0x0C030 + ((_n) * 0x40))
+ 
++/* DMA Coalescing registers */
++#define E1000_DMACR             0x02508 /* Control Register */
++#define E1000_DMCTXTH           0x03550 /* Transmit Threshold */
++#define E1000_DMCTLX            0x02514 /* Time to Lx Request */
++#define E1000_DMCRTRH           0x05DD0 /* Receive Packet Rate Threshold */
++#define E1000_DMCCNT            0x05DD4 /* Current Rx Count */
++#define E1000_FCRTC             0x02170 /* Flow Control Rx high watermark */
++#define E1000_PCIEMISC          0x05BB8 /* PCIE misc config register */
++
+ /* Split and Replication RX Control - RW */
+ #define E1000_RXPBS    0x02404  /* Rx Packet Buffer Size - RW */
+ /*
+diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
+index 0b99bd5..977c33da 100644
+--- a/drivers/net/igb/igb.h
++++ b/drivers/net/igb/igb.h
+@@ -321,6 +321,12 @@ struct igb_adapter {
+ #define IGB_FLAG_DCA_ENABLED       (1 << 1)
+ #define IGB_FLAG_QUAD_PORT_A       (1 << 2)
+ #define IGB_FLAG_QUEUE_PAIRS       (1 << 3)
++#define IGB_FLAG_DMAC              (1 << 4)
++
++/* DMA Coalescing defines */
++#define IGB_MIN_TXPBSIZE           20408
++#define IGB_TX_BUF_4096            4096
++#define IGB_DMCTLX_DCFLUSH_DIS     0x80000000  /* Disable DMA Coal Flush */
+ 
+ #define IGB_82576_TSYNC_SHIFT 19
+ #define IGB_82580_TSYNC_SHIFT 24
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 8b0d98e..4957751 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -2008,6 +2008,12 @@ static int igb_set_coalesce(struct net_device *netdev,
+ 	if ((adapter->flags & IGB_FLAG_QUEUE_PAIRS) && ec->tx_coalesce_usecs)
+ 		return -EINVAL;
+ 
++	/* If ITR is disabled, disable DMAC */
++	if (ec->rx_coalesce_usecs == 0) {
++		if (adapter->flags & IGB_FLAG_DMAC)
++			adapter->flags &= ~IGB_FLAG_DMAC;
++	}
++
+ 	/* convert to rate of irq's per second */
+ 	if (ec->rx_coalesce_usecs && ec->rx_coalesce_usecs <= 3)
+ 		adapter->rx_itr_setting = ec->rx_coalesce_usecs;
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 037c152..f5b0d93 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -1661,7 +1661,58 @@ void igb_reset(struct igb_adapter *adapter)
+ 
+ 	if (hw->mac.ops.init_hw(hw))
+ 		dev_err(&pdev->dev, "Hardware Error\n");
++	if (hw->mac.type > e1000_82580) {
++		if (adapter->flags & IGB_FLAG_DMAC) {
++			u32 reg;
+ 
++			/*
++			 * DMA Coalescing high water mark needs to be higher
++			 * than * the * Rx threshold.  The Rx threshold is
++			 * currently * pba - 6, so we * should use a high water
++			 * mark of pba * - 4. */
++			hwm = (pba - 4) << 10;
++
++			reg = (((pba-6) << E1000_DMACR_DMACTHR_SHIFT)
++			       & E1000_DMACR_DMACTHR_MASK);
++
++			/* transition to L0x or L1 if available..*/
++			reg |= (E1000_DMACR_DMAC_EN | E1000_DMACR_DMAC_LX_MASK);
++
++			/* watchdog timer= +-1000 usec in 32usec intervals */
++			reg |= (1000 >> 5);
++			wr32(E1000_DMACR, reg);
++
++			/* no lower threshold to disable coalescing(smart fifb)
++			 * -UTRESH=0*/
++			wr32(E1000_DMCRTRH, 0);
++
++			/* set hwm to PBA -  2 * max frame size */
++			wr32(E1000_FCRTC, hwm);
++
++			/*
++			 * This sets the time to wait before requesting tran-
++			 * sition to * low power state to number of usecs needed
++			 * to receive 1 512 * byte frame at gigabit line rate
++			 */
++			reg = rd32(E1000_DMCTLX);
++			reg |= IGB_DMCTLX_DCFLUSH_DIS;
++
++			/* Delay 255 usec before entering Lx state. */
++			reg |= 0xFF;
++			wr32(E1000_DMCTLX, reg);
++
++			/* free space in Tx packet buffer to wake from DMAC */
++			wr32(E1000_DMCTXTH,
++			     (IGB_MIN_TXPBSIZE -
++			     (IGB_TX_BUF_4096 + adapter->max_frame_size))
++			     >> 6);
++
++			/* make low power state decision controlled by DMAC */
++			reg = rd32(E1000_PCIEMISC);
++			reg |= E1000_PCIEMISC_LX_DECISION;
++			wr32(E1000_PCIEMISC, reg);
++		} /* end if IGB_FLAG_DMAC set */
++	}
+ 	if (hw->mac.type == e1000_82580) {
+ 		u32 reg = rd32(E1000_PCIEMISC);
+ 		wr32(E1000_PCIEMISC,
+@@ -2137,6 +2188,9 @@ static void __devinit igb_probe_vfs(struct igb_adapter * adapter)
+ 			random_ether_addr(mac_addr);
+ 			igb_set_vf_mac(adapter, i, mac_addr);
+ 		}
++		/* DMA Coalescing is not supported in IOV mode. */
++		if (adapter->flags & IGB_FLAG_DMAC)
++			adapter->flags &= ~IGB_FLAG_DMAC;
+ 	}
+ #endif /* CONFIG_PCI_IOV */
+ }
+@@ -2310,6 +2364,9 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
+ 	/* Explicitly disable IRQ since the NIC can be in any state. */
+ 	igb_irq_disable(adapter);
+ 
++	if (hw->mac.type == e1000_i350)
++		adapter->flags &= ~IGB_FLAG_DMAC;
++
+ 	set_bit(__IGB_DOWN, &adapter->state);
+ 	return 0;
+ }
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0179-igb-Bump-version-to-3.0.6.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0179-igb-Bump-version-to-3.0.6.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,36 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Fri, 11 Mar 2011 20:58:19 -0800
+Subject: [PATCH 179/200] igb: Bump version to 3.0.6
+
+commit 0d1fe82deacdcc90458558b5d6a4a5af5db9a6c6 upstream.
+
+This patch updates igb version to 3.0.6.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |    7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index f5b0d93..e8de2dd 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -50,7 +50,12 @@
+ #endif
+ #include "igb.h"
+ 
+-#define DRV_VERSION "2.4.13-k2"
++#define MAJ 3
++#define MIN 0
++#define BUILD 6
++#define KFIX 2
++#define DRV_VERSION __stringify(MAJ) "." __stringify(MIN) "." \
++__stringify(BUILD) "-k" __stringify(KFIX)
+ char igb_driver_name[] = "igb";
+ char igb_driver_version[] = DRV_VERSION;
+ static const char igb_driver_string[] =
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0180-igb-fix-hw-timestamping.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0180-igb-fix-hw-timestamping.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,50 @@
+From: Anders Berggren <anders at halon.se>
+Date: Fri, 4 Feb 2011 07:32:32 +0000
+Subject: [PATCH 180/200] igb: fix hw timestamping
+
+commit 673b8b70cfae2cd0428a8ab5647571521348549a upstream.
+
+Hardware timestamping for Intel 82580 didn't work in either 2.6.36 or
+2.6.37. Comparing it to Intel's igb-2.4.12 I found that the
+timecounter_init clock/counter initialization was done too early.
+
+Signed-off-by: Anders Berggren <andfers at halon.se>
+Tested-by:  Aaron Brown <aaron.f.brown at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |    5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index e8de2dd..b642966 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -107,6 +107,7 @@ static void igb_setup_mrqc(struct igb_adapter *);
+ 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);
++static void igb_init_hw_timer(struct igb_adapter *adapter);
+ static int igb_sw_init(struct igb_adapter *);
+ static int igb_open(struct net_device *);
+ static int igb_close(struct net_device *);
+@@ -2031,6 +2032,9 @@ static int __devinit igb_probe(struct pci_dev *pdev,
+ 	}
+ 
+ #endif
++	/* do hw tstamp init after resetting */
++	igb_init_hw_timer(adapter);
++
+ 	dev_info(&pdev->dev, "Intel(R) Gigabit Ethernet Network Connection\n");
+ 	/* print bus type/speed/width info */
+ 	dev_info(&pdev->dev, "%s: (PCIe:%s:%s) %pM\n",
+@@ -2363,7 +2367,6 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
+ 		return -ENOMEM;
+ 	}
+ 
+-	igb_init_hw_timer(adapter);
+ 	igb_probe_vfs(adapter);
+ 
+ 	/* Explicitly disable IRQ since the NIC can be in any state. */
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0181-igb-Add-messaging-for-thermal-sensor-events-on-i350-.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0181-igb-Add-messaging-for-thermal-sensor-events-on-i350-.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,123 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Sat, 12 Mar 2011 08:59:47 +0000
+Subject: [PATCH 181/200] igb: Add messaging for thermal sensor events on i350
+ devices
+
+commit 7ef5ed1ce96c3f9a95b7327279f94b0700c689ef upstream.
+
+This feature adds messaging to the link status change to notify
+the user if the device returned from a downshift or power off
+event due to the Thermal Sensor feature in i350 parts. Feature
+is only available on internal copper ports.
+
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Aaron Brown <aaron.f.brown at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_defines.h |    5 +++++
+ drivers/net/igb/e1000_regs.h    |    3 +++
+ drivers/net/igb/igb_main.c      |   37 ++++++++++++++++++++++++++++++++++++-
+ 3 files changed, 44 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_defines.h b/drivers/net/igb/e1000_defines.h
+index e9f80c9..1935b85 100644
+--- a/drivers/net/igb/e1000_defines.h
++++ b/drivers/net/igb/e1000_defines.h
+@@ -51,6 +51,7 @@
+ #define E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES  0x00C00000
+ #define E1000_CTRL_EXT_LINK_MODE_1000BASE_KX  0x00400000
+ #define E1000_CTRL_EXT_LINK_MODE_SGMII   0x00800000
++#define E1000_CTRL_EXT_LINK_MODE_GMII   0x00000000
+ #define E1000_CTRL_EXT_EIAME          0x01000000
+ #define E1000_CTRL_EXT_IRCA           0x00000001
+ /* Interrupt delay cancellation */
+@@ -788,6 +789,10 @@
+ #define E1000_MDIC_ERROR     0x40000000
+ #define E1000_MDIC_DEST      0x80000000
+ 
++/* Thermal Sensor */
++#define E1000_THSTAT_PWR_DOWN       0x00000001 /* Power Down Event */
++#define E1000_THSTAT_LINK_THROTTLE  0x00000002 /* Link Speed Throttle Event */
++
+ /* Energy Efficient Ethernet */
+ #define E1000_IPCNFG_EEE_1G_AN       0x00000008  /* EEE Enable 1G AN */
+ #define E1000_IPCNFG_EEE_100M_AN     0x00000004  /* EEE Enable 100M AN */
+diff --git a/drivers/net/igb/e1000_regs.h b/drivers/net/igb/e1000_regs.h
+index 58591bf..212ec96 100644
+--- a/drivers/net/igb/e1000_regs.h
++++ b/drivers/net/igb/e1000_regs.h
+@@ -337,6 +337,9 @@
+ #define E1000_IPCNFG  0x0E38  /* Internal PHY Configuration */
+ #define E1000_EEER    0x0E30  /* Energy Efficient Ethernet */
+ 
++/* Thermal Sensor Register */
++#define E1000_THSTAT    0x08110 /* Thermal Sensor Status */
++
+ /* OS2BMC Registers */
+ #define E1000_B2OSPC    0x08FE0 /* BMC2OS packets sent by BMC */
+ #define E1000_B2OGPRC   0x04158 /* BMC2OS packets received by host */
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index b642966..67f1ec2 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -3526,7 +3526,7 @@ static void igb_watchdog_task(struct work_struct *work)
+                                                    watchdog_task);
+ 	struct e1000_hw *hw = &adapter->hw;
+ 	struct net_device *netdev = adapter->netdev;
+-	u32 link;
++	u32 link, ctrl_ext, thstat;
+ 	int i;
+ 
+ 	link = igb_has_link(adapter);
+@@ -3550,6 +3550,25 @@ static void igb_watchdog_task(struct work_struct *work)
+ 			       ((ctrl & E1000_CTRL_RFCE) ?  "RX" :
+ 			       ((ctrl & E1000_CTRL_TFCE) ?  "TX" : "None")));
+ 
++			/* check for thermal sensor event on i350,
++			 * copper only */
++			if (hw->mac.type == e1000_i350) {
++				thstat = rd32(E1000_THSTAT);
++				ctrl_ext = rd32(E1000_CTRL_EXT);
++				if ((hw->phy.media_type ==
++				     e1000_media_type_copper) && !(ctrl_ext &
++				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
++					if (thstat &
++					    E1000_THSTAT_LINK_THROTTLE) {
++						printk(KERN_INFO "igb: %s The "
++						       "network adapter link "
++						       "speed was downshifted "
++						       "because it "
++						       "overheated.\n",
++						       netdev->name);
++					}
++				}
++			}
+ 			/* adjust timeout factor according to speed/duplex */
+ 			adapter->tx_timeout_factor = 1;
+ 			switch (adapter->link_speed) {
+@@ -3574,6 +3593,22 @@ static void igb_watchdog_task(struct work_struct *work)
+ 		if (netif_carrier_ok(netdev)) {
+ 			adapter->link_speed = 0;
+ 			adapter->link_duplex = 0;
++			/* check for thermal sensor event on i350
++			 * copper only*/
++			if (hw->mac.type == e1000_i350) {
++				thstat = rd32(E1000_THSTAT);
++				ctrl_ext = rd32(E1000_CTRL_EXT);
++				if ((hw->phy.media_type ==
++				     e1000_media_type_copper) && !(ctrl_ext &
++				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
++					if (thstat & E1000_THSTAT_PWR_DOWN) {
++						printk(KERN_ERR "igb: %s The "
++						"network adapter was stopped "
++						"because it overheated.\n",
++						netdev->name);
++					}
++				}
++			}
+ 			/* Links status message must follow this format */
+ 			printk(KERN_INFO "igb: %s NIC Link is Down\n",
+ 			       netdev->name);
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0182-Fix-common-misspellings.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0182-Fix-common-misspellings.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,128 @@
+From: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+Date: Wed, 30 Mar 2011 22:57:33 -0300
+Subject: [PATCH 182/200] Fix common misspellings
+
+commit 25985edcedea6396277003854657b5f3cb31a628 upstream.
+
+Fixes generated by 'codespell' and manually reviewed.
+
+Signed-off-by: Lucas De Marchi <lucas.demarchi at profusion.mobi>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igb/e1000_mac.c |    4 ++--
+ drivers/net/igb/e1000_phy.c |    2 +-
+ drivers/net/igb/igb_main.c  |   14 +++++++-------
+ drivers/net/igbvf/netdev.c  |    2 +-
+ 4 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c
+index 90c5e01..ce8255f 100644
+--- a/drivers/net/igb/e1000_mac.c
++++ b/drivers/net/igb/e1000_mac.c
+@@ -181,7 +181,7 @@ s32 igb_vfta_set(struct e1000_hw *hw, u32 vid, bool add)
+  *  address and must override the actual permanent MAC address.  If an
+  *  alternate MAC address is fopund it is saved in the hw struct and
+  *  prgrammed into RAR0 and the cuntion returns success, otherwise the
+- *  fucntion returns an error.
++ *  function returns an error.
+  **/
+ s32 igb_check_alt_mac_addr(struct e1000_hw *hw)
+ {
+@@ -982,7 +982,7 @@ out:
+ }
+ 
+ /**
+- *  igb_get_speed_and_duplex_copper - Retreive current speed/duplex
++ *  igb_get_speed_and_duplex_copper - Retrieve current speed/duplex
+  *  @hw: pointer to the HW structure
+  *  @speed: stores the current speed
+  *  @duplex: stores the current duplex
+diff --git a/drivers/net/igb/e1000_phy.c b/drivers/net/igb/e1000_phy.c
+index 6694bf3..d639706 100644
+--- a/drivers/net/igb/e1000_phy.c
++++ b/drivers/net/igb/e1000_phy.c
+@@ -1421,7 +1421,7 @@ out:
+ }
+ 
+ /**
+- *  igb_check_downshift - Checks whether a downshift in speed occured
++ *  igb_check_downshift - Checks whether a downshift in speed occurred
+  *  @hw: pointer to the HW structure
+  *
+  *  Success returns 0, Failure returns 1
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 67f1ec2..e3ef41f 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -193,7 +193,7 @@ static struct pci_driver igb_driver = {
+ 	.probe    = igb_probe,
+ 	.remove   = __devexit_p(igb_remove),
+ #ifdef CONFIG_PM
+-	/* Power Managment Hooks */
++	/* Power Management Hooks */
+ 	.suspend  = igb_suspend,
+ 	.resume   = igb_resume,
+ #endif
+@@ -2272,7 +2272,7 @@ static void igb_init_hw_timer(struct igb_adapter *adapter)
+ 		/**
+ 		 * Scale the NIC clock cycle by a large factor so that
+ 		 * relatively small clock corrections can be added or
+-		 * substracted at each clock tick. The drawbacks of a large
++		 * subtracted at each clock tick. The drawbacks of a large
+ 		 * factor are a) that the clock register overflows more quickly
+ 		 * (not such a big deal) and b) that the increment per tick has
+ 		 * to fit into 24 bits.  As a result we need to use a shift of
+@@ -3385,7 +3385,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
+ 		} else {
+ 			/*
+ 			 * Write addresses to the MTA, if the attempt fails
+-			 * then we should just turn on promiscous mode so
++			 * then we should just turn on promiscuous mode so
+ 			 * that we can at least receive multicast traffic
+ 			 */
+ 			count = igb_write_mc_addr_list(netdev);
+@@ -3399,7 +3399,7 @@ static void igb_set_rx_mode(struct net_device *netdev)
+ 		/*
+ 		 * Write addresses to available RAR registers, if there is not
+ 		 * sufficient space to store all the addresses then enable
+-		 * unicast promiscous mode
++		 * unicast promiscuous mode
+ 		 */
+ 		count = igb_write_uc_addr_list(netdev);
+ 		if (count < 0) {
+@@ -4281,7 +4281,7 @@ netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
+ 
+ 	/*
+ 	 * count reflects descriptors mapped, if 0 or less then mapping error
+-	 * has occured and we need to rewind the descriptor queue
++	 * has occurred and we need to rewind the descriptor queue
+ 	 */
+ 	count = igb_tx_map_adv(tx_ring, skb, first);
+ 	if (!count) {
+@@ -5228,8 +5228,8 @@ static void igb_msg_task(struct igb_adapter *adapter)
+  *  The unicast table address is a register array of 32-bit registers.
+  *  The table is meant to be used in a way similar to how the MTA is used
+  *  however due to certain limitations in the hardware it is necessary to
+- *  set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscous
+- *  enable bit to allow vlan tag stripping when promiscous mode is enabled
++ *  set all the hash bits to 1 and use the VMOLR ROPE bit as a promiscuous
++ *  enable bit to allow vlan tag stripping when promiscuous mode is enabled
+  **/
+ static void igb_set_uta(struct igb_adapter *adapter)
+ {
+diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
+index a163da1..72c99d7 100644
+--- a/drivers/net/igbvf/netdev.c
++++ b/drivers/net/igbvf/netdev.c
+@@ -2229,7 +2229,7 @@ static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb,
+ 
+ 	/*
+ 	 * count reflects descriptors mapped, if 0 then mapping error
+-	 * has occured and we need to rewind the descriptor queue
++	 * has occurred and we need to rewind the descriptor queue
+ 	 */
+ 	count = igbvf_tx_map_adv(adapter, tx_ring, skb, first);
+ 
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0183-igb-fix-typo-in-igb_validate_nvm_checksum_82580.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0183-igb-fix-typo-in-igb_validate_nvm_checksum_82580.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,39 @@
+From: Stefan Assmann <sassmann at kpanic.de>
+Date: Tue, 5 Apr 2011 04:27:05 +0000
+Subject: [PATCH 183/200] igb: fix typo in igb_validate_nvm_checksum_82580
+
+commit 34a0326e3aaf1d67fe3de55e77e92961c6a9a847 upstream.
+
+Comment spelling fix.
+
+Signed-off-by: Stefan Assmann <sassmann at kpanic.de>
+Tested-by:  Aaron Brown <aaron.f.brown at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_82575.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index 6b256c2..0cd41c4 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -1877,7 +1877,7 @@ static s32 igb_validate_nvm_checksum_82580(struct e1000_hw *hw)
+ 	}
+ 
+ 	if (nvm_data & NVM_COMPATIBILITY_BIT_MASK) {
+-		/* if chekcsums compatibility bit is set validate checksums
++		/* if checksums compatibility bit is set validate checksums
+ 		 * for all 4 ports. */
+ 		eeprom_regions_count = 4;
+ 	}
+@@ -1988,6 +1988,7 @@ static s32 igb_update_nvm_checksum_i350(struct e1000_hw *hw)
+ out:
+ 	return ret_val;
+ }
++
+ /**
+  *  igb_set_eee_i350 - Enable/disable EEE support
+  *  @hw: pointer to the HW structure
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0184-igb-introduce-igb_thermal_sensor_event-for-sensor-ch.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0184-igb-introduce-igb_thermal_sensor_event-for-sensor-ch.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,121 @@
+From: Stefan Assmann <sassmann at kpanic.de>
+Date: Tue, 5 Apr 2011 04:27:15 +0000
+Subject: [PATCH 184/200] igb: introduce igb_thermal_sensor_event for sensor
+ checking
+
+commit 563988dcfe706457ec7049d59e18d6147179bb0a upstream.
+
+The code for thermal sensor checking should be wrapped into a function.
+
+Signed-off-by: Stefan Assmann <sassmann at kpanic.de>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/igb_main.c |   67 ++++++++++++++++++++++---------------------
+ 1 files changed, 34 insertions(+), 33 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index e3ef41f..a07d3a3 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -3508,6 +3508,25 @@ bool igb_has_link(struct igb_adapter *adapter)
+ 	return link_active;
+ }
+ 
++static bool igb_thermal_sensor_event(struct e1000_hw *hw, u32 event)
++{
++	bool ret = false;
++	u32 ctrl_ext, thstat;
++
++	/* check for thermal sensor event on i350, copper only */
++	if (hw->mac.type == e1000_i350) {
++		thstat = rd32(E1000_THSTAT);
++		ctrl_ext = rd32(E1000_CTRL_EXT);
++
++		if ((hw->phy.media_type == e1000_media_type_copper) &&
++		    !(ctrl_ext & E1000_CTRL_EXT_LINK_MODE_SGMII)) {
++			ret = !!(thstat & event);
++		}
++	}
++
++	return ret;
++}
++
+ /**
+  * igb_watchdog - Timer Call-back
+  * @data: pointer to adapter cast into an unsigned long
+@@ -3526,7 +3545,7 @@ static void igb_watchdog_task(struct work_struct *work)
+                                                    watchdog_task);
+ 	struct e1000_hw *hw = &adapter->hw;
+ 	struct net_device *netdev = adapter->netdev;
+-	u32 link, ctrl_ext, thstat;
++	u32 link;
+ 	int i;
+ 
+ 	link = igb_has_link(adapter);
+@@ -3550,25 +3569,14 @@ static void igb_watchdog_task(struct work_struct *work)
+ 			       ((ctrl & E1000_CTRL_RFCE) ?  "RX" :
+ 			       ((ctrl & E1000_CTRL_TFCE) ?  "TX" : "None")));
+ 
+-			/* check for thermal sensor event on i350,
+-			 * copper only */
+-			if (hw->mac.type == e1000_i350) {
+-				thstat = rd32(E1000_THSTAT);
+-				ctrl_ext = rd32(E1000_CTRL_EXT);
+-				if ((hw->phy.media_type ==
+-				     e1000_media_type_copper) && !(ctrl_ext &
+-				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
+-					if (thstat &
+-					    E1000_THSTAT_LINK_THROTTLE) {
+-						printk(KERN_INFO "igb: %s The "
+-						       "network adapter link "
+-						       "speed was downshifted "
+-						       "because it "
+-						       "overheated.\n",
+-						       netdev->name);
+-					}
+-				}
++			/* check for thermal sensor event */
++			if (igb_thermal_sensor_event(hw, E1000_THSTAT_LINK_THROTTLE)) {
++				printk(KERN_INFO "igb: %s The network adapter "
++						 "link speed was downshifted "
++						 "because it overheated.\n",
++						 netdev->name);
+ 			}
++
+ 			/* adjust timeout factor according to speed/duplex */
+ 			adapter->tx_timeout_factor = 1;
+ 			switch (adapter->link_speed) {
+@@ -3593,22 +3601,15 @@ static void igb_watchdog_task(struct work_struct *work)
+ 		if (netif_carrier_ok(netdev)) {
+ 			adapter->link_speed = 0;
+ 			adapter->link_duplex = 0;
+-			/* check for thermal sensor event on i350
+-			 * copper only*/
+-			if (hw->mac.type == e1000_i350) {
+-				thstat = rd32(E1000_THSTAT);
+-				ctrl_ext = rd32(E1000_CTRL_EXT);
+-				if ((hw->phy.media_type ==
+-				     e1000_media_type_copper) && !(ctrl_ext &
+-				     E1000_CTRL_EXT_LINK_MODE_SGMII)) {
+-					if (thstat & E1000_THSTAT_PWR_DOWN) {
+-						printk(KERN_ERR "igb: %s The "
+-						"network adapter was stopped "
+-						"because it overheated.\n",
++
++			/* check for thermal sensor event */
++			if (igb_thermal_sensor_event(hw, E1000_THSTAT_PWR_DOWN)) {
++				printk(KERN_ERR "igb: %s The network adapter "
++						"was stopped because it "
++						"overheated.\n",
+ 						netdev->name);
+-					}
+-				}
+ 			}
++
+ 			/* Links status message must follow this format */
+ 			printk(KERN_INFO "igb: %s NIC Link is Down\n",
+ 			       netdev->name);
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0185-ethtool-Use-full-32-bit-speed-range-in-ethtool-s-set.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0185-ethtool-Use-full-32-bit-speed-range-in-ethtool-s-set.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,38 @@
+From: David Decotigny <decot at google.com>
+Date: Wed, 27 Apr 2011 18:32:39 +0000
+Subject: [PATCH 185/200] ethtool: Use full 32 bit speed range in ethtool's
+ set_settings
+
+commit 25db0338813a8915457636b1f6abe6a28fa73f8d upstream.
+
+This makes sure the ethtool's set_settings() callback of network
+drivers don't ignore the 16 most significant bits when ethtool calls
+their set_settings().
+
+All drivers compiled with make allyesconfig on x86_64 have been
+updated.
+
+Signed-off-by: David Decotigny <decot at google.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igb/igb_ethtool.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 4957751..5b79252 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -222,7 +222,8 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ 		if (adapter->fc_autoneg)
+ 			hw->fc.requested_mode = e1000_fc_default;
+ 	} else {
+-		if (igb_set_spd_dplx(adapter, ecmd->speed + ecmd->duplex)) {
++		u32 speed = ethtool_cmd_speed(ecmd);
++		if (igb_set_spd_dplx(adapter, speed + ecmd->duplex)) {
+ 			clear_bit(__IGB_RESETTING, &adapter->state);
+ 			return -EINVAL;
+ 		}
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0186-ethtool-cosmetic-Use-ethtool-ethtool_cmd_speed-API.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0186-ethtool-cosmetic-Use-ethtool-ethtool_cmd_speed-API.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,87 @@
+From: David Decotigny <decot at google.com>
+Date: Wed, 27 Apr 2011 18:32:40 +0000
+Subject: [PATCH 186/200] ethtool: cosmetic: Use ethtool ethtool_cmd_speed API
+
+commit 707394972093e2056e1e8cc39be19cf9bcb3e7b3 upstream.
+
+This updates the network drivers so that they don't access the
+ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
+instead.
+
+For most of the drivers, these changes are purely cosmetic and don't
+fix any problem, such as for those 1GbE/10GbE drivers that indirectly
+call their own ethtool get_settings()/mii_ethtool_gset(). The changes
+are meant to enforce code consistency and provide robustness with
+future larger throughputs, at the expense of a few CPU cycles for each
+ethtool operation.
+
+All drivers compiled with make allyesconfig ion x86_64 have been
+updated.
+
+Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
+Signed-off-by: David Decotigny <decot at google.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igb/igb_ethtool.c |    8 ++++----
+ drivers/net/igbvf/ethtool.c   |    8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index 5b79252..d9fa8e7 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -177,11 +177,11 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ 
+ 		if ((status & E1000_STATUS_SPEED_1000) ||
+ 		    hw->phy.media_type != e1000_media_type_copper)
+-			ecmd->speed = SPEED_1000;
++			ethtool_cmd_speed_set(ecmd, SPEED_1000);
+ 		else if (status & E1000_STATUS_SPEED_100)
+-			ecmd->speed = SPEED_100;
++			ethtool_cmd_speed_set(ecmd, SPEED_100);
+ 		else
+-			ecmd->speed = SPEED_10;
++			ethtool_cmd_speed_set(ecmd, SPEED_10);
+ 
+ 		if ((status & E1000_STATUS_FD) ||
+ 		    hw->phy.media_type != e1000_media_type_copper)
+@@ -189,7 +189,7 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ 		else
+ 			ecmd->duplex = DUPLEX_HALF;
+ 	} else {
+-		ecmd->speed = -1;
++		ethtool_cmd_speed_set(ecmd, -1);
+ 		ecmd->duplex = -1;
+ 	}
+ 
+diff --git a/drivers/net/igbvf/ethtool.c b/drivers/net/igbvf/ethtool.c
+index 79cb65f..e2e9d03 100644
+--- a/drivers/net/igbvf/ethtool.c
++++ b/drivers/net/igbvf/ethtool.c
+@@ -90,18 +90,18 @@ static int igbvf_get_settings(struct net_device *netdev,
+ 	status = er32(STATUS);
+ 	if (status & E1000_STATUS_LU) {
+ 		if (status & E1000_STATUS_SPEED_1000)
+-			ecmd->speed = 1000;
++			ethtool_cmd_speed_set(ecmd, SPEED_1000);
+ 		else if (status & E1000_STATUS_SPEED_100)
+-			ecmd->speed = 100;
++			ethtool_cmd_speed_set(ecmd, SPEED_100);
+ 		else
+-			ecmd->speed = 10;
++			ethtool_cmd_speed_set(ecmd, SPEED_10);
+ 
+ 		if (status & E1000_STATUS_FD)
+ 			ecmd->duplex = DUPLEX_FULL;
+ 		else
+ 			ecmd->duplex = DUPLEX_HALF;
+ 	} else {
+-		ecmd->speed = -1;
++		ethtool_cmd_speed_set(ecmd, -1);
+ 		ecmd->duplex = -1;
+ 	}
+ 
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0187-net-igb-e1000-e1000e-more-robust-ethtool-duplex-spee.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0187-net-igb-e1000-e1000e-more-robust-ethtool-duplex-spee.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,102 @@
+From: David Decotigny <decot at google.com>
+Date: Wed, 27 Apr 2011 18:32:43 +0000
+Subject: [PATCH 187/200] net/igb/e1000/e1000e: more robust ethtool
+ duplex/speed configuration
+
+commit 14ad2513ed5b709e566a853f4b515d91c5d83311 upstream.
+
+This makes sure that one cannot request a 99Mbps full-duplex and get a
+100Mbps half-duplex configuration in return due to the way the
+speed/duplex parameters are handled internally.
+
+Tested: e1000 works
+Signed-off-by: David Decotigny <decot at google.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igb/igb.h         |    2 +-
+ drivers/net/igb/igb_ethtool.c |    2 +-
+ drivers/net/igb/igb_main.c    |   23 +++++++++++++++--------
+ 3 files changed, 17 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h
+index 977c33da..229c59c 100644
+--- a/drivers/net/igb/igb.h
++++ b/drivers/net/igb/igb.h
+@@ -348,7 +348,7 @@ extern int igb_up(struct igb_adapter *);
+ extern void igb_down(struct igb_adapter *);
+ extern void igb_reinit_locked(struct igb_adapter *);
+ extern void igb_reset(struct igb_adapter *);
+-extern int igb_set_spd_dplx(struct igb_adapter *, u16);
++extern int igb_set_spd_dplx(struct igb_adapter *, u32, u8);
+ extern int igb_setup_tx_resources(struct igb_ring *);
+ extern int igb_setup_rx_resources(struct igb_ring *);
+ extern void igb_free_tx_resources(struct igb_ring *);
+diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
+index d9fa8e7..18eafa0 100644
+--- a/drivers/net/igb/igb_ethtool.c
++++ b/drivers/net/igb/igb_ethtool.c
+@@ -223,7 +223,7 @@ static int igb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
+ 			hw->fc.requested_mode = e1000_fc_default;
+ 	} else {
+ 		u32 speed = ethtool_cmd_speed(ecmd);
+-		if (igb_set_spd_dplx(adapter, speed + ecmd->duplex)) {
++		if (igb_set_spd_dplx(adapter, speed, ecmd->duplex)) {
+ 			clear_bit(__IGB_RESETTING, &adapter->state);
+ 			return -EINVAL;
+ 		}
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index a07d3a3..23609b6 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -6208,21 +6208,25 @@ static void igb_restore_vlan(struct igb_adapter *adapter)
+ 	}
+ }
+ 
+-int igb_set_spd_dplx(struct igb_adapter *adapter, u16 spddplx)
++int igb_set_spd_dplx(struct igb_adapter *adapter, u32 spd, u8 dplx)
+ {
+ 	struct pci_dev *pdev = adapter->pdev;
+ 	struct e1000_mac_info *mac = &adapter->hw.mac;
+ 
+ 	mac->autoneg = 0;
+ 
++	/* Make sure dplx is at most 1 bit and lsb of speed is not set
++	 * for the switch() below to work */
++	if ((spd & 1) || (dplx & ~1))
++		goto err_inval;
++
+ 	/* Fiber NIC's only allow 1000 Gbps Full duplex */
+ 	if ((adapter->hw.phy.media_type == e1000_media_type_internal_serdes) &&
+-		spddplx != (SPEED_1000 + DUPLEX_FULL)) {
+-		dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration\n");
+-		return -EINVAL;
+-	}
++	    spd != SPEED_1000 &&
++	    dplx != DUPLEX_FULL)
++		goto err_inval;
+ 
+-	switch (spddplx) {
++	switch (spd + dplx) {
+ 	case SPEED_10 + DUPLEX_HALF:
+ 		mac->forced_speed_duplex = ADVERTISE_10_HALF;
+ 		break;
+@@ -6241,10 +6245,13 @@ int igb_set_spd_dplx(struct igb_adapter *adapter, u16 spddplx)
+ 		break;
+ 	case SPEED_1000 + DUPLEX_HALF: /* not supported */
+ 	default:
+-		dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration\n");
+-		return -EINVAL;
++		goto err_inval;
+ 	}
+ 	return 0;
++
++err_inval:
++	dev_err(&pdev->dev, "Unsupported Speed/Duplex configuration\n");
++	return -EINVAL;
+ }
+ 
+ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake)
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0188-igb-Add-check-for-invalid-size-to-igb_get_invariants.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0188-igb-Add-check-for-invalid-size-to-igb_get_invariants.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,42 @@
+From: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Date: Wed, 4 May 2011 04:29:51 +0000
+Subject: [PATCH 188/200] igb: Add check for invalid size to
+ igb_get_invariants_82575()
+
+commit f6b1bfd17d42f9dc1d799b7e0eed817ed75005ec upstream.
+
+Recent commits have changed how EEPROM size is checked and if the size
+word is misconfigured, the driver will fail to load.  This patch adds a
+check for invalid size word in the EEPROM and uses default size instead
+for 82576 parts.
+
+Reported-by: Stefan Assmann <sassmann at redhat.com>
+Signed-off-by: Carolyn Wyborny <carolyn.wyborny at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igb/e1000_82575.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c
+index 0cd41c4..0f563c8 100644
+--- a/drivers/net/igb/e1000_82575.c
++++ b/drivers/net/igb/e1000_82575.c
+@@ -244,6 +244,14 @@ static s32 igb_get_invariants_82575(struct e1000_hw *hw)
+ 	 */
+ 	size += NVM_WORD_SIZE_BASE_SHIFT;
+ 
++	/*
++	 * Check for invalid size
++	 */
++	if ((hw->mac.type == e1000_82576) && (size > 15)) {
++		printk("igb: The NVM size is not valid, "
++			"defaulting to 32K.\n");
++		size = 15;
++	}
+ 	nvm->word_size = 1 << size;
+ 	if (nvm->word_size == (1 << 15))
+ 		nvm->page_size = 128;
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0189-igbvf-remove-bogus-phys_id.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0189-igbvf-remove-bogus-phys_id.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,43 @@
+From: stephen hemminger <shemminger at vyatta.com>
+Date: Tue, 5 Apr 2011 04:26:27 +0000
+Subject: [PATCH 189/200] igbvf: remove bogus phys_id
+
+commit 97322b3303a1de979b973dc1d0a43091f27258ac upstream.
+
+This device lies about supporting phys_id. Remove it and just
+let the upper layer report not supported.
+
+Signed-off-by: Stephen Hemminger <shemminger at vyatta.com>
+Tested-by: <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+---
+ drivers/net/igbvf/ethtool.c |    6 ------
+ 1 files changed, 0 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/net/igbvf/ethtool.c b/drivers/net/igbvf/ethtool.c
+index e2e9d03..6072aa6 100644
+--- a/drivers/net/igbvf/ethtool.c
++++ b/drivers/net/igbvf/ethtool.c
+@@ -396,11 +396,6 @@ static int igbvf_set_wol(struct net_device *netdev,
+ 	return -EOPNOTSUPP;
+ }
+ 
+-static int igbvf_phys_id(struct net_device *netdev, u32 data)
+-{
+-	return 0;
+-}
+-
+ static int igbvf_get_coalesce(struct net_device *netdev,
+                               struct ethtool_coalesce *ec)
+ {
+@@ -532,7 +527,6 @@ static const struct ethtool_ops igbvf_ethtool_ops = {
+ 	.self_test		= igbvf_diag_test,
+ 	.get_sset_count		= igbvf_get_sset_count,
+ 	.get_strings		= igbvf_get_strings,
+-	.phys_id		= igbvf_phys_id,
+ 	.get_ethtool_stats	= igbvf_get_ethtool_stats,
+ 	.get_coalesce		= igbvf_get_coalesce,
+ 	.set_coalesce		= igbvf_set_coalesce,
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0190-Add-appropriate-linux-prefetch.h-include-for-prefetc.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0190-Add-appropriate-linux-prefetch.h-include-for-prefetc.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,74 @@
+From: Paul Gortmaker <paul.gortmaker at windriver.com>
+Date: Sun, 22 May 2011 16:47:17 -0400
+Subject: [PATCH 190/200] Add appropriate <linux/prefetch.h> include for
+ prefetch users
+
+commit 70c71606190e9115e5f8363bfcd164c582eb314a upstream.
+
+After discovering that wide use of prefetch on modern CPUs
+could be a net loss instead of a win, net drivers which were
+relying on the implicit inclusion of prefetch.h via the list
+headers showed up in the resulting cleanup fallout.  Give
+them an explicit include via the following $0.02 script.
+
+ =========================================
+ #!/bin/bash
+ MANUAL=""
+ for i in `git grep -l 'prefetch(.*)' .` ; do
+ 	grep -q '<linux/prefetch.h>' $i
+ 	if [ $? = 0 ] ; then
+ 		continue
+ 	fi
+
+ 	(	echo '?^#include <linux/?a'
+ 		echo '#include <linux/prefetch.h>'
+ 		echo .
+ 		echo w
+ 		echo q
+ 	) | ed -s $i > /dev/null 2>&1
+ 	if [ $? != 0 ]; then
+ 		echo $i needs manual fixup
+ 		MANUAL="$i $MANUAL"
+ 	fi
+ done
+ echo ------------------- 8\<----------------------
+ echo vi $MANUAL
+ =========================================
+
+Signed-off-by: Paul <paul.gortmaker at windriver.com>
+[ Fixed up some incorrect #include placements, and added some
+  non-network drivers and the fib_trie.c case    - Linus ]
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+[bwh: Restricted to drivers/net/igb{,vf}/]
+---
+ drivers/net/igb/igb_main.c |    1 +
+ drivers/net/igbvf/netdev.c |    1 +
+ 2 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 23609b6..9914902 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -45,6 +45,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/if_ether.h>
+ #include <linux/aer.h>
++#include <linux/prefetch.h>
+ #ifdef CONFIG_IGB_DCA
+ #include <linux/dca.h>
+ #endif
+diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
+index 72c99d7..d9323d0 100644
+--- a/drivers/net/igbvf/netdev.c
++++ b/drivers/net/igbvf/netdev.c
+@@ -41,6 +41,7 @@
+ #include <linux/mii.h>
+ #include <linux/ethtool.h>
+ #include <linux/if_vlan.h>
++#include <linux/prefetch.h>
+ 
+ #include "igbvf.h"
+ 
+-- 
+1.7.5.4
+

Added: dists/squeeze/linux-2.6/debian/patches/features/all/igb/0191-igb-fix-i350-SR-IOV-failture.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ dists/squeeze/linux-2.6/debian/patches/features/all/igb/0191-igb-fix-i350-SR-IOV-failture.patch	Mon Aug 15 00:11:56 2011	(r17923)
@@ -0,0 +1,41 @@
+From: "Williams, Mitch A" <mitch.a.williams at intel.com>
+Date: Tue, 7 Jun 2011 14:22:57 -0700
+Subject: [PATCH 191/200] igb: fix i350 SR-IOV failture
+
+commit 665c8c8ee405738375b679246b49342ce38ba056 upstream.
+
+When SR-IOV is enabled, i350 devices fail to pass traffic. This is due to
+the driver attempting to enable RSS on the PF device, which is not
+supported by the i350.
+
+When max_vfs is specified on an i350 adapter, set the number of RSS queues
+to 1.
+
+This issue affects 2.6.39 as well.
+
+CC: stable at kernel.org
+Signed-off-by: Mitch Williams <mitch.a.williams at intel.com>
+Tested-by: Jeff Pieper <jeffrey.e.pieper at intel.com>
+Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher at intel.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/igb/igb_main.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
+index 9914902..044e8f2 100644
+--- a/drivers/net/igb/igb_main.c
++++ b/drivers/net/igb/igb_main.c
+@@ -2352,6 +2352,9 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
+ 	}
+ #endif /* CONFIG_PCI_IOV */
+ 	adapter->rss_queues = min_t(u32, IGB_MAX_RX_QUEUES, num_online_cpus());
++	/* i350 cannot do RSS and SR-IOV at the same time */
++	if (hw->mac.type == e1000_i350 && adapter->vfs_allocated_count)
++		adapter->rss_queues = 1;
+ 
+ 	/*
+ 	 * if rss_queues > 4 or vfs are going to be allocated with rss_queues
+-- 
+1.7.5.4
+

Modified: dists/squeeze/linux-2.6/debian/patches/series/36
==============================================================================
--- dists/squeeze/linux-2.6/debian/patches/series/36	Sun Aug 14 22:55:28 2011	(r17922)
+++ dists/squeeze/linux-2.6/debian/patches/series/36	Mon Aug 15 00:11:56 2011	(r17923)
@@ -355,6 +355,32 @@
 + features/all/igb/0163-igbvf-add-support-for-i350-VF-device.patch
 + features/all/igb/0164-igb-fix-sparse-warning.patch
 + features/all/igb/0165-Revert-r8169-Fix-up-backport-of-r8169-keep-firmware-.patch
++ features/all/igb/0166-igb-Add-support-for-i340-Quad-Port-Fiber-Adapter.patch
++ features/all/igb/0167-igb-Enable-PF-side-of-SR-IOV-support-for-i350-device.patch
++ features/all/igb/0168-igbvf-remove-Tx-hang-detection.patch
++ features/all/igb/0169-igb-Update-Intel-copyright-notice-for-driver-source.patch
++ features/all/igb/0170-igb-update-version-string.patch
++ features/all/igb/0171-net-use-pci_dev-revision-again.patch
++ features/all/igb/0172-igb-warn-if-max_vfs-limit-is-exceeded.patch
++ features/all/igb/0173-igb-Fix-reg-pattern-test-in-ethtool-for-i350-devices.patch
++ features/all/igb/0174-igb-Fix-strncpy-calls-to-be-safe-per-source-code-rev.patch
++ features/all/igb/0175-igb-Add-stats-output-for-OS2BMC-feature-on-i350-devi.patch
++ features/all/igb/0176-igb-Add-Energy-Efficient-Ethernet-EEE-for-i350-devic.patch
++ features/all/igb/0177-igb-Update-NVM-functions-to-work-with-i350-devices.patch
++ features/all/igb/0178-igb-Add-DMA-Coalescing-feature-to-driver.patch
++ features/all/igb/0179-igb-Bump-version-to-3.0.6.patch
++ features/all/igb/0180-igb-fix-hw-timestamping.patch
++ features/all/igb/0181-igb-Add-messaging-for-thermal-sensor-events-on-i350-.patch
++ features/all/igb/0182-Fix-common-misspellings.patch
++ features/all/igb/0183-igb-fix-typo-in-igb_validate_nvm_checksum_82580.patch
++ features/all/igb/0184-igb-introduce-igb_thermal_sensor_event-for-sensor-ch.patch
++ features/all/igb/0185-ethtool-Use-full-32-bit-speed-range-in-ethtool-s-set.patch
++ features/all/igb/0186-ethtool-cosmetic-Use-ethtool-ethtool_cmd_speed-API.patch
++ features/all/igb/0187-net-igb-e1000-e1000e-more-robust-ethtool-duplex-spee.patch
++ features/all/igb/0188-igb-Add-check-for-invalid-size-to-igb_get_invariants.patch
++ features/all/igb/0189-igbvf-remove-bogus-phys_id.patch
++ features/all/igb/0190-Add-appropriate-linux-prefetch.h-include-for-prefetc.patch
++ features/all/igb/0191-igb-fix-i350-SR-IOV-failture.patch
 - bugfix/all/r8169-keep-firmware-in-memory.patch
 - features/all/r8169-remove-the-firmware-of-RTL8111D-2.patch
 + features/all/r8169/0001-net-Use-netdev_alloc_skb_ip_align.patch



More information about the Kernel-svn-changes mailing list