netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2012-11-21 10:47 Jeff Kirsher
  2012-11-21 10:47 ` [net-next 01/10] ixgbe: Reformat output of ixgbe_dump Jeff Kirsher
                   ` (9 more replies)
  0 siblings, 10 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to ixgbe and igb.

The following are changes since commit de4594a51c904ddcd6c3a6cdd100f7c1d94d3239:
  sctp: send abort chunk when max_retrans exceeded
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Alexander Duyck (1):
  igb: Do not parse past IP header on fragments beyond the first

Jacob Keller (3):
  ixgbe: use ETQF filter name instead of magic number
  ixgbe: remove needless queuing for L4 ptp packets
  ixgbe: ethtool correctly identify autoneg setting

John Fastabend (1):
  ixgbe: fdb: only allow NUD_PERM fdb entries

Josh Hay (2):
  ixgbe: Reformat output of ixgbe_dump
  ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c

Matthew Vick (2):
  igb: Update PTP Rx filters
  igb: No longer rely on APME to determine WoL settings

Wei Yongjun (1):
  ixgbe: convert to use simple_open()

 drivers/net/ethernet/intel/igb/igb.h             |   3 +-
 drivers/net/ethernet/intel/igb/igb_ethtool.c     |  56 +----------
 drivers/net/ethernet/intel/igb/igb_main.c        |  51 ++++++----
 drivers/net/ethernet/intel/igb/igb_ptp.c         |  47 ++++-----
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |   3 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h  |   1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 115 ++++++++++-------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |   5 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  83 +++++++++-------
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c     |  40 +-------
 10 files changed, 163 insertions(+), 241 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 01/10] ixgbe: Reformat output of ixgbe_dump
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 02/10] ixgbe: convert to use simple_open() Jeff Kirsher
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Josh Hay, netdev, gospo, sassmann, Jeff Kirsher

From: Josh Hay <joshua.a.hay@intel.com>

Reformats the output of the Tx/Rx descriptor dumps to more
appropriately align the output of the ixgbe_dump and improve readability.
Prevents empty Tx descriptors from being displayed to decrease the size
of the dump and make it more manageable.

Signed-off-by: Josh Hay <joshua.a.hay@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 75 +++++++++++++++------------
 1 file changed, 41 insertions(+), 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 38fc186..004ea6c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -336,11 +336,13 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
 		goto exit;
 
 	dev_info(&adapter->pdev->dev, "TX Rings Summary\n");
-	pr_info("Queue [NTU] [NTC] [bi(ntc)->dma  ] leng ntw timestamp\n");
+	pr_info(" %s     %s              %s        %s\n",
+		"Queue [NTU] [NTC] [bi(ntc)->dma  ]",
+		"leng", "ntw", "timestamp");
 	for (n = 0; n < adapter->num_tx_queues; n++) {
 		tx_ring = adapter->tx_ring[n];
 		tx_buffer = &tx_ring->tx_buffer_info[tx_ring->next_to_clean];
-		pr_info(" %5d %5X %5X %016llX %04X %p %016llX\n",
+		pr_info(" %5d %5X %5X %016llX %08X %p %016llX\n",
 			   n, tx_ring->next_to_use, tx_ring->next_to_clean,
 			   (u64)dma_unmap_addr(tx_buffer, dma),
 			   dma_unmap_len(tx_buffer, len),
@@ -394,40 +396,43 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
 		pr_info("------------------------------------\n");
 		pr_info("TX QUEUE INDEX = %d\n", tx_ring->queue_index);
 		pr_info("------------------------------------\n");
-		pr_info("T [desc]     [address 63:0  ] "
-			"[PlPOIdStDDt Ln] [bi->dma       ] "
-			"leng  ntw timestamp        bi->skb\n");
+		pr_info("%s%s    %s              %s        %s          %s\n",
+			"T [desc]     [address 63:0  ] ",
+			"[PlPOIdStDDt Ln] [bi->dma       ] ",
+			"leng", "ntw", "timestamp", "bi->skb");
 
 		for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) {
 			tx_desc = IXGBE_TX_DESC(tx_ring, i);
 			tx_buffer = &tx_ring->tx_buffer_info[i];
 			u0 = (struct my_u0 *)tx_desc;
-			pr_info("T [0x%03X]    %016llX %016llX %016llX"
-				" %04X  %p %016llX %p", i,
-				le64_to_cpu(u0->a),
-				le64_to_cpu(u0->b),
-				(u64)dma_unmap_addr(tx_buffer, dma),
-				dma_unmap_len(tx_buffer, len),
-				tx_buffer->next_to_watch,
-				(u64)tx_buffer->time_stamp,
-				tx_buffer->skb);
-			if (i == tx_ring->next_to_use &&
-				i == tx_ring->next_to_clean)
-				pr_cont(" NTC/U\n");
-			else if (i == tx_ring->next_to_use)
-				pr_cont(" NTU\n");
-			else if (i == tx_ring->next_to_clean)
-				pr_cont(" NTC\n");
-			else
-				pr_cont("\n");
-
-			if (netif_msg_pktdata(adapter) &&
-			    tx_buffer->skb)
-				print_hex_dump(KERN_INFO, "",
-					DUMP_PREFIX_ADDRESS, 16, 1,
-					tx_buffer->skb->data,
+			if (dma_unmap_len(tx_buffer, len) > 0) {
+				pr_info("T [0x%03X]    %016llX %016llX %016llX %08X %p %016llX %p",
+					i,
+					le64_to_cpu(u0->a),
+					le64_to_cpu(u0->b),
+					(u64)dma_unmap_addr(tx_buffer, dma),
 					dma_unmap_len(tx_buffer, len),
-					true);
+					tx_buffer->next_to_watch,
+					(u64)tx_buffer->time_stamp,
+					tx_buffer->skb);
+				if (i == tx_ring->next_to_use &&
+					i == tx_ring->next_to_clean)
+					pr_cont(" NTC/U\n");
+				else if (i == tx_ring->next_to_use)
+					pr_cont(" NTU\n");
+				else if (i == tx_ring->next_to_clean)
+					pr_cont(" NTC\n");
+				else
+					pr_cont("\n");
+
+				if (netif_msg_pktdata(adapter) &&
+				    tx_buffer->skb)
+					print_hex_dump(KERN_INFO, "",
+						DUMP_PREFIX_ADDRESS, 16, 1,
+						tx_buffer->skb->data,
+						dma_unmap_len(tx_buffer, len),
+						true);
+			}
 		}
 	}
 
@@ -497,11 +502,13 @@ rx_ring_summary:
 		pr_info("------------------------------------\n");
 		pr_info("RX QUEUE INDEX = %d\n", rx_ring->queue_index);
 		pr_info("------------------------------------\n");
-		pr_info("R  [desc]      [ PktBuf     A0] "
-			"[  HeadBuf   DD] [bi->dma       ] [bi->skb] "
+		pr_info("%s%s%s",
+			"R  [desc]      [ PktBuf     A0] ",
+			"[  HeadBuf   DD] [bi->dma       ] [bi->skb       ] ",
 			"<-- Adv Rx Read format\n");
-		pr_info("RWB[desc]      [PcsmIpSHl PtRs] "
-			"[vl er S cks ln] ---------------- [bi->skb] "
+		pr_info("%s%s%s",
+			"RWB[desc]      [PcsmIpSHl PtRs] ",
+			"[vl er S cks ln] ---------------- [bi->skb       ] ",
 			"<-- Adv Rx Write-Back format\n");
 
 		for (i = 0; i < rx_ring->count; i++) {
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 02/10] ixgbe: convert to use simple_open()
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2012-11-21 10:47 ` [net-next 01/10] ixgbe: Reformat output of ixgbe_dump Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 03/10] ixgbe: use ETQF filter name instead of magic number Jeff Kirsher
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Wei Yongjun, netdev, gospo, sassmann, Jeff Kirsher

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 32 ++----------------------
 1 file changed, 2 insertions(+), 30 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
index 8d3a218..efaf9a7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
@@ -37,20 +37,6 @@ static struct dentry *ixgbe_dbg_root;
 static char ixgbe_dbg_reg_ops_buf[256] = "";
 
 /**
- * ixgbe_dbg_reg_ops_open - prep the debugfs pokee data item when opened
- * @inode: inode that was opened
- * @filp:  file info
- *
- * Stash the adapter pointer hiding in the inode into the file pointer where
- * we can find it later in the read and write calls
- **/
-static int ixgbe_dbg_reg_ops_open(struct inode *inode, struct file *filp)
-{
-	filp->private_data = inode->i_private;
-	return 0;
-}
-
-/**
  * ixgbe_dbg_reg_ops_read - read for reg_ops datum
  * @filp: the opened file
  * @buffer: where to write the data for the user to read
@@ -142,7 +128,7 @@ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp,
 
 static const struct file_operations ixgbe_dbg_reg_ops_fops = {
 	.owner = THIS_MODULE,
-	.open =  ixgbe_dbg_reg_ops_open,
+	.open = simple_open,
 	.read =  ixgbe_dbg_reg_ops_read,
 	.write = ixgbe_dbg_reg_ops_write,
 };
@@ -150,20 +136,6 @@ static const struct file_operations ixgbe_dbg_reg_ops_fops = {
 static char ixgbe_dbg_netdev_ops_buf[256] = "";
 
 /**
- * ixgbe_dbg_netdev_ops_open - prep the debugfs netdev_ops data item
- * @inode: inode that was opened
- * @filp: file info
- *
- * Stash the adapter pointer hiding in the inode into the file pointer
- * where we can find it later in the read and write calls
- **/
-static int ixgbe_dbg_netdev_ops_open(struct inode *inode, struct file *filp)
-{
-	filp->private_data = inode->i_private;
-	return 0;
-}
-
-/**
  * ixgbe_dbg_netdev_ops_read - read for netdev_ops datum
  * @filp: the opened file
  * @buffer: where to write the data for the user to read
@@ -238,7 +210,7 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
 
 static const struct file_operations ixgbe_dbg_netdev_ops_fops = {
 	.owner = THIS_MODULE,
-	.open = ixgbe_dbg_netdev_ops_open,
+	.open = simple_open,
 	.read = ixgbe_dbg_netdev_ops_read,
 	.write = ixgbe_dbg_netdev_ops_write,
 };
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 03/10] ixgbe: use ETQF filter name instead of magic number
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2012-11-21 10:47 ` [net-next 01/10] ixgbe: Reformat output of ixgbe_dump Jeff Kirsher
  2012-11-21 10:47 ` [net-next 02/10] ixgbe: convert to use simple_open() Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 04/10] ixgbe: remove needless queuing for L4 ptp packets Jeff Kirsher
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch removes a magic number that was used for the ETQF used for
filtering L2 ptp packets and replaces it with the supplied define that
previously existed. The intent is to clarify that this filter is already
set aside for L2 1588 work.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 01d99af..29ca293 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -704,14 +704,14 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
 	/* Store filter value for later use */
 	adapter->rx_hwtstamp_filter = config.rx_filter;
 
-	/* define ethertype filter for timestamped packets */
+	/* define ethertype filter for timestamping L2 packets */
 	if (is_l2)
-		IXGBE_WRITE_REG(hw, IXGBE_ETQF(3),
+		IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588),
 				(IXGBE_ETQF_FILTER_EN | /* enable filter */
 				 IXGBE_ETQF_1588 | /* enable timestamping */
 				 ETH_P_1588));     /* 1588 eth protocol type */
 	else
-		IXGBE_WRITE_REG(hw, IXGBE_ETQF(3), 0);
+		IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588), 0);
 
 #define PTP_PORT 319
 	/* L4 Queue Filter[3]: filter by destination port and protocol */
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 04/10] ixgbe: remove needless queuing for L4 ptp packets
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (2 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 03/10] ixgbe: use ETQF filter name instead of magic number Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 05/10] ixgbe: ethtool correctly identify autoneg setting Jeff Kirsher
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch removes the queuing that was previously done for L4 packets
as it is not needed. The filter does not provide functionality, and it
is possible that queue setup here could trample settings done else-where
in the driver. (for example it may use a queue which isn't setup.)
Setting of the queue is not required for hardware timestamping and could
have inadverdent side effects.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 34 ++--------------------------
 1 file changed, 2 insertions(+), 32 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 29ca293..1a751c9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -633,8 +633,7 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
 	struct hwtstamp_config config;
 	u32 tsync_tx_ctl = IXGBE_TSYNCTXCTL_ENABLED;
 	u32 tsync_rx_ctl = IXGBE_TSYNCRXCTL_ENABLED;
-	u32 tsync_rx_mtrl = 0;
-	bool is_l4 = false;
+	u32 tsync_rx_mtrl = PTP_EV_PORT << 16;
 	bool is_l2 = false;
 	u32 regval;
 
@@ -657,16 +656,15 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
 	switch (config.rx_filter) {
 	case HWTSTAMP_FILTER_NONE:
 		tsync_rx_ctl = 0;
+		tsync_rx_mtrl = 0;
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_L4_V1;
 		tsync_rx_mtrl = IXGBE_RXMTRL_V1_SYNC_MSG;
-		is_l4 = true;
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_L4_V1;
 		tsync_rx_mtrl = IXGBE_RXMTRL_V1_DELAY_REQ_MSG;
-		is_l4 = true;
 		break;
 	case HWTSTAMP_FILTER_PTP_V2_EVENT:
 	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
@@ -679,7 +677,6 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
 	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
 		tsync_rx_ctl |= IXGBE_TSYNCRXCTL_TYPE_EVENT_V2;
 		is_l2 = true;
-		is_l4 = true;
 		config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
 		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
@@ -713,33 +710,6 @@ int ixgbe_ptp_hwtstamp_ioctl(struct ixgbe_adapter *adapter,
 	else
 		IXGBE_WRITE_REG(hw, IXGBE_ETQF(IXGBE_ETQF_FILTER_1588), 0);
 
-#define PTP_PORT 319
-	/* L4 Queue Filter[3]: filter by destination port and protocol */
-	if (is_l4) {
-		u32 ftqf = (IXGBE_FTQF_PROTOCOL_UDP /* UDP */
-			    | IXGBE_FTQF_POOL_MASK_EN /* Pool not compared */
-			    | IXGBE_FTQF_QUEUE_ENABLE);
-
-		ftqf |= ((IXGBE_FTQF_PROTOCOL_COMP_MASK /* protocol check */
-			  & IXGBE_FTQF_DEST_PORT_MASK /* dest check */
-			  & IXGBE_FTQF_SOURCE_PORT_MASK) /* source check */
-			 << IXGBE_FTQF_5TUPLE_MASK_SHIFT);
-
-		IXGBE_WRITE_REG(hw, IXGBE_L34T_IMIR(3),
-				(3 << IXGBE_IMIR_RX_QUEUE_SHIFT_82599 |
-				 IXGBE_IMIR_SIZE_BP_82599));
-
-		/* enable port check */
-		IXGBE_WRITE_REG(hw, IXGBE_SDPQF(3),
-				(htons(PTP_PORT) |
-				 htons(PTP_PORT) << 16));
-
-		IXGBE_WRITE_REG(hw, IXGBE_FTQF(3), ftqf);
-
-		tsync_rx_mtrl |= PTP_PORT << 16;
-	} else {
-		IXGBE_WRITE_REG(hw, IXGBE_FTQF(3), 0);
-	}
 
 	/* enable/disable TX */
 	regval = IXGBE_READ_REG(hw, IXGBE_TSYNCTXCTL);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 05/10] ixgbe: ethtool correctly identify autoneg setting
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (3 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 04/10] ixgbe: remove needless queuing for L4 ptp packets Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c Jeff Kirsher
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

From: Jacob Keller <jacob.e.keller@intel.com>

This patch enables ethtool to correctly identify flow control (pause
frame) auto negotiation, as well as disallow enabling it when it is not
supported. The ixgbe_device_supports_autoneg_fc function is exported and
used for this purpose.

There is also one minor cleanup of the device_supports_autoneg_fc by
removing an unnecessary return statement.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  | 3 +--
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h  | 1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 5 +++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 3 ++-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 8f285ed..5af1eeb 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -65,13 +65,12 @@ static s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
  *  function check the device id to see if the associated phy supports
  *  autoneg flow control.
  **/
-static s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
+s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 {
 
 	switch (hw->device_id) {
 	case IXGBE_DEV_ID_X540T:
 	case IXGBE_DEV_ID_X540T1:
-		return 0;
 	case IXGBE_DEV_ID_82599_T3_LOM:
 		return 0;
 	default:
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h
index 587db47..1b65b6c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.h
@@ -78,6 +78,7 @@ s32 ixgbe_disable_rx_buff_generic(struct ixgbe_hw *hw);
 s32 ixgbe_enable_rx_buff_generic(struct ixgbe_hw *hw);
 s32 ixgbe_enable_rx_dma_generic(struct ixgbe_hw *hw, u32 regval);
 s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw);
+s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw);
 void ixgbe_fc_autoneg(struct ixgbe_hw *hw);
 
 s32 ixgbe_validate_mac_addr(u8 *mac_addr);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index a545728..3268584 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -383,6 +383,11 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
 	    (adapter->flags & IXGBE_FLAG_DCB_ENABLED))
 		return -EINVAL;
 
+	/* some devices do not support autoneg of link flow control */
+	if ((pause->autoneg == AUTONEG_ENABLE) &&
+	    (ixgbe_device_supports_autoneg_fc(hw) != 0))
+		return -EINVAL;
+
 	fc.disable_fc_autoneg = (pause->autoneg != AUTONEG_ENABLE);
 
 	if ((pause->rx_pause && pause->tx_pause) || pause->autoneg)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 004ea6c..4f67fdc 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4567,7 +4567,8 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
 	ixgbe_pbthresh_setup(adapter);
 	hw->fc.pause_time = IXGBE_DEFAULT_FCPAUSE;
 	hw->fc.send_xon = true;
-	hw->fc.disable_fc_autoneg = false;
+	hw->fc.disable_fc_autoneg =
+		(ixgbe_device_supports_autoneg_fc(hw) == 0) ? false : true;
 
 #ifdef CONFIG_PCI_IOV
 	/* assign number of SR-IOV VFs */
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (4 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 05/10] ixgbe: ethtool correctly identify autoneg setting Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 11:04   ` Dan Carpenter
  2012-11-21 10:47 ` [net-next 07/10] ixgbe: fdb: only allow NUD_PERM fdb entries Jeff Kirsher
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Josh Hay, netdev, gospo, sassmann, Dan Carpenter, Jeff Kirsher

From: Josh Hay <joshua.a.hay@intel.com>

This patch replaces calls to copy_to_user, copy_from_user, and the associated
logic, with calls to simple_read_from_buffer and simple_write_to_buffer
respectively.  This was done to eliminate warnings generated by the Smatch
static analysis tool.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Josh Hay <joshua.a.hay@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 83 +++++++++++++-----------
 1 file changed, 46 insertions(+), 37 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
index efaf9a7..a717baa 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c
@@ -47,23 +47,27 @@ static ssize_t ixgbe_dbg_reg_ops_read(struct file *filp, char __user *buffer,
 				    size_t count, loff_t *ppos)
 {
 	struct ixgbe_adapter *adapter = filp->private_data;
-	char buf[256];
-	int bytes_not_copied;
+	char *buf;
 	int len;
 
 	/* don't allow partial reads */
 	if (*ppos != 0)
 		return 0;
 
-	len = snprintf(buf, sizeof(buf), "%s: %s\n",
-		       adapter->netdev->name, ixgbe_dbg_reg_ops_buf);
-	if (count < len)
+	buf = kasprintf(GFP_KERNEL, "%s: %s\n",
+			adapter->netdev->name,
+			ixgbe_dbg_reg_ops_buf);
+	if (!buf)
+		return -ENOMEM;
+
+	if (count < strlen(buf)) {
+		kfree(buf);
 		return -ENOSPC;
-	bytes_not_copied = copy_to_user(buffer, buf, len);
-	if (bytes_not_copied < 0)
-		return bytes_not_copied;
+	}
+
+	len = simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
 
-	*ppos = len;
+	kfree(buf);
 	return len;
 }
 
@@ -79,7 +83,7 @@ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp,
 				     size_t count, loff_t *ppos)
 {
 	struct ixgbe_adapter *adapter = filp->private_data;
-	int bytes_not_copied;
+	int len;
 
 	/* don't allow partial writes */
 	if (*ppos != 0)
@@ -87,14 +91,15 @@ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp,
 	if (count >= sizeof(ixgbe_dbg_reg_ops_buf))
 		return -ENOSPC;
 
-	bytes_not_copied = copy_from_user(ixgbe_dbg_reg_ops_buf, buffer, count);
-	if (bytes_not_copied < 0)
-		return bytes_not_copied;
-	else if (bytes_not_copied < count)
-		count -= bytes_not_copied;
-	else
-		return -ENOSPC;
-	ixgbe_dbg_reg_ops_buf[count] = '\0';
+	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
+				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
+				     ppos,
+				     buffer,
+				     count);
+	if (len < 0)
+		return -EFAULT;
+
+	ixgbe_dbg_reg_ops_buf[len] = '\0';
 
 	if (strncmp(ixgbe_dbg_reg_ops_buf, "write", 5) == 0) {
 		u32 reg, value;
@@ -147,23 +152,27 @@ static ssize_t ixgbe_dbg_netdev_ops_read(struct file *filp,
 					 size_t count, loff_t *ppos)
 {
 	struct ixgbe_adapter *adapter = filp->private_data;
-	char buf[256];
-	int bytes_not_copied;
+	char *buf;
 	int len;
 
 	/* don't allow partial reads */
 	if (*ppos != 0)
 		return 0;
 
-	len = snprintf(buf, sizeof(buf), "%s: %s\n",
-		       adapter->netdev->name, ixgbe_dbg_netdev_ops_buf);
-	if (count < len)
+	buf = kasprintf(GFP_KERNEL, "%s: %s\n",
+			adapter->netdev->name,
+			ixgbe_dbg_netdev_ops_buf);
+	if (!buf)
+		return -ENOMEM;
+
+	if (count < strlen(buf)) {
+		kfree(buf);
 		return -ENOSPC;
-	bytes_not_copied = copy_to_user(buffer, buf, len);
-	if (bytes_not_copied < 0)
-		return bytes_not_copied;
+	}
+
+	len = simple_read_from_buffer(buffer, count, ppos, buf, strlen(buf));
 
-	*ppos = len;
+	kfree(buf);
 	return len;
 }
 
@@ -179,7 +188,7 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
 					  size_t count, loff_t *ppos)
 {
 	struct ixgbe_adapter *adapter = filp->private_data;
-	int bytes_not_copied;
+	int len;
 
 	/* don't allow partial writes */
 	if (*ppos != 0)
@@ -187,15 +196,15 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
 	if (count >= sizeof(ixgbe_dbg_netdev_ops_buf))
 		return -ENOSPC;
 
-	bytes_not_copied = copy_from_user(ixgbe_dbg_netdev_ops_buf,
-					  buffer, count);
-	if (bytes_not_copied < 0)
-		return bytes_not_copied;
-	else if (bytes_not_copied < count)
-		count -= bytes_not_copied;
-	else
-		return -ENOSPC;
-	ixgbe_dbg_netdev_ops_buf[count] = '\0';
+	len = simple_write_to_buffer(ixgbe_dbg_netdev_ops_buf,
+				     sizeof(ixgbe_dbg_netdev_ops_buf)-1,
+				     ppos,
+				     buffer,
+				     count);
+	if (len < 0)
+		return -EFAULT;
+
+	ixgbe_dbg_netdev_ops_buf[len] = '\0';
 
 	if (strncmp(ixgbe_dbg_netdev_ops_buf, "tx_timeout", 10) == 0) {
 		adapter->netdev->netdev_ops->ndo_tx_timeout(adapter->netdev);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 07/10] ixgbe: fdb: only allow NUD_PERM fdb entries
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (5 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 08/10] igb: Update PTP Rx filters Jeff Kirsher
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: John Fastabend, netdev, gospo, sassmann, Jeff Kirsher

From: John Fastabend <john.r.fastabend@intel.com>

There was a bitwise operation error in the fdb_add block
that was only allowing FDB types that were not permanent.

This was the opposite of the intent because the hardware
never ages out address these are the _only_ type of addrs
that should be allowed.

This was missed because until recently iproute2 did not
set any bit for this by default. And our test code to
manage FDB entries on embedded devices similarly did not
set these bits.

I am going to chalk this up as a bug and fix it now.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 4f67fdc..80e3cb7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -6954,7 +6954,10 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
 	if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
 		return -EOPNOTSUPP;
 
-	if (ndm->ndm_state & NUD_PERMANENT) {
+	/* Hardware does not support aging addresses so if a
+	 * ndm_state is given only allow permanent addresses
+	 */
+	if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
 		pr_info("%s: FDB only supports static addresses\n",
 			ixgbe_driver_name);
 		return -EINVAL;
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 08/10] igb: Update PTP Rx filters
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (6 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 07/10] ixgbe: fdb: only allow NUD_PERM fdb entries Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 11:37   ` Richard Cochran
  2012-11-21 10:47 ` [net-next 09/10] igb: No longer rely on APME to determine WoL settings Jeff Kirsher
  2012-11-21 10:47 ` [net-next 10/10] igb: Do not parse past IP header on fragments beyond the first Jeff Kirsher
  9 siblings, 1 reply; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem
  Cc: Matthew Vick, netdev, gospo, sassmann, Richard Cochran, Jeff Kirsher

From: Matthew Vick <matthew.vick@intel.com>

Update the filters to be more consistent with what the driver wants to do.
For example, for devices that timestamp all packets, report that the filter
is set for timestamping all packets.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_ptp.c | 47 ++++++++++++++------------------
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_ptp.c b/drivers/net/ethernet/intel/igb/igb_ptp.c
index aa10f69..ab34297 100644
--- a/drivers/net/ethernet/intel/igb/igb_ptp.c
+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c
@@ -553,18 +553,6 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
 	case HWTSTAMP_FILTER_NONE:
 		tsync_rx_ctl = 0;
 		break;
-	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
-	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
-	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
-	case HWTSTAMP_FILTER_ALL:
-		/*
-		 * register TSYNCRXCFG must be set, therefore it is not
-		 * possible to time stamp both Sync and Delay_Req messages
-		 * => fall back to time stamping all packets
-		 */
-		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_ALL;
-		config.rx_filter = HWTSTAMP_FILTER_ALL;
-		break;
 	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
 		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_L4_V1;
 		tsync_rx_cfg = E1000_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE;
@@ -575,31 +563,33 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
 		tsync_rx_cfg = E1000_TSYNCRXCFG_PTP_V1_DELAY_REQ_MESSAGE;
 		is_l4 = true;
 		break;
+	case HWTSTAMP_FILTER_PTP_V2_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
+	case HWTSTAMP_FILTER_PTP_V2_SYNC:
 	case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
 	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
-		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_L2_L4_V2;
-		tsync_rx_cfg = E1000_TSYNCRXCFG_PTP_V2_SYNC_MESSAGE;
-		is_l2 = true;
-		is_l4 = true;
-		config.rx_filter = HWTSTAMP_FILTER_SOME;
-		break;
+	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
 	case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
 	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
-		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_L2_L4_V2;
-		tsync_rx_cfg = E1000_TSYNCRXCFG_PTP_V2_DELAY_REQ_MESSAGE;
-		is_l2 = true;
-		is_l4 = true;
-		config.rx_filter = HWTSTAMP_FILTER_SOME;
-		break;
-	case HWTSTAMP_FILTER_PTP_V2_EVENT:
-	case HWTSTAMP_FILTER_PTP_V2_SYNC:
-	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
 		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_EVENT_V2;
 		config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
 		is_l2 = true;
 		is_l4 = true;
 		break;
+	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
+	case HWTSTAMP_FILTER_ALL:
+		/* 82576 cannot timestamp all packets, which it needs to do to
+		 * support both V1 Sync and Delay_Req messages
+		 */
+		if (hw->mac.type != e1000_82576) {
+			tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_ALL;
+			config.rx_filter = HWTSTAMP_FILTER_ALL;
+			break;
+		}
+		/* fall through */
 	default:
+		config.rx_filter = HWTSTAMP_FILTER_NONE;
 		return -ERANGE;
 	}
 
@@ -617,6 +607,9 @@ int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
 	if ((hw->mac.type >= e1000_82580) && tsync_rx_ctl) {
 		tsync_rx_ctl = E1000_TSYNCRXCTL_ENABLED;
 		tsync_rx_ctl |= E1000_TSYNCRXCTL_TYPE_ALL;
+		config.rx_filter = HWTSTAMP_FILTER_ALL;
+		is_l2 = true;
+		is_l4 = true;
 
 		if ((hw->mac.type == e1000_i210) ||
 		    (hw->mac.type == e1000_i211)) {
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 09/10] igb: No longer rely on APME to determine WoL settings
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (7 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 08/10] igb: Update PTP Rx filters Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  2012-11-21 10:47 ` [net-next 10/10] igb: Do not parse past IP header on fragments beyond the first Jeff Kirsher
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Matthew Vick, netdev, gospo, sassmann, Jeff Kirsher

From: Matthew Vick <matthew.vick@intel.com>

Historically, we've been using the APME bit to determine whether a device
supports wake on a given port or not. However, this bit specifies the
default wake setting, rather than the wake support. Change the behavior so
that we use a flag to keep the capabilities separate from the enablement
while meeting customer requirements.

Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb.h         |  3 +-
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 56 +---------------------------
 drivers/net/ethernet/intel/igb/igb_main.c    | 40 +++++++++++++-------
 3 files changed, 29 insertions(+), 70 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index d8fd5b6..c15a481 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -370,8 +370,6 @@ struct igb_adapter {
 	u32 eims_other;
 
 	/* to not mess up cache alignment, always add to the bottom */
-	u32 eeprom_wol;
-
 	u16 tx_ring_count;
 	u16 rx_ring_count;
 	unsigned int vfs_allocated_count;
@@ -401,6 +399,7 @@ struct igb_adapter {
 #define IGB_FLAG_PTP			(1 << 5)
 #define IGB_FLAG_RSS_FIELD_IPV4_UDP	(1 << 6)
 #define IGB_FLAG_RSS_FIELD_IPV6_UDP	(1 << 7)
+#define IGB_FLAG_WOL_SUPPORTED		(1 << 8)
 
 /* DMA Coalescing defines */
 #define IGB_MIN_TXPBSIZE           20408
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 0acf590..e2288b5 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1966,54 +1966,6 @@ static void igb_diag_test(struct net_device *netdev,
 	msleep_interruptible(4 * 1000);
 }
 
-static int igb_wol_exclusion(struct igb_adapter *adapter,
-			     struct ethtool_wolinfo *wol)
-{
-	struct e1000_hw *hw = &adapter->hw;
-	int retval = 1; /* fail by default */
-
-	switch (hw->device_id) {
-	case E1000_DEV_ID_82575GB_QUAD_COPPER:
-		/* WoL not supported */
-		wol->supported = 0;
-		break;
-	case E1000_DEV_ID_82575EB_FIBER_SERDES:
-	case E1000_DEV_ID_82576_FIBER:
-	case E1000_DEV_ID_82576_SERDES:
-		/* Wake events not supported on port B */
-		if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1) {
-			wol->supported = 0;
-			break;
-		}
-		/* return success for non excluded adapter ports */
-		retval = 0;
-		break;
-	case E1000_DEV_ID_82576_QUAD_COPPER:
-	case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
-		/* quad port adapters only support WoL on port A */
-		if (!(adapter->flags & IGB_FLAG_QUAD_PORT_A)) {
-			wol->supported = 0;
-			break;
-		}
-		/* return success for non excluded adapter ports */
-		retval = 0;
-		break;
-	default:
-		/* dual port cards only support WoL on port A from now on
-		 * unless it was enabled in the eeprom for port B
-		 * so exclude FUNC_1 ports from having WoL enabled */
-		if ((rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) &&
-		    !adapter->eeprom_wol) {
-			wol->supported = 0;
-			break;
-		}
-
-		retval = 0;
-	}
-
-	return retval;
-}
-
 static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 {
 	struct igb_adapter *adapter = netdev_priv(netdev);
@@ -2023,10 +1975,7 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 	                 WAKE_PHY;
 	wol->wolopts = 0;
 
-	/* this function will set ->supported = 0 and return 1 if wol is not
-	 * supported by this hardware */
-	if (igb_wol_exclusion(adapter, wol) ||
-	    !device_can_wakeup(&adapter->pdev->dev))
+	if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
 		return;
 
 	/* apply any specific unsupported masks here */
@@ -2054,8 +2003,7 @@ static int igb_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 	if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE))
 		return -EOPNOTSUPP;
 
-	if (igb_wol_exclusion(adapter, wol) ||
-	    !device_can_wakeup(&adapter->pdev->dev))
+	if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED))
 		return wol->wolopts ? -EOPNOTSUPP : 0;
 
 	/* these settings will always override what we currently have */
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 7044aaa..0fe2521 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1837,7 +1837,6 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 	const struct e1000_info *ei = igb_info_tbl[ent->driver_data];
 	unsigned long mmio_start, mmio_len;
 	int err, pci_using_dac;
-	u16 eeprom_apme_mask = IGB_EEPROM_APME;
 	u8 part_str[E1000_PBANUM_LENGTH];
 
 	/* Catch broken hardware that put the wrong VF device ID in
@@ -2045,28 +2044,27 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 
 	igb_validate_mdi_setting(hw);
 
-	/* Initial Wake on LAN setting If APM wake is enabled in the EEPROM,
-	 * enable the ACPI Magic Packet filter
-	 */
-
+	/* By default, support wake on port A */
 	if (hw->bus.func == 0)
-		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
-	else if (hw->mac.type >= e1000_82580)
+		adapter->flags |= IGB_FLAG_WOL_SUPPORTED;
+
+	/* Check the NVM for wake support on non-port A ports */
+	if (hw->mac.type >= e1000_82580)
 		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_A +
 		                 NVM_82580_LAN_FUNC_OFFSET(hw->bus.func), 1,
 		                 &eeprom_data);
 	else if (hw->bus.func == 1)
 		hw->nvm.ops.read(hw, NVM_INIT_CONTROL3_PORT_B, 1, &eeprom_data);
 
-	if (eeprom_data & eeprom_apme_mask)
-		adapter->eeprom_wol |= E1000_WUFC_MAG;
+	if (eeprom_data & IGB_EEPROM_APME)
+		adapter->flags |= IGB_FLAG_WOL_SUPPORTED;
 
 	/* now that we have the eeprom settings, apply the special cases where
 	 * the eeprom may be wrong or the board simply won't support wake on
 	 * lan on a particular port */
 	switch (pdev->device) {
 	case E1000_DEV_ID_82575GB_QUAD_COPPER:
-		adapter->eeprom_wol = 0;
+		adapter->flags &= ~IGB_FLAG_WOL_SUPPORTED;
 		break;
 	case E1000_DEV_ID_82575EB_FIBER_SERDES:
 	case E1000_DEV_ID_82576_FIBER:
@@ -2074,24 +2072,38 @@ static int __devinit igb_probe(struct pci_dev *pdev,
 		/* Wake events only supported on port A for dual fiber
 		 * regardless of eeprom setting */
 		if (rd32(E1000_STATUS) & E1000_STATUS_FUNC_1)
-			adapter->eeprom_wol = 0;
+			adapter->flags &= ~IGB_FLAG_WOL_SUPPORTED;
 		break;
 	case E1000_DEV_ID_82576_QUAD_COPPER:
 	case E1000_DEV_ID_82576_QUAD_COPPER_ET2:
 		/* if quad port adapter, disable WoL on all but port A */
 		if (global_quad_port_a != 0)
-			adapter->eeprom_wol = 0;
+			adapter->flags &= ~IGB_FLAG_WOL_SUPPORTED;
 		else
 			adapter->flags |= IGB_FLAG_QUAD_PORT_A;
 		/* Reset for multiple quad port adapters */
 		if (++global_quad_port_a == 4)
 			global_quad_port_a = 0;
 		break;
+	default:
+		/* If the device can't wake, don't set software support */
+		if (!device_can_wakeup(&adapter->pdev->dev))
+			adapter->flags &= ~IGB_FLAG_WOL_SUPPORTED;
 	}
 
 	/* initialize the wol settings based on the eeprom settings */
-	adapter->wol = adapter->eeprom_wol;
-	device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
+	if (adapter->flags & IGB_FLAG_WOL_SUPPORTED)
+		adapter->wol |= E1000_WUFC_MAG;
+
+	/* Some vendors want WoL disabled by default, but still supported */
+	if ((hw->mac.type == e1000_i350) &&
+	    (pdev->subsystem_vendor == PCI_VENDOR_ID_HP)) {
+		adapter->flags |= IGB_FLAG_WOL_SUPPORTED;
+		adapter->wol = 0;
+	}
+
+	device_set_wakeup_enable(&adapter->pdev->dev,
+				 adapter->flags & IGB_FLAG_WOL_SUPPORTED);
 
 	/* reset the hardware with the new settings */
 	igb_reset(adapter);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [net-next 10/10] igb: Do not parse past IP header on fragments beyond the first
  2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (8 preceding siblings ...)
  2012-11-21 10:47 ` [net-next 09/10] igb: No longer rely on APME to determine WoL settings Jeff Kirsher
@ 2012-11-21 10:47 ` Jeff Kirsher
  9 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2012-11-21 10:47 UTC (permalink / raw)
  To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher

From: Alexander Duyck <alexander.h.duyck@intel.com>

This change makes it so that only the first fragment in a series of fragments
will have the L4 header pulled.  Previously we were always pulling the L4
header as well and in the case of UDP this can harm performance since only the
first fragment will have the header, the rest just contain data which should
be left in the paged portion of the packet.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 0fe2521..0ce145e 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -6145,20 +6145,23 @@ static unsigned int igb_get_headlen(unsigned char *data,
 		if (hlen < sizeof(struct iphdr))
 			return hdr.network - data;
 
-		/* record next protocol */
-		nexthdr = hdr.ipv4->protocol;
-		hdr.network += hlen;
+		/* record next protocol if header is present */
+		if (!hdr.ipv4->frag_off)
+			nexthdr = hdr.ipv4->protocol;
 	} else if (protocol == __constant_htons(ETH_P_IPV6)) {
 		if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
 			return max_len;
 
 		/* record next protocol */
 		nexthdr = hdr.ipv6->nexthdr;
-		hdr.network += sizeof(struct ipv6hdr);
+		hlen = sizeof(struct ipv6hdr);
 	} else {
 		return hdr.network - data;
 	}
 
+	/* relocate pointer to start of L4 header */
+	hdr.network += hlen;
+
 	/* finally sort out TCP */
 	if (nexthdr == IPPROTO_TCP) {
 		if ((hdr.network - data) > (max_len - sizeof(struct tcphdr)))
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
  2012-11-21 10:47 ` [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c Jeff Kirsher
@ 2012-11-21 11:04   ` Dan Carpenter
  2012-11-21 17:04     ` David Miller
  2012-11-27  1:06     ` Hay, Joshua A
  0 siblings, 2 replies; 25+ messages in thread
From: Dan Carpenter @ 2012-11-21 11:04 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Josh Hay, netdev, gospo, sassmann

On Wed, Nov 21, 2012 at 02:47:32AM -0800, Jeff Kirsher wrote:
> +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
> +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
> +				     ppos,
> +				     buffer,
> +				     count);
> +	if (len < 0)
> +		return -EFAULT;

Any negative return is bad.

	if (len)
		return len;

> +
> +	ixgbe_dbg_reg_ops_buf[len] = '\0';
>  
>  	if (strncmp(ixgbe_dbg_reg_ops_buf, "write", 5) == 0) {
>  		u32 reg, value;
> @@ -187,15 +196,15 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
>  	if (count >= sizeof(ixgbe_dbg_netdev_ops_buf))
>  		return -ENOSPC;
>  
> -	bytes_not_copied = copy_from_user(ixgbe_dbg_netdev_ops_buf,
> -					  buffer, count);
> -	if (bytes_not_copied < 0)
> -		return bytes_not_copied;
> -	else if (bytes_not_copied < count)
> -		count -= bytes_not_copied;
> -	else
> -		return -ENOSPC;
> -	ixgbe_dbg_netdev_ops_buf[count] = '\0';
> +	len = simple_write_to_buffer(ixgbe_dbg_netdev_ops_buf,
> +				     sizeof(ixgbe_dbg_netdev_ops_buf)-1,
> +				     ppos,
> +				     buffer,
> +				     count);
> +	if (len < 0)
> +		return -EFAULT;

Same.

> +
> +	ixgbe_dbg_netdev_ops_buf[len] = '\0';

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 08/10] igb: Update PTP Rx filters
  2012-11-21 10:47 ` [net-next 08/10] igb: Update PTP Rx filters Jeff Kirsher
@ 2012-11-21 11:37   ` Richard Cochran
  0 siblings, 0 replies; 25+ messages in thread
From: Richard Cochran @ 2012-11-21 11:37 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Matthew Vick, netdev, gospo, sassmann

On Wed, Nov 21, 2012 at 02:47:34AM -0800, Jeff Kirsher wrote:
> From: Matthew Vick <matthew.vick@intel.com>
> 
> Update the filters to be more consistent with what the driver wants to do.
> For example, for devices that timestamp all packets, report that the filter
> is set for timestamping all packets.
> 
> Signed-off-by: Matthew Vick <matthew.vick@intel.com>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Acked-by: Richard Cochran <richardcochran@gmail.com>

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
  2012-11-21 11:04   ` Dan Carpenter
@ 2012-11-21 17:04     ` David Miller
  2012-11-27  1:06     ` Hay, Joshua A
  1 sibling, 0 replies; 25+ messages in thread
From: David Miller @ 2012-11-21 17:04 UTC (permalink / raw)
  To: dan.carpenter; +Cc: jeffrey.t.kirsher, joshua.a.hay, netdev, gospo, sassmann

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Wed, 21 Nov 2012 14:04:09 +0300

> On Wed, Nov 21, 2012 at 02:47:32AM -0800, Jeff Kirsher wrote:
>> +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
>> +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
>> +				     ppos,
>> +				     buffer,
>> +				     count);
>> +	if (len < 0)
>> +		return -EFAULT;
> 
> Any negative return is bad.
> 
> 	if (len)
> 		return len;
 ...
>> @@ -187,15 +196,15 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
 ...
>> +	if (len < 0)
>> +		return -EFAULT;
> 
> Same.

Agreed.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
  2012-11-21 11:04   ` Dan Carpenter
  2012-11-21 17:04     ` David Miller
@ 2012-11-27  1:06     ` Hay, Joshua A
  2012-11-27  7:18       ` Dan Carpenter
  1 sibling, 1 reply; 25+ messages in thread
From: Hay, Joshua A @ 2012-11-27  1:06 UTC (permalink / raw)
  To: Dan Carpenter, Kirsher, Jeffrey T; +Cc: davem, netdev, gospo, sassmann

The return value will be changed to len to preserve error codes returned from simple_write_to_buffer.

However, changing the logic preceding this return breaks these functions.  If simple_write_to_buffer returns a positive value, other actions are performed with this value.  With this patch, the function will return immediately with that value instead.  This will effectively break the ixgbe_debugfs write operations.

So ultimately, the change should be: 
> +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
> +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
> +				     ppos,
> +				     buffer,
> +				     count);
> +	if (len < 0)
> +		return -EFAULT;
	
	if (len < 0)
		return len;

Thanks,
Josh Hay

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@oracle.com] 
Sent: Wednesday, November 21, 2012 3:04 AM
To: Kirsher, Jeffrey T
Cc: davem@davemloft.net; Hay, Joshua A; netdev@vger.kernel.org; gospo@redhat.com; sassmann@redhat.com
Subject: Re: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c

On Wed, Nov 21, 2012 at 02:47:32AM -0800, Jeff Kirsher wrote:
> +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
> +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
> +				     ppos,
> +				     buffer,
> +				     count);
> +	if (len < 0)
> +		return -EFAULT;

Any negative return is bad.

	if (len)
		return len;

> +
> +	ixgbe_dbg_reg_ops_buf[len] = '\0';
>  
>  	if (strncmp(ixgbe_dbg_reg_ops_buf, "write", 5) == 0) {
>  		u32 reg, value;
> @@ -187,15 +196,15 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp,
>  	if (count >= sizeof(ixgbe_dbg_netdev_ops_buf))
>  		return -ENOSPC;
>  
> -	bytes_not_copied = copy_from_user(ixgbe_dbg_netdev_ops_buf,
> -					  buffer, count);
> -	if (bytes_not_copied < 0)
> -		return bytes_not_copied;
> -	else if (bytes_not_copied < count)
> -		count -= bytes_not_copied;
> -	else
> -		return -ENOSPC;
> -	ixgbe_dbg_netdev_ops_buf[count] = '\0';
> +	len = simple_write_to_buffer(ixgbe_dbg_netdev_ops_buf,
> +				     sizeof(ixgbe_dbg_netdev_ops_buf)-1,
> +				     ppos,
> +				     buffer,
> +				     count);
> +	if (len < 0)
> +		return -EFAULT;

Same.

> +
> +	ixgbe_dbg_netdev_ops_buf[len] = '\0';

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c
  2012-11-27  1:06     ` Hay, Joshua A
@ 2012-11-27  7:18       ` Dan Carpenter
  0 siblings, 0 replies; 25+ messages in thread
From: Dan Carpenter @ 2012-11-27  7:18 UTC (permalink / raw)
  To: Hay, Joshua A; +Cc: Kirsher, Jeffrey T, davem, netdev, gospo, sassmann

On Tue, Nov 27, 2012 at 01:06:17AM +0000, Hay, Joshua A wrote:
> The return value will be changed to len to preserve error codes returned from simple_write_to_buffer.
> 
> However, changing the logic preceding this return breaks these functions.  If simple_write_to_buffer returns a positive value, other actions are performed with this value.  With this patch, the function will return immediately with that value instead.  This will effectively break the ixgbe_debugfs write operations.
> 
> So ultimately, the change should be: 
> > +	len = simple_write_to_buffer(ixgbe_dbg_reg_ops_buf,
> > +				     sizeof(ixgbe_dbg_reg_ops_buf)-1,
> > +				     ppos,
> > +				     buffer,
> > +				     count);
> > +	if (len < 0)
> > +		return -EFAULT;
> 	
> 	if (len < 0)
> 		return len;
> 

Yes.  Sorry, I wasn't reading carefully before.  That looks fine.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next  00/10][pull request] Intel Wired LAN Driver Updates
@ 2013-08-28 10:33 Jeff Kirsher
  0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2013-08-28 10:33 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to ixgbe.

Jacob provides a fix for 82599 devices where it can potentially keep link
lights up when the adapter has gone down.

Mark provides a fix to resolve the possible use of uninitialized memory
by checking the return value on EEPROM reads.

Don provides 2 patches, one to fix a issue where we were traversing the
Tx ring with the value of IXGBE_NUM_RX_QUEUES which currently happens
to have the correct value but this is misleading.  A change later, could
easily make this no longer correct so when traversing the Tx ring, use
netdev->num_tx_queues.  His second patch does some minor clean ups of log
messages.

Emil provides the remaining ixgbe patches.  First he fixes the link test
where forcing the laser before the link check can lead to inconsistent
results because it does not guarantee that the link will be negotiated
correctly.  Then he initializes the message buffer array to 0 in order
to avoid using random numbers from the memory as a MAC address for the
VF.  Emil also fixes the read loop for the I2C data to account for the
offset for SFP+ modules.  Lastly, Emil provides several patches to add
support for QSFP modules where 1Gbps support is added as well as support
for older QSFP active direct attach cables which pre-date SFF-8436 v3.6.

The following are changes since commit 5b2941b18dc5f60a5c14a5c15693f9c58b0dd922:
  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Don Skidmore (2):
  ixgbe: fix incorrect limit value in ring transverse
  ixgbe: cleanup some log messages

Emil Tantilov (6):
  ixgbe: fix link test when connected to 1Gbps link partner
  ixgbe: zero out mailbox buffer on init
  ixgbe: fix SFF data dumps of SFP+ modules from an offset
  ixgbe: add 1Gbps support for QSFP+
  ixgbe: include QSFP PHY types in ixgbe_is_sfp()
  ixgbe: add support for older QSFP active DA cables

Jacob Keller (1):
  ixgbe: disable link when adapter goes down

Mark Rustad (1):
  ixgbe: Check return value on eeprom reads

 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c   | 93 ++++++++++++++++++----
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  | 67 ++++++++++------
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h  |  6 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 40 ++++------
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 13 +++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c     | 98 +++++++++++++++++++-----
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h     |  5 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c   |  4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |  2 +
 9 files changed, 238 insertions(+), 90 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2013-06-26 10:55 Jeff Kirsher
  0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2013-06-26 10:55 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to ixgbe, e100, igb, and e1000e.

Alex provides a ixgbe patch to use the generic helper pci_vfs_assigned
instead of the ixgbe specific function ixgbe_vfs_are_assigned.

Greg provides 2 ixgbe patches, the first patch retains VLAN filtering
in promiscuous mode because using the new bridge FDB interface to allow
SR-IOV virtual function network devices to communicate with SW bridged
network devices the physical function is placed into promiscuous mode
and hardware VLAN filtering is disabled.  The second patch fixes a typo
where the code should use a bitwise "and" rather than a logical "and".

Andy Shevchenko provides an e100 patch to dump small buffers via %*ph.

Akeem provides three patches against igb.  The first resets the link when
a user enables/disables EEE when link is up.  The second changes register
read to "just-read" without returning a value for hardware to accurately
latch the register value.  His third patch adds rcu_lock to avoid possible
race conditions with igb_update_stats.

Mitch provides a igb patch to fix an issue where MSI-X interrupts are required
for SR-IOV operation/functionality.

Dean (from Redhat) provides a patch to resolve minor merger conflicts.

Wei Yang provides a e1000e patch to remove duplicate assignment of default
Rx/Tx ring size.

The following are changes since commit 8599b52e14a1611dcb563289421bee76751f1d53:
  bonding: add an option to fail when any of arp_ip_target is inaccessible
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Akeem G. Abodunrin (3):
  igb: Reset the link when EEE setting changed
  igb: Read register for latch_on without return value
  igb: Added rcu_lock to avoid race

Alexander Duyck (1):
  ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned

Andy Shevchenko (1):
  e100: dump small buffers via %*ph

Dean Nelson (1):
  e1000e: restore call to pci_clear_master()

Greg Rose (2):
  ixgbe: Retain VLAN filtering in promiscuous + VT mode
  ixgbe: Fix typo

Mitch A Williams (1):
  igb: don't allow SR-IOV without MSI-X

Wei Yang (1):
  e1000e: Remove duplicate assignment of default rx/tx ring size

 drivers/net/ethernet/intel/e100.c              |  15 ++--
 drivers/net/ethernet/intel/e1000e/netdev.c     |   6 +-
 drivers/net/ethernet/intel/igb/e1000_82575.c   |   9 +--
 drivers/net/ethernet/intel/igb/igb_ethtool.c   |   4 +-
 drivers/net/ethernet/intel/igb/igb_main.c      |  26 ++++---
 drivers/net/ethernet/intel/igb/igb_ptp.c       |   8 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  |  11 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 101 ++++++++++++++++---------
 8 files changed, 110 insertions(+), 70 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2013-02-08 10:39 Jeff Kirsher
  0 siblings, 0 replies; 25+ messages in thread
From: Jeff Kirsher @ 2013-02-08 10:39 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to igb and ixgbe.  Most of the changes
are against igb, except for one patch against ixgbe.

There are 3 igb fixes from Carolyn which were reported by Dan
Carpenter which resolve issues found in the get_i2c_client().  Alex
does some cleanup of the igb driver to match similar functionality
in ixgbe on transmit.  Alex also makes it so that we can enable the use
of build_skb for cases where jumbo frames are disabled.  The advantage
to this is that we do not have to perform a memcpy to populate the header
and as a result we see a significant performance improvement.

Akeem provides 4 patches to initialize function pointers and do a
re-factoring of the function pointers in igb_get_variants() to assist
with driver debugging.

The ixgbe patch comes from Emil to reshuffle the switch/case structure
of the flag assignment to allow for the flags to be set for each MAC
type separately. This is needed for new hardware that does not have feature
parity with older hardware.

The following are changes since commit b285109dde7b873b5dc671ef1b3ae3090f4bc72f:
  Merge branch 'tg3'
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Akeem G. Abodunrin (4):
  igb: Initialize PHY function pointers
  igb: Initialize NVM function pointers
  igb: Intialize MAC function pointers
  igb: Refractoring function pointers in igb_get_invariants function

Alexander Duyck (2):
  igb: Support using build_skb in the case that jumbo frames are
    disabled
  igb: Update igb to use a path similar to ixgbe to determine when to
    stop Tx

Carolyn Wyborny (3):
  igb: Fix for improper exit in igb_get_i2c_client
  igb: Fix for improper allocation flag in igb_get_i2c_client
  igb: Fix for sparse warning in igb_get_i2c_client

Emil Tantilov (1):
  ixgbe: refactor initialization of feature flags

 drivers/net/ethernet/intel/igb/e1000_82575.c  | 488 ++++++++++++++------------
 drivers/net/ethernet/intel/igb/igb.h          |  21 +-
 drivers/net/ethernet/intel/igb/igb_main.c     | 230 +++++++++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  58 +--
 4 files changed, 497 insertions(+), 300 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 00/10][pull request] Intel Wired LAN Driver Updates
  2013-01-19 13:14 Jeff Kirsher
@ 2013-01-19 15:53 ` David Miller
  0 siblings, 0 replies; 25+ messages in thread
From: David Miller @ 2013-01-19 15:53 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 19 Jan 2013 05:14:49 -0800

> This series contains updates to ixgbe, ixgbevf and igb.
> 
> The following are changes since commit 1ad759d8479b4b28f2a6c874d380066cf987b341:
>   ipv6: remove unneeded check to pskb_may_pull in ipip6_rcv
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2013-01-19 13:14 Jeff Kirsher
  2013-01-19 15:53 ` David Miller
  0 siblings, 1 reply; 25+ messages in thread
From: Jeff Kirsher @ 2013-01-19 13:14 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to ixgbe, ixgbevf and igb.

The following are changes since commit 1ad759d8479b4b28f2a6c874d380066cf987b341:
  ipv6: remove unneeded check to pskb_may_pull in ipip6_rcv
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Akeem G. Abodunrin (1):
  igb: Copyright string update to year 2013

Alexander Duyck (5):
  ixgbe: Make TSO check for CHECKSUM_PARTIAL to avoid skb_is_gso check
  ixgbe: Always use context 0, even for FCoE and TSO
  ixgbe: Update ixgbe Tx flags to improve code efficiency
  ixgbe: Improve performance and reduce size of ixgbe_tx_map
  igb: Replace rmb in Tx cleanup with read_barrier_depends

Greg Rose (3):
  ixgbevf: Synch out of tree and in tree mailbox interrupt handlers
  ixgbevf: Fix link up messages
  ixgbevf: Fix statistics corruption

John Fastabend (1):
  ixgbe: SR-IOV: dynamic IEEE DCBx default priority changes

 drivers/net/ethernet/intel/igb/Makefile           |   2 +-
 drivers/net/ethernet/intel/igb/e1000_82575.c      |   2 +-
 drivers/net/ethernet/intel/igb/e1000_82575.h      |   2 +-
 drivers/net/ethernet/intel/igb/e1000_defines.h    |   2 +-
 drivers/net/ethernet/intel/igb/e1000_hw.h         |   2 +-
 drivers/net/ethernet/intel/igb/e1000_i210.c       |   2 +-
 drivers/net/ethernet/intel/igb/e1000_i210.h       |   2 +-
 drivers/net/ethernet/intel/igb/e1000_mac.c        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_mac.h        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_mbx.c        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_mbx.h        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_nvm.c        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_nvm.h        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_phy.c        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_phy.h        |   2 +-
 drivers/net/ethernet/intel/igb/e1000_regs.h       |   2 +-
 drivers/net/ethernet/intel/igb/igb.h              |   2 +-
 drivers/net/ethernet/intel/igb/igb_ethtool.c      |   2 +-
 drivers/net/ethernet/intel/igb/igb_hwmon.c        |   2 +-
 drivers/net/ethernet/intel/igb/igb_main.c         |   7 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe.h          |  27 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c   |  40 ++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c     |   7 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c     | 135 ++++++++++------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c    |   9 --
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h    |   8 ++
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |  41 ++++++-
 27 files changed, 186 insertions(+), 126 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 00/10][pull request] Intel Wired LAN Driver Updates
  2012-03-19 21:22 Jeff Kirsher
@ 2012-03-19 21:26 ` David Miller
  0 siblings, 0 replies; 25+ messages in thread
From: David Miller @ 2012-03-19 21:26 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 19 Mar 2012 14:22:28 -0700

> This series of patches contains fixes/cleanups for ixgbe.  This
> series completes the cleanup work from Alex for ixgbe.
> 
> The following are changes since commit 4da0bd736552e6377b407b3c3d3ae518ebbdd269:
>   Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2012-03-19 21:22 Jeff Kirsher
  2012-03-19 21:26 ` David Miller
  0 siblings, 1 reply; 25+ messages in thread
From: Jeff Kirsher @ 2012-03-19 21:22 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series of patches contains fixes/cleanups for ixgbe.  This
series completes the cleanup work from Alex for ixgbe.

The following are changes since commit 4da0bd736552e6377b407b3c3d3ae518ebbdd269:
  Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Alexander Duyck (9):
  ixgbe: Store Tx flags and protocol information to tx_buffer sooner
  ixgbe: Update layout of ixgbe_ring structure to improve cache
    performance
  ixgbe: cleanup logic for the service timer and VF hang detection
  ixgbe: Move poll routine in order to improve readability
  ixgbe: drop err_eeprom tag which is at same location as err_sw_init
  ixgbe: Two minor fixes for RSS and FDIR set queues functions
  ixgbe: Whitespace cleanups
  ixgbe: Add support for enabling UDP RSS via the ethtool rx-flow-hash
    command
  ixgbe: Correct flag values set by ixgbe_fix_features

Jeff Kirsher (1):
  ixgbe: fix namespace issues when FCoE/DCB is not enabled

 drivers/net/ethernet/intel/ixgbe/Makefile        |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe.h         |   31 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  191 +++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c    |   13 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c     |  929 ++++++++++++++
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 1452 ++++------------------
 6 files changed, 1399 insertions(+), 1219 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [net-next 00/10][pull request] Intel Wired LAN Driver Updates
  2012-03-01  7:32 Jeff Kirsher
@ 2012-03-01 21:26 ` David Miller
  0 siblings, 0 replies; 25+ messages in thread
From: David Miller @ 2012-03-01 21:26 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 29 Feb 2012 23:32:58 -0800

> This series of patches contains fixes/cleanups/additions to e100, e1000e,
> ixgbe & rtnetlink.  The e100 changes are from Ben Greear, which adds support
> for low-level Ethernet debugging.  The e1000e & ixgbe changes are cleanups.
> The only fix in the series is the rtnetlink patch from Greg Rose.
> 
> The following are changes since commit 06b8db9cac717fcd6b8410b9efae8aca33b4b9e6:
>   Merge branch 'tipc_net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [net-next 00/10][pull request] Intel Wired LAN Driver Updates
@ 2012-03-01  7:32 Jeff Kirsher
  2012-03-01 21:26 ` David Miller
  0 siblings, 1 reply; 25+ messages in thread
From: Jeff Kirsher @ 2012-03-01  7:32 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series of patches contains fixes/cleanups/additions to e100, e1000e,
ixgbe & rtnetlink.  The e100 changes are from Ben Greear, which adds support
for low-level Ethernet debugging.  The e1000e & ixgbe changes are cleanups.
The only fix in the series is the rtnetlink patch from Greg Rose.

The following are changes since commit 06b8db9cac717fcd6b8410b9efae8aca33b4b9e6:
  Merge branch 'tipc_net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Alexander Duyck (2):
  ixgbe: Minor formatting and comment corrections for
    ixgbe_xmit_frame_ring
  ixgbe: Fix comments that are out of date or formatted incorrectly

Ben Greear (3):
  e100: Support RXFCS feature flag.
  e100: Support sending custom Ethernet CRC
  e100: Support RXALL feature flag.

Bruce Allan (3):
  e1000e: cleanup incorrect filename in comment
  e1000e: cleanup whitespace and indentation
  e1000e: use msleep instead of mdelay

Don Skidmore (1):
  ixgbe: fix spelling errors

Greg Rose (1):
  rtnetlink: Fix VF IFLA policy

 drivers/net/ethernet/intel/e100.c               |   71 +++++++++++++++++++++--
 drivers/net/ethernet/intel/e1000e/82571.c       |   14 ++---
 drivers/net/ethernet/intel/e1000e/ich8lan.c     |   10 +--
 drivers/net/ethernet/intel/e1000e/mac.c         |    2 +-
 drivers/net/ethernet/intel/e1000e/netdev.c      |   12 ++--
 drivers/net/ethernet/intel/e1000e/phy.c         |   63 +++++++-------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   |   30 ++++++---
 net/core/rtnetlink.c                            |    2 +
 9 files changed, 128 insertions(+), 78 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2013-08-28 10:33 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21 10:47 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2012-11-21 10:47 ` [net-next 01/10] ixgbe: Reformat output of ixgbe_dump Jeff Kirsher
2012-11-21 10:47 ` [net-next 02/10] ixgbe: convert to use simple_open() Jeff Kirsher
2012-11-21 10:47 ` [net-next 03/10] ixgbe: use ETQF filter name instead of magic number Jeff Kirsher
2012-11-21 10:47 ` [net-next 04/10] ixgbe: remove needless queuing for L4 ptp packets Jeff Kirsher
2012-11-21 10:47 ` [net-next 05/10] ixgbe: ethtool correctly identify autoneg setting Jeff Kirsher
2012-11-21 10:47 ` [net-next 06/10] ixgbe: eliminate Smatch warnings in ixgbe_debugfs.c Jeff Kirsher
2012-11-21 11:04   ` Dan Carpenter
2012-11-21 17:04     ` David Miller
2012-11-27  1:06     ` Hay, Joshua A
2012-11-27  7:18       ` Dan Carpenter
2012-11-21 10:47 ` [net-next 07/10] ixgbe: fdb: only allow NUD_PERM fdb entries Jeff Kirsher
2012-11-21 10:47 ` [net-next 08/10] igb: Update PTP Rx filters Jeff Kirsher
2012-11-21 11:37   ` Richard Cochran
2012-11-21 10:47 ` [net-next 09/10] igb: No longer rely on APME to determine WoL settings Jeff Kirsher
2012-11-21 10:47 ` [net-next 10/10] igb: Do not parse past IP header on fragments beyond the first Jeff Kirsher
  -- strict thread matches above, loose matches on Subject: below --
2013-08-28 10:33 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-06-26 10:55 Jeff Kirsher
2013-02-08 10:39 Jeff Kirsher
2013-01-19 13:14 Jeff Kirsher
2013-01-19 15:53 ` David Miller
2012-03-19 21:22 Jeff Kirsher
2012-03-19 21:26 ` David Miller
2012-03-01  7:32 Jeff Kirsher
2012-03-01 21:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).