netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2013-07-29 12:51 Jeff Kirsher
  2013-07-29 12:51 ` [net-next 01/15] ixgbe: Retain VLAN filtering in promiscuous + VT mode Jeff Kirsher
                   ` (14 more replies)
  0 siblings, 15 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:51 UTC (permalink / raw)
  To: davem, bhelgaas; +Cc: Jeff Kirsher, netdev, gospo, sassmann, linux-pci

This series contains updates to ixgbe and pci.

The first patch for ixgbe from Greg Rose is the second submission.  The
first submission of "ixgbe: Retain VLAN filtering in promiscuous + VT
mode" had a typo, which Joe Perches pointed out and is fixed in this
submission.

Alex updates the ixgbe driver to use the generic helper pci_vfs_assigned
instead of the driver specific function ixgbe_vfs_are_assigned.

Don Skidmore provides 4 patches for ixgbe, the first being a fix for
flow control ethtool reporting.  Originally ixgbe_device_supports_autoneg_fc()
was expected to be called by only copper devices, which lead to false
information being displayed via ethtool.  Two other patches add support
for fixed fiber for SFP+ devices and the addition of a quad-port x520
adapter.  The last patch simply bumps the driver version.

Emil Tantilov provides 3 fixes for ixgbe, two of which resolve
semaphore lock issues.  The third fix resolves several issues in the
previous implementation of the SFF data dumps of SFP+ modules.

The remaining ixgbe and pci patches are from Jacob Keller.  The pci
patches exposes bus speed, link speed and bus width so that drivers
can take advantage of this information.  In addition, adds a pci function
which obtains minimum link width and speed.  Jacob also provides the
ixgbe patch to incorporate the pci function. He provides a patch that
fixes a lockdep issue created due to ixgbe_ptp_stop always running
cancel_work_sync even if the work item had not been created properly with
INIT_WORK. This issue was found and reported by Stephen Hemminger.

The following are changes since commit fe6f700d6cbb7e8a61711e325f53d9c9e0a42a4c:
  net/mlx4_core: Respond to operation request by firmware
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

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

Don Skidmore (4):
  ixgbe: fix fc autoneg ethtool reporting.
  ixgbe: add new media type
  ixgbe: bump version number
  ixgbe: add support for quad-port x520 adapter

Emil Tantilov (3):
  ixgbe: fix semaphore lock for I2C read/writes on 82598
  ixgbe: fix SFF data dumps of SFP+ modules
  ixgbe: clear semaphore bits on timeouts

Greg Rose (1):
  ixgbe: Retain VLAN filtering in promiscuous + VT mode

Jacob Keller (6):
  pci: expose pcie_link_speed and pcix_bus_speed arrays
  pci: move enum pcie_link_width into pci.h
  pci: Add function to obtain minimum link width and speed
  ixgbe: call pcie_get_mimimum_link to check if device has enough
    bandwidth
  ixgbe: fix lockdep annotation issue for ptp's work item
  ixgbe: rename LL_EXTENDED_STATS to use queue instead of q

 drivers/net/ethernet/intel/ixgbe/ixgbe.h         |   7 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c   |  34 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c   | 231 ++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c  |  88 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  94 ++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    | 158 +++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c     | 470 ++++++++++++++++-------
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h     |  41 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c     |  12 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c   | 101 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h    |  12 +
 drivers/pci/pci.c                                |  43 +++
 drivers/pci/probe.c                              |   4 +-
 include/linux/pci.h                              |  18 +
 include/linux/pci_hotplug.h                      |  13 -
 15 files changed, 983 insertions(+), 343 deletions(-)

-- 
1.7.11.7

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

* [net-next 01/15] ixgbe: Retain VLAN filtering in promiscuous + VT mode
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
@ 2013-07-29 12:51 ` Jeff Kirsher
  2013-07-29 12:51 ` [net-next 02/15] ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned Jeff Kirsher
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:51 UTC (permalink / raw)
  To: davem; +Cc: Greg Rose, netdev, gospo, sassmann, Jeff Kirsher

From: Greg Rose <gregory.v.rose@intel.com>

When 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.  This defeats the ability to use VLAN tagging
to isolate user networks.  When the device is in promiscuous mode and
VT mode simultaneously ensure that VLAN hardware filtering remains
enabled.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  | 11 ++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 66 ++++++++++++++++++++++++++
 2 files changed, 75 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index bad8f14..d837f81 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -3724,8 +3724,15 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
 		hw->addr_ctrl.user_set_promisc = true;
 		fctrl |= (IXGBE_FCTRL_UPE | IXGBE_FCTRL_MPE);
 		vmolr |= (IXGBE_VMOLR_ROPE | IXGBE_VMOLR_MPE);
-		/* don't hardware filter vlans in promisc mode */
-		ixgbe_vlan_filter_disable(adapter);
+		/* Only disable hardware filter vlans in promiscuous mode
+		 * if SR-IOV and VMDQ are disabled - otherwise ensure
+		 * that hardware VLAN filters remain enabled.
+		 */
+		if (!(adapter->flags & (IXGBE_FLAG_VMDQ_ENABLED |
+					IXGBE_FLAG_SRIOV_ENABLED)))
+			ixgbe_vlan_filter_disable(adapter);
+		else
+			ixgbe_vlan_filter_enable(adapter);
 	} else {
 		if (netdev->flags & IFF_ALLMULTI) {
 			fctrl |= IXGBE_FCTRL_MPE;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 1e7d587..6c624c9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -768,6 +768,29 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
 	return ixgbe_set_vf_mac(adapter, vf, new_mac) < 0;
 }
 
+static int ixgbe_find_vlvf_entry(struct ixgbe_hw *hw, u32 vlan)
+{
+	u32 vlvf;
+	s32 regindex;
+
+	/* short cut the special case */
+	if (vlan == 0)
+		return 0;
+
+	/* Search for the vlan id in the VLVF entries */
+	for (regindex = 1; regindex < IXGBE_VLVF_ENTRIES; regindex++) {
+		vlvf = IXGBE_READ_REG(hw, IXGBE_VLVF(regindex));
+		if ((vlvf & VLAN_VID_MASK) == vlan)
+			break;
+	}
+
+	/* Return a negative value if not found */
+	if (regindex >= IXGBE_VLVF_ENTRIES)
+		regindex = -1;
+
+	return regindex;
+}
+
 static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,
 				 u32 *msgbuf, u32 vf)
 {
@@ -775,6 +798,9 @@ static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,
 	int add = (msgbuf[0] & IXGBE_VT_MSGINFO_MASK) >> IXGBE_VT_MSGINFO_SHIFT;
 	int vid = (msgbuf[1] & IXGBE_VLVF_VLANID_MASK);
 	int err;
+	s32 reg_ndx;
+	u32 vlvf;
+	u32 bits;
 	u8 tcs = netdev_get_num_tc(adapter->netdev);
 
 	if (adapter->vfinfo[vf].pf_vlan || tcs) {
@@ -790,10 +816,50 @@ static int ixgbe_set_vf_vlan_msg(struct ixgbe_adapter *adapter,
 	else if (adapter->vfinfo[vf].vlan_count)
 		adapter->vfinfo[vf].vlan_count--;
 
+	/* in case of promiscuous mode any VLAN filter set for a VF must
+	 * also have the PF pool added to it.
+	 */
+	if (add && adapter->netdev->flags & IFF_PROMISC)
+		err = ixgbe_set_vf_vlan(adapter, add, vid, VMDQ_P(0));
+
 	err = ixgbe_set_vf_vlan(adapter, add, vid, vf);
 	if (!err && adapter->vfinfo[vf].spoofchk_enabled)
 		hw->mac.ops.set_vlan_anti_spoofing(hw, true, vf);
 
+	/* Go through all the checks to see if the VLAN filter should
+	 * be wiped completely.
+	 */
+	if (!add && adapter->netdev->flags & IFF_PROMISC) {
+		reg_ndx = ixgbe_find_vlvf_entry(hw, vid);
+		if (reg_ndx < 0)
+			goto out;
+		vlvf = IXGBE_READ_REG(hw, IXGBE_VLVF(reg_ndx));
+		/* See if any other pools are set for this VLAN filter
+		 * entry other than the PF.
+		 */
+		if (VMDQ_P(0) < 32) {
+			bits = IXGBE_READ_REG(hw, IXGBE_VLVFB(reg_ndx * 2));
+			bits &= ~(1 << VMDQ_P(0));
+			bits |= IXGBE_READ_REG(hw,
+					       IXGBE_VLVFB(reg_ndx * 2) + 1);
+		} else {
+			bits = IXGBE_READ_REG(hw,
+					      IXGBE_VLVFB(reg_ndx * 2) + 1);
+			bits &= ~(1 << (VMDQ_P(0) - 32));
+			bits |= IXGBE_READ_REG(hw, IXGBE_VLVFB(reg_ndx * 2));
+		}
+
+		/* If the filter was removed then ensure PF pool bit
+		 * is cleared if the PF only added itself to the pool
+		 * because the PF is in promiscuous mode.
+		 */
+		if ((vlvf & VLAN_VID_MASK) == vid &&
+		    !test_bit(vid, adapter->active_vlans) && !bits)
+			ixgbe_set_vf_vlan(adapter, add, vid, VMDQ_P(0));
+	}
+
+out:
+
 	return err;
 }
 
-- 
1.7.11.7

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

* [net-next 02/15] ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2013-07-29 12:51 ` [net-next 01/15] ixgbe: Retain VLAN filtering in promiscuous + VT mode Jeff Kirsher
@ 2013-07-29 12:51 ` Jeff Kirsher
  2013-07-29 12:51 ` [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting Jeff Kirsher
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:51 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 the ixgbe driver uses the generic helper
pci_vfs_assigned instead of the ixgbe specific function
ixgbe_vfs_are_assigned.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 35 +-------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 6c624c9..73c8e73 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -173,39 +173,6 @@ void ixgbe_enable_sriov(struct ixgbe_adapter *adapter)
 	ixgbe_disable_sriov(adapter);
 }
 
-static bool ixgbe_vfs_are_assigned(struct ixgbe_adapter *adapter)
-{
-	struct pci_dev *pdev = adapter->pdev;
-	struct pci_dev *vfdev;
-	int dev_id;
-
-	switch (adapter->hw.mac.type) {
-	case ixgbe_mac_82599EB:
-		dev_id = IXGBE_DEV_ID_82599_VF;
-		break;
-	case ixgbe_mac_X540:
-		dev_id = IXGBE_DEV_ID_X540_VF;
-		break;
-	default:
-		return false;
-	}
-
-	/* loop through all the VFs to see if we own any that are assigned */
-	vfdev = pci_get_device(PCI_VENDOR_ID_INTEL, dev_id, NULL);
-	while (vfdev) {
-		/* if we don't own it we don't care */
-		if (vfdev->is_virtfn && vfdev->physfn == pdev) {
-			/* if it is assigned we cannot release it */
-			if (vfdev->dev_flags & PCI_DEV_FLAGS_ASSIGNED)
-				return true;
-		}
-
-		vfdev = pci_get_device(PCI_VENDOR_ID_INTEL, dev_id, vfdev);
-	}
-
-	return false;
-}
-
 #endif /* #ifdef CONFIG_PCI_IOV */
 int ixgbe_disable_sriov(struct ixgbe_adapter *adapter)
 {
@@ -235,7 +202,7 @@ int ixgbe_disable_sriov(struct ixgbe_adapter *adapter)
 	 * without causing issues, so just leave the hardware
 	 * available but disabled
 	 */
-	if (ixgbe_vfs_are_assigned(adapter)) {
+	if (pci_vfs_assigned(adapter->pdev)) {
 		e_dev_warn("Unloading driver while VFs are assigned - VFs will not be deallocated\n");
 		return -EPERM;
 	}
-- 
1.7.11.7

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

* [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting.
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
  2013-07-29 12:51 ` [net-next 01/15] ixgbe: Retain VLAN filtering in promiscuous + VT mode Jeff Kirsher
  2013-07-29 12:51 ` [net-next 02/15] ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned Jeff Kirsher
@ 2013-07-29 12:51 ` Jeff Kirsher
  2013-07-30  5:18   ` David Miller
  2013-07-29 12:52 ` [net-next 04/15] ixgbe: add new media type Jeff Kirsher
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:51 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

Originally ixgbe_device_supports_autoneg_fc() was only expected to
be called by copper devices.  This would lead to false information
to be displayed via ethtool.

Signed-off-by: Don Skidmore <donald.c.skidmore@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_common.c  | 40 +++++++++++++++++++-----
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c |  9 +++---
 2 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 9bcdeb8..3c6859f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -67,15 +67,39 @@ static s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
  **/
 s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 {
+	bool supported = false;
+	ixgbe_link_speed speed;
+	bool link_up;
 
-	switch (hw->device_id) {
-	case IXGBE_DEV_ID_X540T:
-	case IXGBE_DEV_ID_X540T1:
-	case IXGBE_DEV_ID_82599_T3_LOM:
-		return 0;
+	switch (hw->phy.media_type) {
+	case ixgbe_media_type_fiber:
+		hw->mac.ops.check_link(hw, &speed, &link_up, false);
+		/* if link is down, assume supported */
+		if (link_up)
+			supported = speed == IXGBE_LINK_SPEED_1GB_FULL ?
+				true : false;
+		else
+			supported = true;
+		break;
+	case ixgbe_media_type_backplane:
+		supported = true;
+		break;
+	case ixgbe_media_type_copper:
+		/* only some copper devices support flow control autoneg */
+		switch (hw->device_id) {
+		case IXGBE_DEV_ID_82599_T3_LOM:
+		case IXGBE_DEV_ID_X540T:
+		case IXGBE_DEV_ID_X540T1:
+			supported = true;
+			break;
+		default:
+			break;
+		}
 	default:
-		return IXGBE_ERR_FC_NOT_SUPPORTED;
+		break;
 	}
+
+	return supported;
 }
 
 /**
@@ -234,7 +258,7 @@ static s32 ixgbe_setup_fc(struct ixgbe_hw *hw)
 						      IXGBE_GSSR_MAC_CSR_SM);
 
 	} else if ((hw->phy.media_type == ixgbe_media_type_copper) &&
-		    (ixgbe_device_supports_autoneg_fc(hw) == 0)) {
+		    (ixgbe_device_supports_autoneg_fc(hw))) {
 		hw->phy.ops.write_reg(hw, MDIO_AN_ADVERTISE,
 				      MDIO_MMD_AN, reg_cu);
 	}
@@ -2392,7 +2416,7 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 
 	/* Autoneg flow control on copper adapters */
 	case ixgbe_media_type_copper:
-		if (ixgbe_device_supports_autoneg_fc(hw) == 0)
+		if (ixgbe_device_supports_autoneg_fc(hw))
 			ret_val = ixgbe_fc_autoneg_copper(hw);
 		break;
 
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 24e2e7a..ae58a92 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -355,10 +355,11 @@ static void ixgbe_get_pauseparam(struct net_device *netdev,
 	struct ixgbe_adapter *adapter = netdev_priv(netdev);
 	struct ixgbe_hw *hw = &adapter->hw;
 
-	if (hw->fc.disable_fc_autoneg)
-		pause->autoneg = 0;
-	else
+	if (ixgbe_device_supports_autoneg_fc(hw) &&
+	    !hw->fc.disable_fc_autoneg)
 		pause->autoneg = 1;
+	else
+		pause->autoneg = 0;
 
 	if (hw->fc.current_mode == ixgbe_fc_rx_pause) {
 		pause->rx_pause = 1;
@@ -384,7 +385,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
 
 	/* some devices do not support autoneg of link flow control */
 	if ((pause->autoneg == AUTONEG_ENABLE) &&
-	    (ixgbe_device_supports_autoneg_fc(hw) != 0))
+	    !ixgbe_device_supports_autoneg_fc(hw))
 		return -EINVAL;
 
 	fc.disable_fc_autoneg = (pause->autoneg != AUTONEG_ENABLE);
-- 
1.7.11.7

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

* [net-next 04/15] ixgbe: add new media type
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (2 preceding siblings ...)
  2013-07-29 12:51 ` [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-30  5:20   ` David Miller
  2013-07-29 12:52 ` [net-next 05/15] ixgbe: bump version number Jeff Kirsher
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

This patch adds support for a new media type fiber_fixed.  This is useful
to avoid all the SFP+ hot plug support path on devices who's fix fiber need
not worry about such things.  This patch is needed for a following patch
that adds support for "fiber_fixed" devices.

Signed-off-by: Don Skidmore <donald.c.skidmore@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_82599.c  | 84 ++++++++++++++++++++++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c |  3 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h    |  5 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h   |  1 +
 4 files changed, 86 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index 0b82d38..b92765b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -527,6 +527,66 @@ static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
 }
 
 /**
+ *  ixgbe_set_fiber_fixed_speed - Set module link speed for fixed fiber
+ *  @hw: pointer to hardware structure
+ *  @speed: link speed to set
+ *
+ *  We set the module speed differently for fixed fiber.  For other
+ *  multi-speed devices we don't have an error value so here if we
+ *  detect an error we just log it and exit.
+ */
+static void ixgbe_set_fiber_fixed_speed(struct ixgbe_hw *hw,
+					ixgbe_link_speed speed)
+{
+	s32 status;
+	u8 rs, eeprom_data;
+
+	switch (speed) {
+	case IXGBE_LINK_SPEED_10GB_FULL:
+		/* one bit mask same as setting on */
+		rs = IXGBE_SFF_SOFT_RS_SELECT_10G;
+		break;
+	case IXGBE_LINK_SPEED_1GB_FULL:
+		rs = IXGBE_SFF_SOFT_RS_SELECT_1G;
+		break;
+	default:
+		hw_dbg(hw, "Invalid fixed module speed\n");
+		return;
+	}
+
+	/* Set RS0 */
+	status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB,
+					   IXGBE_I2C_EEPROM_DEV_ADDR2,
+					   &eeprom_data);
+	if (status) {
+		hw_dbg(hw, "Failed to read Rx Rate Select RS0\n");
+		goto out;
+	}
+
+	eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) & rs;
+
+	status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB,
+					    IXGBE_I2C_EEPROM_DEV_ADDR2,
+					    eeprom_data);
+	if (status) {
+		hw_dbg(hw, "Failed to read Rx Rate Select RS1\n");
+		goto out;
+	}
+
+	eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) & rs;
+
+	status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_ESCB,
+					    IXGBE_I2C_EEPROM_DEV_ADDR2,
+					    eeprom_data);
+	if (status) {
+		hw_dbg(hw, "Failed to write Rx Rate Select RS1\n");
+		goto out;
+	}
+out:
+	return;
+}
+
+/**
  *  ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed
  *  @hw: pointer to hardware structure
  *  @speed: new link speed
@@ -573,9 +633,14 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 			goto out;
 
 		/* Set the module link speed */
-		esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5);
-		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
-		IXGBE_WRITE_FLUSH(hw);
+		if (hw->phy.media_type == ixgbe_media_type_fiber_fixed) {
+			ixgbe_set_fiber_fixed_speed(hw,
+					IXGBE_LINK_SPEED_10GB_FULL);
+		} else {
+			esdp_reg |= (IXGBE_ESDP_SDP5_DIR | IXGBE_ESDP_SDP5);
+			IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
+			IXGBE_WRITE_FLUSH(hw);
+		}
 
 		/* Allow module to change analog characteristics (1G->10G) */
 		msleep(40);
@@ -625,10 +690,15 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
 			goto out;
 
 		/* Set the module link speed */
-		esdp_reg &= ~IXGBE_ESDP_SDP5;
-		esdp_reg |= IXGBE_ESDP_SDP5_DIR;
-		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
-		IXGBE_WRITE_FLUSH(hw);
+		if (hw->phy.media_type == ixgbe_media_type_fiber_fixed) {
+			ixgbe_set_fiber_fixed_speed(hw,
+						IXGBE_LINK_SPEED_1GB_FULL);
+		} else {
+			esdp_reg &= ~IXGBE_ESDP_SDP5;
+			esdp_reg |= IXGBE_ESDP_SDP5_DIR;
+			IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp_reg);
+			IXGBE_WRITE_FLUSH(hw);
+		}
 
 		/* Allow module to change analog characteristics (10G->1G) */
 		msleep(40);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 3c6859f..6e5d4bc 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -72,6 +72,7 @@ s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
 	bool link_up;
 
 	switch (hw->phy.media_type) {
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber:
 		hw->mac.ops.check_link(hw, &speed, &link_up, false);
 		/* if link is down, assume supported */
@@ -138,6 +139,7 @@ static s32 ixgbe_setup_fc(struct ixgbe_hw *hw)
 	 * we link at 10G, the 1G advertisement is harmless and vice versa.
 	 */
 	switch (hw->phy.media_type) {
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber:
 	case ixgbe_media_type_backplane:
 		reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
@@ -2404,6 +2406,7 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)
 
 	switch (hw->phy.media_type) {
 	/* Autoneg flow control on fiber adapters */
+	case ixgbe_media_type_fiber_fixed:
 	case ixgbe_media_type_fiber:
 		if (speed == IXGBE_LINK_SPEED_1GB_FULL)
 			ret_val = ixgbe_fc_autoneg_fiber(hw);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
index 886a343..046a01e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
@@ -44,6 +44,8 @@
 #define IXGBE_SFF_CABLE_SPEC_COMP    0x3C
 #define IXGBE_SFF_SFF_8472_SWAP      0x5C
 #define IXGBE_SFF_SFF_8472_COMP      0x5E
+#define IXGBE_SFF_SFF_8472_OSCB         0x6E
+#define IXGBE_SFF_SFF_8472_ESCB         0x76
 
 /* Bitmasks */
 #define IXGBE_SFF_DA_PASSIVE_CABLE           0x4
@@ -54,6 +56,9 @@
 #define IXGBE_SFF_1GBASET_CAPABLE            0x8
 #define IXGBE_SFF_10GBASESR_CAPABLE          0x10
 #define IXGBE_SFF_10GBASELR_CAPABLE          0x20
+#define IXGBE_SFF_SOFT_RS_SELECT_MASK   0x8
+#define IXGBE_SFF_SOFT_RS_SELECT_10G    0x8
+#define IXGBE_SFF_SOFT_RS_SELECT_1G     0x0
 #define IXGBE_SFF_ADDRESSING_MODE	     0x4
 #define IXGBE_I2C_EEPROM_READ_MASK           0x100
 #define IXGBE_I2C_EEPROM_STATUS_MASK         0x3
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 70c6aa3..8968ea0 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -2622,6 +2622,7 @@ enum ixgbe_sfp_type {
 enum ixgbe_media_type {
 	ixgbe_media_type_unknown = 0,
 	ixgbe_media_type_fiber,
+	ixgbe_media_type_fiber_fixed,
 	ixgbe_media_type_fiber_lco,
 	ixgbe_media_type_copper,
 	ixgbe_media_type_backplane,
-- 
1.7.11.7

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

* [net-next 05/15] ixgbe: bump version number
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (3 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 04/15] ixgbe: add new media type Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 12:52 ` [net-next 06/15] ixgbe: fix semaphore lock for I2C read/writes on 82598 Jeff Kirsher
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

Bump the version number to better match with a similar version of the
out of tree driver.

Signed-off-by: Don Skidmore <donald.c.skidmore@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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index d837f81..6a2b7a0 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -63,7 +63,7 @@ char ixgbe_default_device_descr[] =
 static char ixgbe_default_device_descr[] =
 			      "Intel(R) 10 Gigabit Network Connection";
 #endif
-#define DRV_VERSION "3.13.10-k"
+#define DRV_VERSION "3.15.1-k"
 const char ixgbe_driver_version[] = DRV_VERSION;
 static const char ixgbe_copyright[] =
 				"Copyright (c) 1999-2013 Intel Corporation.";
-- 
1.7.11.7

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

* [net-next 06/15] ixgbe: fix semaphore lock for I2C read/writes on 82598
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (4 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 05/15] ixgbe: bump version number Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 12:52 ` [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules Jeff Kirsher
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Emil Tantilov, netdev, gospo, sassmann, Jeff Kirsher

From: Emil Tantilov <emil.s.tantilov@intel.com>

ixgbe_read/write_i2c_phy_82598() does not hold the SWFW_SYNC
semaphore for the entire function. Instead the lock is held only
during the phy.ops.read/write_reg operations. As result when the
function is being called simultaneously the I2C read/writes can
be corrupted.

The following patch introduces the SWFW_SYNC semaphore for the
entire ixgbe_read/write_i2c_phy_82598() function. To accomplish
this I had to create 2 separate functions:

ixgbe_read_phy_reg_mdi()
ixgbe_write_phy_reg_mdi()

Those functions are identical to ixgbe_read/write_phy_reg_generic()
sans the locking, and can be used in ixgbe_read/write_i2c_phy_82598()
with the SWFW_SYNC semaphore being held.

Signed-off-by: Emil Tantilov <emil.s.tantilov@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_82598.c |  32 ++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c   | 292 +++++++++++++------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h   |   4 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h  |   2 +
 4 files changed, 182 insertions(+), 148 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
index 4a5bfb6..d011d5c 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
@@ -1018,8 +1018,17 @@ static s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,
 	u16 sfp_addr = 0;
 	u16 sfp_data = 0;
 	u16 sfp_stat = 0;
+	u16 gssr;
 	u32 i;
 
+	if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
+		gssr = IXGBE_GSSR_PHY1_SM;
+	else
+		gssr = IXGBE_GSSR_PHY0_SM;
+
+	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) != 0)
+		return IXGBE_ERR_SWFW_SYNC;
+
 	if (hw->phy.type == ixgbe_phy_nl) {
 		/*
 		 * phy SDA/SCL registers are at addresses 0xC30A to
@@ -1028,17 +1037,17 @@ static s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,
 		 */
 		sfp_addr = (dev_addr << 8) + byte_offset;
 		sfp_addr = (sfp_addr | IXGBE_I2C_EEPROM_READ_MASK);
-		hw->phy.ops.write_reg(hw,
-		                      IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR,
-		                      MDIO_MMD_PMAPMD,
-		                      sfp_addr);
+		hw->phy.ops.write_reg_mdi(hw,
+					  IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR,
+					  MDIO_MMD_PMAPMD,
+					  sfp_addr);
 
 		/* Poll status */
 		for (i = 0; i < 100; i++) {
-			hw->phy.ops.read_reg(hw,
-			                     IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT,
-			                     MDIO_MMD_PMAPMD,
-			                     &sfp_stat);
+			hw->phy.ops.read_reg_mdi(hw,
+						IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT,
+						MDIO_MMD_PMAPMD,
+						&sfp_stat);
 			sfp_stat = sfp_stat & IXGBE_I2C_EEPROM_STATUS_MASK;
 			if (sfp_stat != IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS)
 				break;
@@ -1052,8 +1061,8 @@ static s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,
 		}
 
 		/* Read data */
-		hw->phy.ops.read_reg(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA,
-		                     MDIO_MMD_PMAPMD, &sfp_data);
+		hw->phy.ops.read_reg_mdi(hw, IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA,
+					MDIO_MMD_PMAPMD, &sfp_data);
 
 		*eeprom_data = (u8)(sfp_data >> 8);
 	} else {
@@ -1061,6 +1070,7 @@ static s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,
 	}
 
 out:
+	hw->mac.ops.release_swfw_sync(hw, gssr);
 	return status;
 }
 
@@ -1326,6 +1336,8 @@ static struct ixgbe_phy_operations phy_ops_82598 = {
 	.reset			= &ixgbe_reset_phy_generic,
 	.read_reg		= &ixgbe_read_phy_reg_generic,
 	.write_reg		= &ixgbe_write_phy_reg_generic,
+	.read_reg_mdi		= &ixgbe_read_phy_reg_mdi,
+	.write_reg_mdi		= &ixgbe_write_phy_reg_mdi,
 	.setup_link		= &ixgbe_setup_phy_link_generic,
 	.setup_link_speed	= &ixgbe_setup_phy_link_speed_generic,
 	.read_i2c_sff8472	= &ixgbe_read_i2c_sff8472_82598,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index e5691cc..71f554a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -204,7 +204,83 @@ out:
 }
 
 /**
+ *  ixgbe_read_phy_mdi - Reads a value from a specified PHY register without
+ *  the SWFW lock
+ *  @hw: pointer to hardware structure
+ *  @reg_addr: 32 bit address of PHY register to read
+ *  @phy_data: Pointer to read data from PHY register
+ **/
+s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
+		       u16 *phy_data)
+{
+	u32 i, data, command;
+
+	/* Setup and write the address cycle command */
+	command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
+		   (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
+		   (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
+		   (IXGBE_MSCA_ADDR_CYCLE | IXGBE_MSCA_MDI_COMMAND));
+
+	IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
+
+	/* Check every 10 usec to see if the address cycle completed.
+	 * The MDI Command bit will clear when the operation is
+	 * complete
+	 */
+	for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
+		udelay(10);
+
+		command = IXGBE_READ_REG(hw, IXGBE_MSCA);
+		if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
+				break;
+	}
+
+
+	if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
+		hw_dbg(hw, "PHY address command did not complete.\n");
+		return IXGBE_ERR_PHY;
+	}
+
+	/* Address cycle complete, setup and write the read
+	 * command
+	 */
+	command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
+		   (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
+		   (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
+		   (IXGBE_MSCA_READ | IXGBE_MSCA_MDI_COMMAND));
+
+	IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
+
+	/* Check every 10 usec to see if the address cycle
+	 * completed. The MDI Command bit will clear when the
+	 * operation is complete
+	 */
+	for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
+		udelay(10);
+
+		command = IXGBE_READ_REG(hw, IXGBE_MSCA);
+		if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
+			break;
+	}
+
+	if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
+		hw_dbg(hw, "PHY read command didn't complete\n");
+		return IXGBE_ERR_PHY;
+	}
+
+	/* Read operation is complete.  Get the data
+	 * from MSRWD
+	 */
+	data = IXGBE_READ_REG(hw, IXGBE_MSRWD);
+	data >>= IXGBE_MSRWD_READ_DATA_SHIFT;
+	*phy_data = (u16)(data);
+
+	return 0;
+}
+
+/**
  *  ixgbe_read_phy_reg_generic - Reads a value from a specified PHY register
+ *  using the SWFW lock - this function is needed in most cases
  *  @hw: pointer to hardware structure
  *  @reg_addr: 32 bit address of PHY register to read
  *  @phy_data: Pointer to read data from PHY register
@@ -212,10 +288,7 @@ out:
 s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
                                u32 device_type, u16 *phy_data)
 {
-	u32 command;
-	u32 i;
-	u32 data;
-	s32 status = 0;
+	s32 status;
 	u16 gssr;
 
 	if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
@@ -223,86 +296,93 @@ s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
 	else
 		gssr = IXGBE_GSSR_PHY0_SM;
 
-	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) != 0)
+	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) == 0) {
+		status = ixgbe_read_phy_reg_mdi(hw, reg_addr, device_type,
+						phy_data);
+		hw->mac.ops.release_swfw_sync(hw, gssr);
+	} else {
 		status = IXGBE_ERR_SWFW_SYNC;
+	}
 
-	if (status == 0) {
-		/* Setup and write the address cycle command */
-		command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
-		           (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
-		           (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
-		           (IXGBE_MSCA_ADDR_CYCLE | IXGBE_MSCA_MDI_COMMAND));
+	return status;
+}
 
-		IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
+/**
+ *  ixgbe_write_phy_reg_mdi - Writes a value to specified PHY register
+ *  without SWFW lock
+ *  @hw: pointer to hardware structure
+ *  @reg_addr: 32 bit PHY register to write
+ *  @device_type: 5 bit device type
+ *  @phy_data: Data to write to the PHY register
+ **/
+s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr,
+				u32 device_type, u16 phy_data)
+{
+	u32 i, command;
 
-		/*
-		 * Check every 10 usec to see if the address cycle completed.
-		 * The MDI Command bit will clear when the operation is
-		 * complete
-		 */
-		for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
-			udelay(10);
+	/* Put the data in the MDI single read and write data register*/
+	IXGBE_WRITE_REG(hw, IXGBE_MSRWD, (u32)phy_data);
 
-			command = IXGBE_READ_REG(hw, IXGBE_MSCA);
+	/* Setup and write the address cycle command */
+	command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
+		   (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
+		   (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
+		   (IXGBE_MSCA_ADDR_CYCLE | IXGBE_MSCA_MDI_COMMAND));
 
-			if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
-				break;
-		}
+	IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
 
-		if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
-			hw_dbg(hw, "PHY address command did not complete.\n");
-			status = IXGBE_ERR_PHY;
-		}
+	/*
+	 * Check every 10 usec to see if the address cycle completed.
+	 * The MDI Command bit will clear when the operation is
+	 * complete
+	 */
+	for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
+		udelay(10);
 
-		if (status == 0) {
-			/*
-			 * Address cycle complete, setup and write the read
-			 * command
-			 */
-			command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
-			           (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
-			           (hw->phy.mdio.prtad <<
-				    IXGBE_MSCA_PHY_ADDR_SHIFT) |
-			           (IXGBE_MSCA_READ | IXGBE_MSCA_MDI_COMMAND));
-
-			IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-
-			/*
-			 * Check every 10 usec to see if the address cycle
-			 * completed. The MDI Command bit will clear when the
-			 * operation is complete
-			 */
-			for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
-				udelay(10);
-
-				command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-
-				if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
-					break;
-			}
+		command = IXGBE_READ_REG(hw, IXGBE_MSCA);
+		if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
+			break;
+	}
 
-			if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
-				hw_dbg(hw, "PHY read command didn't complete\n");
-				status = IXGBE_ERR_PHY;
-			} else {
-				/*
-				 * Read operation is complete.  Get the data
-				 * from MSRWD
-				 */
-				data = IXGBE_READ_REG(hw, IXGBE_MSRWD);
-				data >>= IXGBE_MSRWD_READ_DATA_SHIFT;
-				*phy_data = (u16)(data);
-			}
-		}
+	if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
+		hw_dbg(hw, "PHY address cmd didn't complete\n");
+		return IXGBE_ERR_PHY;
+	}
 
-		hw->mac.ops.release_swfw_sync(hw, gssr);
+	/*
+	 * Address cycle complete, setup and write the write
+	 * command
+	 */
+	command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
+		   (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
+		   (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
+		   (IXGBE_MSCA_WRITE | IXGBE_MSCA_MDI_COMMAND));
+
+	IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
+
+	/* Check every 10 usec to see if the address cycle
+	 * completed. The MDI Command bit will clear when the
+	 * operation is complete
+	 */
+	for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
+		udelay(10);
+
+		command = IXGBE_READ_REG(hw, IXGBE_MSCA);
+		if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
+			break;
 	}
 
-	return status;
+	if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
+		hw_dbg(hw, "PHY write cmd didn't complete\n");
+		return IXGBE_ERR_PHY;
+	}
+
+	return 0;
 }
 
 /**
  *  ixgbe_write_phy_reg_generic - Writes a value to specified PHY register
+ *  using SWFW lock- this function is needed in most cases
  *  @hw: pointer to hardware structure
  *  @reg_addr: 32 bit PHY register to write
  *  @device_type: 5 bit device type
@@ -311,9 +391,7 @@ s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
 s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
                                 u32 device_type, u16 phy_data)
 {
-	u32 command;
-	u32 i;
-	s32 status = 0;
+	s32 status;
 	u16 gssr;
 
 	if (IXGBE_READ_REG(hw, IXGBE_STATUS) & IXGBE_STATUS_LAN_ID_1)
@@ -321,74 +399,12 @@ s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
 	else
 		gssr = IXGBE_GSSR_PHY0_SM;
 
-	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) != 0)
-		status = IXGBE_ERR_SWFW_SYNC;
-
-	if (status == 0) {
-		/* Put the data in the MDI single read and write data register*/
-		IXGBE_WRITE_REG(hw, IXGBE_MSRWD, (u32)phy_data);
-
-		/* Setup and write the address cycle command */
-		command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
-		           (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
-		           (hw->phy.mdio.prtad << IXGBE_MSCA_PHY_ADDR_SHIFT) |
-		           (IXGBE_MSCA_ADDR_CYCLE | IXGBE_MSCA_MDI_COMMAND));
-
-		IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-
-		/*
-		 * Check every 10 usec to see if the address cycle completed.
-		 * The MDI Command bit will clear when the operation is
-		 * complete
-		 */
-		for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
-			udelay(10);
-
-			command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-
-			if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
-				break;
-		}
-
-		if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
-			hw_dbg(hw, "PHY address cmd didn't complete\n");
-			status = IXGBE_ERR_PHY;
-		}
-
-		if (status == 0) {
-			/*
-			 * Address cycle complete, setup and write the write
-			 * command
-			 */
-			command = ((reg_addr << IXGBE_MSCA_NP_ADDR_SHIFT)  |
-			           (device_type << IXGBE_MSCA_DEV_TYPE_SHIFT) |
-			           (hw->phy.mdio.prtad <<
-				    IXGBE_MSCA_PHY_ADDR_SHIFT) |
-			           (IXGBE_MSCA_WRITE | IXGBE_MSCA_MDI_COMMAND));
-
-			IXGBE_WRITE_REG(hw, IXGBE_MSCA, command);
-
-			/*
-			 * Check every 10 usec to see if the address cycle
-			 * completed. The MDI Command bit will clear when the
-			 * operation is complete
-			 */
-			for (i = 0; i < IXGBE_MDIO_COMMAND_TIMEOUT; i++) {
-				udelay(10);
-
-				command = IXGBE_READ_REG(hw, IXGBE_MSCA);
-
-				if ((command & IXGBE_MSCA_MDI_COMMAND) == 0)
-					break;
-			}
-
-			if ((command & IXGBE_MSCA_MDI_COMMAND) != 0) {
-				hw_dbg(hw, "PHY address cmd didn't complete\n");
-				status = IXGBE_ERR_PHY;
-			}
-		}
-
+	if (hw->mac.ops.acquire_swfw_sync(hw, gssr) == 0) {
+		status = ixgbe_write_phy_reg_mdi(hw, reg_addr, device_type,
+						 phy_data);
 		hw->mac.ops.release_swfw_sync(hw, gssr);
+	} else {
+		status = IXGBE_ERR_SWFW_SYNC;
 	}
 
 	return status;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
index 046a01e..fe64e723 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
@@ -107,6 +107,10 @@ s32 ixgbe_read_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
                                u32 device_type, u16 *phy_data);
 s32 ixgbe_write_phy_reg_generic(struct ixgbe_hw *hw, u32 reg_addr,
                                 u32 device_type, u16 phy_data);
+s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr,
+			   u32 device_type, u16 *phy_data);
+s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr,
+			    u32 device_type, u16 phy_data);
 s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw);
 s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,
                                        ixgbe_link_speed speed,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 8968ea0..4c91ea6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -2886,6 +2886,8 @@ struct ixgbe_phy_operations {
 	s32 (*reset)(struct ixgbe_hw *);
 	s32 (*read_reg)(struct ixgbe_hw *, u32, u32, u16 *);
 	s32 (*write_reg)(struct ixgbe_hw *, u32, u32, u16);
+	s32 (*read_reg_mdi)(struct ixgbe_hw *, u32, u32, u16 *);
+	s32 (*write_reg_mdi)(struct ixgbe_hw *, u32, u32, u16);
 	s32 (*setup_link)(struct ixgbe_hw *);
 	s32 (*setup_link_speed)(struct ixgbe_hw *, ixgbe_link_speed, bool);
 	s32 (*check_link)(struct ixgbe_hw *, ixgbe_link_speed *, bool *);
-- 
1.7.11.7

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

* [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (5 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 06/15] ixgbe: fix semaphore lock for I2C read/writes on 82598 Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-08-02  9:08   ` Ben Hutchings
  2013-07-29 12:52 ` [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays Jeff Kirsher
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Emil Tantilov, netdev, gospo, sassmann, Jeff Kirsher

From: Emil Tantilov <emil.s.tantilov@intel.com>

This patch fixes several issues with the previous implementation of the
SFF data dump of SFP+ modules:

- removed the __IXGBE_READ_I2C flag - I2C access locking is handled in the
  HW specific routines

- fixed the read loop to read data from ee->offset to ee->len

- the reads fail if __IXGBE_IN_SFP_INIT is set in the process - this is
  needed because on some HW I2C operations can take long time and disrupt
  the SFP and link detection process

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reported-by: Ben Hutchings <bhutchings@solarflare.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.h         |  1 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 73 ++++++------------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c    |  4 --
 3 files changed, 18 insertions(+), 60 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index 7be725c..d882278 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -754,7 +754,6 @@ enum ixgbe_state_t {
 	__IXGBE_DOWN,
 	__IXGBE_SERVICE_SCHED,
 	__IXGBE_IN_SFP_INIT,
-	__IXGBE_READ_I2C,
 };
 
 struct ixgbe_cb {
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index ae58a92..da1ea28 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -2910,33 +2910,21 @@ static int ixgbe_get_module_info(struct net_device *dev,
 	struct ixgbe_hw *hw = &adapter->hw;
 	u32 status;
 	u8 sff8472_rev, addr_mode;
-	int ret_val = 0;
 	bool page_swap = false;
 
-	/* avoid concurent i2c reads */
-	while (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
-		msleep(100);
-
-	/* used by the service task */
-	set_bit(__IXGBE_READ_I2C, &adapter->state);
-
 	/* Check whether we support SFF-8472 or not */
 	status = hw->phy.ops.read_i2c_eeprom(hw,
 					     IXGBE_SFF_SFF_8472_COMP,
 					     &sff8472_rev);
-	if (status != 0) {
-		ret_val = -EIO;
-		goto err_out;
-	}
+	if (status != 0)
+		return -EIO;
 
 	/* addressing mode is not supported */
 	status = hw->phy.ops.read_i2c_eeprom(hw,
 					     IXGBE_SFF_SFF_8472_SWAP,
 					     &addr_mode);
-	if (status != 0) {
-		ret_val = -EIO;
-		goto err_out;
-	}
+	if (status != 0)
+		return -EIO;
 
 	if (addr_mode & IXGBE_SFF_ADDRESSING_MODE) {
 		e_err(drv, "Address change required to access page 0xA2, but not supported. Please report the module type to the driver maintainers.\n");
@@ -2953,9 +2941,7 @@ static int ixgbe_get_module_info(struct net_device *dev,
 		modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
 	}
 
-err_out:
-	clear_bit(__IXGBE_READ_I2C, &adapter->state);
-	return ret_val;
+	return 0;
 }
 
 static int ixgbe_get_module_eeprom(struct net_device *dev,
@@ -2969,48 +2955,25 @@ static int ixgbe_get_module_eeprom(struct net_device *dev,
 	int i = 0;
 	int ret_val = 0;
 
-	/* ixgbe_get_module_info is called before this function in all
-	 * cases, so we do not need any checks we already do above,
-	 * and can trust ee->len to be a known value.
-	 */
+	if (ee->len == 0)
+		return -EINVAL;
 
-	while (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
-		msleep(100);
-	set_bit(__IXGBE_READ_I2C, &adapter->state);
+	for (i = ee->offset; i < ee->len; i++) {
+		/* I2C reads can take long time */
+		if (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
+			return -EBUSY;
 
-	/* Read the first block, SFF-8079 */
-	for (i = 0; i < ETH_MODULE_SFF_8079_LEN; i++) {
-		status = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);
-		if (status != 0) {
-			/* Error occured while reading module */
+		if (i < ETH_MODULE_SFF_8079_LEN)
+			status  = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);
+		else
+			status = hw->phy.ops.read_i2c_sff8472(hw, i, &databyte);
+
+		if (status != 0)
 			ret_val = -EIO;
-			goto err_out;
-		}
-		data[i] = databyte;
-	}
 
-	/* If the second block is requested, check if SFF-8472 is supported. */
-	if (ee->len == ETH_MODULE_SFF_8472_LEN) {
-		if (data[IXGBE_SFF_SFF_8472_COMP] == IXGBE_SFF_SFF_8472_UNSUP)
-			return -EOPNOTSUPP;
-
-		/* Read the second block, SFF-8472 */
-		for (i = ETH_MODULE_SFF_8079_LEN;
-		     i < ETH_MODULE_SFF_8472_LEN; i++) {
-			status = hw->phy.ops.read_i2c_sff8472(hw,
-				i - ETH_MODULE_SFF_8079_LEN, &databyte);
-			if (status != 0) {
-				/* Error occured while reading module */
-				ret_val = -EIO;
-				goto err_out;
-			}
-			data[i] = databyte;
-		}
+		data[i - ee->offset] = databyte;
 	}
 
-err_out:
-	clear_bit(__IXGBE_READ_I2C, &adapter->state);
-
 	return ret_val;
 }
 
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 6a2b7a0..3aff87e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -5833,10 +5833,6 @@ static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter)
 	    !(adapter->flags2 & IXGBE_FLAG2_SFP_NEEDS_RESET))
 		return;
 
-	/* concurent i2c reads are not supported */
-	if (test_bit(__IXGBE_READ_I2C, &adapter->state))
-		return;
-
 	/* someone else is in init, wait until next service event */
 	if (test_and_set_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
 		return;
-- 
1.7.11.7

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

* [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (6 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 18:44   ` Bjorn Helgaas
  2013-07-29 12:52 ` [net-next 09/15] pci: move enum pcie_link_width into pci.h Jeff Kirsher
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem, bhelgaas
  Cc: Jacob Keller, netdev, gospo, sassmann, linux-pci, Jeff Kirsher

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

pcie_link_speed and pcix_bus_speed are arrays used by probe.c to correctly
convert lnksta register values into the pci_bus_speed enum. These static arrays
are useful outside probe for this purpose. This patch makes these defines into
const arrays and exposes them with an extern header in linux/include/pci.h

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/pci/probe.c | 4 ++--
 include/linux/pci.h | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 46ada5c..496c5b0 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -513,7 +513,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
 	return bridge;
 }
 
-static unsigned char pcix_bus_speed[] = {
+const unsigned char pcix_bus_speed[] = {
 	PCI_SPEED_UNKNOWN,		/* 0 */
 	PCI_SPEED_66MHz_PCIX,		/* 1 */
 	PCI_SPEED_100MHz_PCIX,		/* 2 */
@@ -532,7 +532,7 @@ static unsigned char pcix_bus_speed[] = {
 	PCI_SPEED_133MHz_PCIX_533	/* F */
 };
 
-static unsigned char pcie_link_speed[] = {
+const unsigned char pcie_link_speed[] = {
 	PCI_SPEED_UNKNOWN,		/* 0 */
 	PCIE_SPEED_2_5GT,		/* 1 */
 	PCIE_SPEED_5_0GT,		/* 2 */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 0fd1f15..95ff993 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -120,6 +120,9 @@ typedef int __bitwise pci_power_t;
 /* Remember to update this when the list above changes! */
 extern const char *pci_power_names[];
 
+extern const unsigned char pcix_bus_speed[];
+extern const unsigned char pcie_link_speed[];
+
 static inline const char *pci_power_name(pci_power_t state)
 {
 	return pci_power_names[1 + (int) state];
-- 
1.7.11.7

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

* [net-next 09/15] pci: move enum pcie_link_width into pci.h
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (7 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 18:39   ` Bjorn Helgaas
  2013-07-29 12:52 ` [net-next 10/15] pci: Add function to obtain minimum link width and speed Jeff Kirsher
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem, bhelgaas
  Cc: Jacob Keller, netdev, gospo, sassmann, linux-pci, Jeff Kirsher

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

pcie_link_width is the enum used to define the link width values for a pcie
device. This enum should not be contained solely in pci_hotplug.h, and this
patch moves it next to pci_bus_speed in pci.h

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>
---
 include/linux/pci.h         | 13 +++++++++++++
 include/linux/pci_hotplug.h | 13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 95ff993..fc2d1fb 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -186,6 +186,19 @@ enum pci_bus_flags {
 	PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
 };
 
+/* These values come from the PCI Express Spec */
+enum pcie_link_width {
+	PCIE_LNK_WIDTH_RESRV	= 0x00,
+	PCIE_LNK_X1		= 0x01,
+	PCIE_LNK_X2		= 0x02,
+	PCIE_LNK_X4		= 0x04,
+	PCIE_LNK_X8		= 0x08,
+	PCIE_LNK_X12		= 0x0C,
+	PCIE_LNK_X16		= 0x10,
+	PCIE_LNK_X32		= 0x20,
+	PCIE_LNK_WIDTH_UNKNOWN  = 0xFF,
+};
+
 /* Based on the PCI Hotplug Spec, but some values are made up by us */
 enum pci_bus_speed {
 	PCI_SPEED_33MHz			= 0x00,
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 8db71dc..64e61e0 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -28,19 +28,6 @@
 #ifndef _PCI_HOTPLUG_H
 #define _PCI_HOTPLUG_H
 
-/* These values come from the PCI Express Spec */
-enum pcie_link_width {
-	PCIE_LNK_WIDTH_RESRV	= 0x00,
-	PCIE_LNK_X1		= 0x01,
-	PCIE_LNK_X2		= 0x02,
-	PCIE_LNK_X4		= 0x04,
-	PCIE_LNK_X8		= 0x08,
-	PCIE_LNK_X12		= 0x0C,
-	PCIE_LNK_X16		= 0x10,
-	PCIE_LNK_X32		= 0x20,
-	PCIE_LNK_WIDTH_UNKNOWN  = 0xFF,
-};
-
 /**
  * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use
  * @owner: The module owner of this structure
-- 
1.7.11.7

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

* [net-next 10/15] pci: Add function to obtain minimum link width and speed
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (8 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 09/15] pci: move enum pcie_link_width into pci.h Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 18:45   ` Bjorn Helgaas
  2013-07-29 12:52 ` [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth Jeff Kirsher
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem, bhelgaas
  Cc: Jacob Keller, netdev, gospo, sassmann, linux-pci, Jeff Kirsher

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

A PCI Express device can potentially report a link width and speed which it will
not properly fulfill due to being plugged into a slower link higher in the
chain. This function walks up the PCI bus chain and calculates the minimum link
width and speed of this entire chain. This can be useful to enable a device to
determine if it has enough bandwidth for optimum functionality.

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/pci/pci.c   | 43 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/pci.h |  2 ++
 2 files changed, 45 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e37fea6..c71e78c 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3579,6 +3579,49 @@ int pcie_set_mps(struct pci_dev *dev, int mps)
 }
 
 /**
+ * pcie_get_minimum_link - determine minimum link settings of a PCI device
+ * @dev: PCI device to query
+ * @speed: storage for minimum speed
+ * @width: storage for minimum width
+ *
+ * This function will walk up the PCI device chain and determine the minimum
+ * link width and speed of the device.
+ */
+int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
+			  enum pcie_link_width *width)
+{
+	int ret;
+
+	*speed = PCI_SPEED_UNKNOWN;
+	*width = PCIE_LNK_WIDTH_UNKNOWN;
+
+	while (dev) {
+		u16 lnksta;
+		enum pci_bus_speed next_speed;
+		enum pcie_link_width next_width;
+
+		ret = pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
+		if (ret)
+			return ret;
+
+		next_speed = pcie_link_speed[lnksta & PCI_EXP_LNKSTA_CLS];
+		next_width = (lnksta & PCI_EXP_LNKSTA_NLW) >>
+			PCI_EXP_LNKSTA_NLW_SHIFT;
+
+		if (next_speed < *speed)
+			*speed = next_speed;
+
+		if (next_width < *width)
+			*width = next_width;
+
+		dev = dev->bus->self;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(pcie_get_minimum_link);
+
+/**
  * pci_select_bars - Make BAR mask from the type of resource
  * @dev: the PCI device for which BAR mask is made
  * @flags: resource type mask to be selected
diff --git a/include/linux/pci.h b/include/linux/pci.h
index fc2d1fb..38994de 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -937,6 +937,8 @@ int pcie_get_readrq(struct pci_dev *dev);
 int pcie_set_readrq(struct pci_dev *dev, int rq);
 int pcie_get_mps(struct pci_dev *dev);
 int pcie_set_mps(struct pci_dev *dev, int mps);
+int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
+			  enum pcie_link_width *width);
 int __pci_reset_function(struct pci_dev *dev);
 int __pci_reset_function_locked(struct pci_dev *dev);
 int pci_reset_function(struct pci_dev *dev);
-- 
1.7.11.7

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

* [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (9 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 10/15] pci: Add function to obtain minimum link width and speed Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 21:46   ` Keller, Jacob E
  2013-07-29 12:52 ` [net-next 12/15] ixgbe: fix lockdep annotation issue for ptp's work item Jeff Kirsher
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

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

This patch uses the new pcie_get_minimum_link function to perform a check to
ensure that the adapter is hooked into a slot which is capable of providing the
necessary bandwidth. This check supersedes the original method which only
checked the current pci device. The new method is capable of determining the
minimum speed and link of an entire PCI chain.

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_main.c | 130 ++++++++++++++++++++++++--
 1 file changed, 123 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 3aff87e..5ec2b74 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -195,6 +195,79 @@ static s32 ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter)
 	return 0;
 }
 
+/**
+ * ixgbe_check_from_parent - Determine whether PCIe info should come from parent
+ * @hw: hw specific details
+ *
+ * This function is used by probe to determine whether a device's PCI-Express
+ * bandwidth details should be gathered from the parent bus instead of from the
+ * device. Used to ensure that various locations all have the correct device ID
+ * checks.
+ */
+static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
+{
+	switch (hw->device_id) {
+	case IXGBE_DEV_ID_82599_SFP_SF_QP:
+		return true;
+	default:
+		return false;
+	}
+}
+
+static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
+				     int expected_gts)
+{
+	int max_gts = 0;
+	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
+	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
+	struct pci_dev *pdev;
+
+	/* determine whether to use the the parent device
+	 */
+	if (ixgbe_pcie_from_parent(&adapter->hw))
+		pdev = adapter->pdev->bus->parent->self;
+	else
+		pdev = adapter->pdev;
+
+	if (pcie_get_minimum_link(pdev, &speed, &width) ||
+	    speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) {
+		e_dev_warn("Unable to determine PCI-Express slot throughput.\n");
+		return;
+	}
+
+	switch (speed) {
+	case PCIE_SPEED_2_5GT:
+		/* 8b/10b encoding reduces max throughput */
+		max_gts = 2 * width;
+		break;
+	case PCIE_SPEED_5_0GT:
+		/* 8b/10b encoding reduces max throughput */
+		max_gts = 4 * width;
+		break;
+	case PCIE_SPEED_8_0GT:
+		/* 128b/130b encoding has less impact on throughput */
+		max_gts = 8 * width;
+		break;
+	default:
+		e_dev_warn("Unable to determine PCI-Express throughput.\n");
+		return;
+	}
+
+	if (max_gts < expected_gts) {
+		e_dev_warn("PCI-Express bandwidth of %dGT/s available (PCI Express:%s:Width x%d)\n",
+			   max_gts,
+			   (speed == PCIE_SPEED_8_0GT ? "8.0GT/s" :
+			    speed == PCIE_SPEED_5_0GT ? "5.0GT/s" :
+			    speed == PCIE_SPEED_2_5GT ? "2.5GT/s" :
+			    "Unknown"),
+			   width);
+		e_dev_warn("This is not sufficient for optimal performance of this card.\n");
+		e_dev_warn("For optimal performance, at least %dGT/s of bandwidth is required.\n",
+			expected_gts);
+		e_dev_warn("A slot with more lanes and/or higher speed is suggested.\n");
+	}
+}
+
 static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
 {
 	if (!test_bit(__IXGBE_DOWN, &adapter->state) &&
@@ -7250,6 +7323,41 @@ static const struct net_device_ops ixgbe_netdev_ops = {
 };
 
 /**
+ * ixgbe_enumerate_functions - Get the number of ports this device has
+ * @adapter: adapter structure
+ *
+ * This function enumerates the phsyical functions co-located on a single slot,
+ * in order to determine how many ports a device has. This is most useful in
+ * determining the required GT/s of PCIe bandwidth necessary for optimal
+ * performance.
+ **/
+static inline int ixgbe_enumerate_functions(struct ixgbe_adapter *adapter)
+{
+	struct ixgbe_hw *hw = &adapter->hw;
+	struct list_head *entry;
+	int physfns = 0;
+
+	/* Some cards can not use the generic count PCIe functions method, and
+	 * so must be hardcoded to the correct value.
+	 */
+	switch (hw->device_id) {
+	case IXGBE_DEV_ID_82599_SFP_SF_QP:
+		physfns = 4;
+		break;
+	default:
+		list_for_each(entry, &adapter->pdev->bus_list) {
+			struct pci_dev *pdev =
+				list_entry(entry, struct pci_dev, bus_list);
+			/* don't count virtual functions */
+			if (!pdev->is_virtfn)
+				physfns++;
+		}
+	}
+
+	return physfns;
+}
+
+/**
  * ixgbe_wol_supported - Check whether device supports WoL
  * @hw: hw specific details
  * @device_id: the device ID
@@ -7331,7 +7439,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	struct ixgbe_hw *hw;
 	const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
 	static int cards_found;
-	int i, err, pci_using_dac;
+	int i, err, pci_using_dac, expected_gts;
 	unsigned int indices = MAX_TX_QUEUES;
 	u8 part_str[IXGBE_PBANUM_LENGTH];
 #ifdef IXGBE_FCOE
@@ -7620,7 +7728,7 @@ skip_sriov:
 
 	/* pick up the PCI bus settings for reporting later */
 	hw->mac.ops.get_bus_info(hw);
-	if (hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP)
+	if (ixgbe_pcie_from_parent(hw))
 		ixgbe_get_parent_bus_info(adapter);
 
 	/* print bus type/speed/width info */
@@ -7646,12 +7754,20 @@ skip_sriov:
 		e_dev_info("MAC: %d, PHY: %d, PBA No: %s\n",
 			   hw->mac.type, hw->phy.type, part_str);
 
-	if (hw->bus.width <= ixgbe_bus_width_pcie_x4) {
-		e_dev_warn("PCI-Express bandwidth available for this card is "
-			   "not sufficient for optimal performance.\n");
-		e_dev_warn("For optimal performance a x8 PCI-Express slot "
-			   "is required.\n");
+	/* calculate the expected PCIe bandwidth required for optimal
+	 * performance. Note that some older parts will never have enough
+	 * bandwidth due to being older generation PCIe parts. We clamp these
+	 * parts to ensure no warning is displayed if it can't be fixed.
+	 */
+	switch (hw->mac.type) {
+	case ixgbe_mac_82598EB:
+		expected_gts = min(ixgbe_enumerate_functions(adapter) * 10, 16);
+		break;
+	default:
+		expected_gts = ixgbe_enumerate_functions(adapter) * 10;
+		break;
 	}
+	ixgbe_check_minimum_link(adapter, expected_gts);
 
 	/* reset the hardware with the new settings */
 	err = hw->mac.ops.start_hw(hw);
-- 
1.7.11.7

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

* [net-next 12/15] ixgbe: fix lockdep annotation issue for ptp's work item
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (10 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 12:52 ` [net-next 13/15] ixgbe: rename LL_EXTENDED_STATS to use queue instead of q Jeff Kirsher
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

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

This patch fixes a lockdep issue created due to ixgbe_ptp_stop always running
cancel_work_sync even if the work item had not been created properly with
INIT_WORK. This is caused because ixgbe_ptp_stop did not check to actually
ensure PTP was running first. The new implementation introduces a state in the
&adapter->state field which is used to indicate that PTP is running. (This
replaces the IXGBE_FLAG2_PTP_ENABLED field). This state will use the atomic
set_bit, test_bit, and test_and_clear_bit functions. ixgbe_ptp_stop will check
to ensure that PTP was enabled, (and if not, it will not attempt to do any
cleanup work from ixgbe_ptp_init). This resolves the lockdep annotation warning
found by Stephen Hemminger

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@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.h      |  6 +++---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |  8 ++++----
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c  | 12 +++++++-----
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
index d882278..6844f39 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -618,9 +618,8 @@ struct ixgbe_adapter {
 #define IXGBE_FLAG2_FDIR_REQUIRES_REINIT        (u32)(1 << 7)
 #define IXGBE_FLAG2_RSS_FIELD_IPV4_UDP		(u32)(1 << 8)
 #define IXGBE_FLAG2_RSS_FIELD_IPV6_UDP		(u32)(1 << 9)
-#define IXGBE_FLAG2_PTP_ENABLED			(u32)(1 << 10)
-#define IXGBE_FLAG2_PTP_PPS_ENABLED		(u32)(1 << 11)
-#define IXGBE_FLAG2_BRIDGE_MODE_VEB		(u32)(1 << 12)
+#define IXGBE_FLAG2_PTP_PPS_ENABLED		(u32)(1 << 10)
+#define IXGBE_FLAG2_BRIDGE_MODE_VEB		(u32)(1 << 11)
 
 	/* Tx fast path data */
 	int num_tx_queues;
@@ -754,6 +753,7 @@ enum ixgbe_state_t {
 	__IXGBE_DOWN,
 	__IXGBE_SERVICE_SCHED,
 	__IXGBE_IN_SFP_INIT,
+	__IXGBE_PTP_RUNNING,
 };
 
 struct ixgbe_cb {
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 5ec2b74..65c36f7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4432,7 +4432,7 @@ void ixgbe_reset(struct ixgbe_adapter *adapter)
 	if (hw->mac.san_mac_rar_index)
 		hw->mac.ops.set_vmdq_san_mac(hw, VMDQ_P(0));
 
-	if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED)
+	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
 		ixgbe_ptp_reset(adapter);
 }
 
@@ -5761,7 +5761,7 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
 
 	adapter->last_rx_ptp_check = jiffies;
 
-	if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED)
+	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
 		ixgbe_ptp_start_cyclecounter(adapter);
 
 	e_info(drv, "NIC Link is Up %s, Flow Control: %s\n",
@@ -5807,7 +5807,7 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
 	if (ixgbe_is_sfp(hw) && hw->mac.type == ixgbe_mac_82598EB)
 		adapter->flags2 |= IXGBE_FLAG2_SEARCH_FOR_SFP;
 
-	if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED)
+	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))
 		ixgbe_ptp_start_cyclecounter(adapter);
 
 	e_info(drv, "NIC Link is Down\n");
@@ -6114,7 +6114,7 @@ static void ixgbe_service_task(struct work_struct *work)
 	ixgbe_fdir_reinit_subtask(adapter);
 	ixgbe_check_hang_subtask(adapter);
 
-	if (adapter->flags2 & IXGBE_FLAG2_PTP_ENABLED) {
+	if (test_bit(__IXGBE_PTP_RUNNING, &adapter->state)) {
 		ixgbe_ptp_overflow_check(adapter);
 		ixgbe_ptp_rx_hang(adapter);
 	}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index 331987d..5184e2a 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -885,8 +885,8 @@ void ixgbe_ptp_init(struct ixgbe_adapter *adapter)
 
 	ixgbe_ptp_reset(adapter);
 
-	/* set the flag that PTP has been enabled */
-	adapter->flags2 |= IXGBE_FLAG2_PTP_ENABLED;
+	/* enter the IXGBE_PTP_RUNNING state */
+	set_bit(__IXGBE_PTP_RUNNING, &adapter->state);
 
 	return;
 }
@@ -899,10 +899,12 @@ void ixgbe_ptp_init(struct ixgbe_adapter *adapter)
  */
 void ixgbe_ptp_stop(struct ixgbe_adapter *adapter)
 {
-	/* stop the overflow check task */
-	adapter->flags2 &= ~(IXGBE_FLAG2_PTP_ENABLED |
-			     IXGBE_FLAG2_PTP_PPS_ENABLED);
+	/* Leave the IXGBE_PTP_RUNNING state. */
+	if (!test_and_clear_bit(__IXGBE_PTP_RUNNING, &adapter->state))
+		return;
 
+	/* stop the PPS signal */
+	adapter->flags2 &= ~IXGBE_FLAG2_PTP_PPS_ENABLED;
 	ixgbe_ptp_setup_sdp(adapter);
 
 	cancel_work_sync(&adapter->ptp_tx_work);
-- 
1.7.11.7

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

* [net-next 13/15] ixgbe: rename LL_EXTENDED_STATS to use queue instead of q
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (11 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 12/15] ixgbe: fix lockdep annotation issue for ptp's work item Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 12:52 ` [net-next 14/15] ixgbe: clear semaphore bits on timeouts Jeff Kirsher
  2013-07-29 12:52 ` [net-next 15/15] ixgbe: add support for quad-port x520 adapter Jeff Kirsher
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher

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

This patch renames the stats introduced by the busy poll feature so that they
are more inline with the current statistics naming schemes.

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_ethtool.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index da1ea28..50c1e9b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1141,11 +1141,11 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
 			sprintf(p, "tx_queue_%u_bytes", i);
 			p += ETH_GSTRING_LEN;
 #ifdef LL_EXTENDED_STATS
-			sprintf(p, "tx_q_%u_napi_yield", i);
+			sprintf(p, "tx_queue_%u_ll_napi_yield", i);
 			p += ETH_GSTRING_LEN;
-			sprintf(p, "tx_q_%u_misses", i);
+			sprintf(p, "tx_queue_%u_ll_misses", i);
 			p += ETH_GSTRING_LEN;
-			sprintf(p, "tx_q_%u_cleaned", i);
+			sprintf(p, "tx_queue_%u_ll_cleaned", i);
 			p += ETH_GSTRING_LEN;
 #endif /* LL_EXTENDED_STATS */
 		}
@@ -1155,11 +1155,11 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
 			sprintf(p, "rx_queue_%u_bytes", i);
 			p += ETH_GSTRING_LEN;
 #ifdef LL_EXTENDED_STATS
-			sprintf(p, "rx_q_%u_ll_poll_yield", i);
+			sprintf(p, "rx_queue_%u_ll_poll_yield", i);
 			p += ETH_GSTRING_LEN;
-			sprintf(p, "rx_q_%u_misses", i);
+			sprintf(p, "rx_queue_%u_ll_misses", i);
 			p += ETH_GSTRING_LEN;
-			sprintf(p, "rx_q_%u_cleaned", i);
+			sprintf(p, "rx_queue_%u_ll_cleaned", i);
 			p += ETH_GSTRING_LEN;
 #endif /* LL_EXTENDED_STATS */
 		}
-- 
1.7.11.7

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

* [net-next 14/15] ixgbe: clear semaphore bits on timeouts
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (12 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 13/15] ixgbe: rename LL_EXTENDED_STATS to use queue instead of q Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  2013-07-29 12:52 ` [net-next 15/15] ixgbe: add support for quad-port x520 adapter Jeff Kirsher
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Emil Tantilov, netdev, gospo, sassmann, Jeff Kirsher

From: Emil Tantilov <emil.s.tantilov@intel.com>

This patch changes the error code path in ixgbe_acquire_swfw_sync() to deal
with cases where acquiring SW semaphore times out.

In cases where the SW/FW semaphore bits were set (i.e. due to a crash) the
driver will hang on load. With this patch the driver will clear
the stuck bits if the semaphore was not acquired in the allotted time.

Signed-off-by: Emil Tantilov <emil.s.tantilov@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_common.c | 45 ++++++++++++-------------
 1 file changed, 21 insertions(+), 24 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 6e5d4bc..5f05f8d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -2506,42 +2506,39 @@ out:
  **/
 s32 ixgbe_acquire_swfw_sync(struct ixgbe_hw *hw, u16 mask)
 {
-	u32 gssr;
+	u32 gssr = 0;
 	u32 swmask = mask;
 	u32 fwmask = mask << 5;
-	s32 timeout = 200;
+	u32 timeout = 200;
+	u32 i;
 
-	while (timeout) {
+	for (i = 0; i < timeout; i++) {
 		/*
-		 * SW EEPROM semaphore bit is used for access to all
-		 * SW_FW_SYNC/GSSR bits (not just EEPROM)
+		 * SW NVM semaphore bit is used for access to all
+		 * SW_FW_SYNC bits (not just NVM)
 		 */
 		if (ixgbe_get_eeprom_semaphore(hw))
 			return IXGBE_ERR_SWFW_SYNC;
 
 		gssr = IXGBE_READ_REG(hw, IXGBE_GSSR);
-		if (!(gssr & (fwmask | swmask)))
-			break;
-
-		/*
-		 * Firmware currently using resource (fwmask) or other software
-		 * thread currently using resource (swmask)
-		 */
-		ixgbe_release_eeprom_semaphore(hw);
-		usleep_range(5000, 10000);
-		timeout--;
-	}
-
-	if (!timeout) {
-		hw_dbg(hw, "Driver can't access resource, SW_FW_SYNC timeout.\n");
-		return IXGBE_ERR_SWFW_SYNC;
+		if (!(gssr & (fwmask | swmask))) {
+			gssr |= swmask;
+			IXGBE_WRITE_REG(hw, IXGBE_GSSR, gssr);
+			ixgbe_release_eeprom_semaphore(hw);
+			return 0;
+		} else {
+			/* Resource is currently in use by FW or SW */
+			ixgbe_release_eeprom_semaphore(hw);
+			usleep_range(5000, 10000);
+		}
 	}
 
-	gssr |= swmask;
-	IXGBE_WRITE_REG(hw, IXGBE_GSSR, gssr);
+	/* If time expired clear the bits holding the lock and retry */
+	if (gssr & (fwmask | swmask))
+		ixgbe_release_swfw_sync(hw, gssr & (fwmask | swmask));
 
-	ixgbe_release_eeprom_semaphore(hw);
-	return 0;
+	usleep_range(5000, 10000);
+	return IXGBE_ERR_SWFW_SYNC;
 }
 
 /**
-- 
1.7.11.7

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

* [net-next 15/15] ixgbe: add support for quad-port x520 adapter
  2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
                   ` (13 preceding siblings ...)
  2013-07-29 12:52 ` [net-next 14/15] ixgbe: clear semaphore bits on timeouts Jeff Kirsher
@ 2013-07-29 12:52 ` Jeff Kirsher
  14 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2013-07-29 12:52 UTC (permalink / raw)
  To: davem; +Cc: Don Skidmore, netdev, gospo, sassmann, Jeff Kirsher

From: Don Skidmore <donald.c.skidmore@intel.com>

This is a x520 based quad-port (4x10Gbps) NIC with a single QSFP+
connector.  Changes were required to our identify functions due to
different eeprom address which is also included here.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c |   2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 147 +++++++++++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  |   3 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c   | 178 ++++++++++++++++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h   |  36 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h  |   9 ++
 6 files changed, 358 insertions(+), 17 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
index d011d5c..a26f3fe 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c
@@ -1331,7 +1331,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_82598 = {
 
 static struct ixgbe_phy_operations phy_ops_82598 = {
 	.identify		= &ixgbe_identify_phy_generic,
-	.identify_sfp		= &ixgbe_identify_sfp_module_generic,
+	.identify_sfp		= &ixgbe_identify_module_generic,
 	.init			= &ixgbe_init_phy_ops_82598,
 	.reset			= &ixgbe_reset_phy_generic,
 	.read_reg		= &ixgbe_read_phy_reg_generic,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index b92765b..555d7c7 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -58,6 +58,10 @@ static s32 ixgbe_setup_copper_link_82599(struct ixgbe_hw *hw,
                                          ixgbe_link_speed speed,
                                          bool autoneg_wait_to_complete);
 static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw);
+static s32 ixgbe_read_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
+				     u8 dev_addr, u8 *data);
+static s32 ixgbe_write_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
+				      u8 dev_addr, u8 data);
 
 static bool ixgbe_mng_enabled(struct ixgbe_hw *hw)
 {
@@ -219,6 +223,25 @@ static s32 ixgbe_init_phy_ops_82599(struct ixgbe_hw *hw)
 	struct ixgbe_mac_info *mac = &hw->mac;
 	struct ixgbe_phy_info *phy = &hw->phy;
 	s32 ret_val = 0;
+	u32 esdp;
+
+	if (hw->device_id == IXGBE_DEV_ID_82599_QSFP_SF_QP) {
+		/* Store flag indicating I2C bus access control unit. */
+		hw->phy.qsfp_shared_i2c_bus = true;
+
+		/* Initialize access to QSFP+ I2C bus */
+		esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+		esdp |= IXGBE_ESDP_SDP0_DIR;
+		esdp &= ~IXGBE_ESDP_SDP1_DIR;
+		esdp &= ~IXGBE_ESDP_SDP0;
+		esdp &= ~IXGBE_ESDP_SDP0_NATIVE;
+		esdp &= ~IXGBE_ESDP_SDP1_NATIVE;
+		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp);
+		IXGBE_WRITE_FLUSH(hw);
+
+		phy->ops.read_i2c_byte = &ixgbe_read_i2c_byte_82599;
+		phy->ops.write_i2c_byte = &ixgbe_write_i2c_byte_82599;
+	}
 
 	/* Identify the PHY or SFP module */
 	ret_val = phy->ops.identify(hw);
@@ -397,6 +420,9 @@ static enum ixgbe_media_type ixgbe_get_media_type_82599(struct ixgbe_hw *hw)
 	case IXGBE_DEV_ID_82599_LS:
 		media_type = ixgbe_media_type_fiber_lco;
 		break;
+	case IXGBE_DEV_ID_82599_QSFP_SF_QP:
+		media_type = ixgbe_media_type_fiber_qsfp;
+		break;
 	default:
 		media_type = ixgbe_media_type_unknown;
 		break;
@@ -1942,7 +1968,7 @@ static s32 ixgbe_identify_phy_82599(struct ixgbe_hw *hw)
 		if (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_copper)
 			goto out;
 		else
-			status = ixgbe_identify_sfp_module_generic(hw);
+			status = ixgbe_identify_module_generic(hw);
 	}
 
 	/* Set PHY type none if no PHY detected */
@@ -2048,10 +2074,12 @@ sfp_check:
 	switch (hw->phy.type) {
 	case ixgbe_phy_sfp_passive_tyco:
 	case ixgbe_phy_sfp_passive_unknown:
+	case ixgbe_phy_qsfp_passive_unknown:
 		physical_layer = IXGBE_PHYSICAL_LAYER_SFP_PLUS_CU;
 		break;
 	case ixgbe_phy_sfp_ftl_active:
 	case ixgbe_phy_sfp_active_unknown:
+	case ixgbe_phy_qsfp_active_unknown:
 		physical_layer = IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA;
 		break;
 	case ixgbe_phy_sfp_avago:
@@ -2069,6 +2097,15 @@ sfp_check:
 		else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE)
 			physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T;
 		break;
+	case ixgbe_phy_qsfp_intel:
+	case ixgbe_phy_qsfp_unknown:
+		hw->phy.ops.read_i2c_eeprom(hw,
+			IXGBE_SFF_QSFP_10GBE_COMP, &comp_codes_10g);
+		if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)
+			physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_SR;
+		else if (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)
+			physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_LR;
+		break;
 	default:
 		break;
 	}
@@ -2306,6 +2343,112 @@ reset_pipeline_out:
 	return ret_val;
 }
 
+/**
+ *  ixgbe_read_i2c_byte_82599 - Reads 8 bit word over I2C
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: byte offset to read
+ *  @data: value read
+ *
+ *  Performs byte read operation to SFP module's EEPROM over I2C interface at
+ *  a specified device address.
+ **/
+static s32 ixgbe_read_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
+				     u8 dev_addr, u8 *data)
+{
+	u32 esdp;
+	s32 status;
+	s32 timeout = 200;
+
+	if (hw->phy.qsfp_shared_i2c_bus == true) {
+		/* Acquire I2C bus ownership. */
+		esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+		esdp |= IXGBE_ESDP_SDP0;
+		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp);
+		IXGBE_WRITE_FLUSH(hw);
+
+		while (timeout) {
+			esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+			if (esdp & IXGBE_ESDP_SDP1)
+				break;
+
+			usleep_range(5000, 10000);
+			timeout--;
+		}
+
+		if (!timeout) {
+			hw_dbg(hw, "Driver can't access resource, acquiring I2C bus timeout.\n");
+			status = IXGBE_ERR_I2C;
+			goto release_i2c_access;
+		}
+	}
+
+	status = ixgbe_read_i2c_byte_generic(hw, byte_offset, dev_addr, data);
+
+release_i2c_access:
+	if (hw->phy.qsfp_shared_i2c_bus == true) {
+		/* Release I2C bus ownership. */
+		esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+		esdp &= ~IXGBE_ESDP_SDP0;
+		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp);
+		IXGBE_WRITE_FLUSH(hw);
+	}
+
+	return status;
+}
+
+/**
+ *  ixgbe_write_i2c_byte_82599 - Writes 8 bit word over I2C
+ *  @hw: pointer to hardware structure
+ *  @byte_offset: byte offset to write
+ *  @data: value to write
+ *
+ *  Performs byte write operation to SFP module's EEPROM over I2C interface at
+ *  a specified device address.
+ **/
+static s32 ixgbe_write_i2c_byte_82599(struct ixgbe_hw *hw, u8 byte_offset,
+				      u8 dev_addr, u8 data)
+{
+	u32 esdp;
+	s32 status;
+	s32 timeout = 200;
+
+	if (hw->phy.qsfp_shared_i2c_bus == true) {
+		/* Acquire I2C bus ownership. */
+		esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+		esdp |= IXGBE_ESDP_SDP0;
+		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp);
+		IXGBE_WRITE_FLUSH(hw);
+
+		while (timeout) {
+			esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+			if (esdp & IXGBE_ESDP_SDP1)
+				break;
+
+			usleep_range(5000, 10000);
+			timeout--;
+		}
+
+		if (!timeout) {
+			hw_dbg(hw, "Driver can't access resource, acquiring I2C bus timeout.\n");
+			status = IXGBE_ERR_I2C;
+			goto release_i2c_access;
+		}
+	}
+
+	status = ixgbe_write_i2c_byte_generic(hw, byte_offset, dev_addr, data);
+
+release_i2c_access:
+	if (hw->phy.qsfp_shared_i2c_bus == true) {
+		/* Release I2C bus ownership. */
+		esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
+		esdp &= ~IXGBE_ESDP_SDP0;
+		IXGBE_WRITE_REG(hw, IXGBE_ESDP, esdp);
+		IXGBE_WRITE_FLUSH(hw);
+	}
+
+	return status;
+}
+
 static struct ixgbe_mac_operations mac_ops_82599 = {
 	.init_hw                = &ixgbe_init_hw_generic,
 	.reset_hw               = &ixgbe_reset_hw_82599,
@@ -2370,7 +2513,7 @@ static struct ixgbe_eeprom_operations eeprom_ops_82599 = {
 
 static struct ixgbe_phy_operations phy_ops_82599 = {
 	.identify		= &ixgbe_identify_phy_82599,
-	.identify_sfp		= &ixgbe_identify_sfp_module_generic,
+	.identify_sfp		= &ixgbe_identify_module_generic,
 	.init			= &ixgbe_init_phy_ops_82599,
 	.reset			= &ixgbe_reset_phy_generic,
 	.read_reg		= &ixgbe_read_phy_reg_generic,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 65c36f7..e606aae 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -109,6 +109,7 @@ static DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = {
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T), board_X540 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF2), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_LS), board_82599 },
+	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599EN_SFP), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP), board_82599 },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540T1), board_X540 },
@@ -208,6 +209,7 @@ static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
 {
 	switch (hw->device_id) {
 	case IXGBE_DEV_ID_82599_SFP_SF_QP:
+	case IXGBE_DEV_ID_82599_QSFP_SF_QP:
 		return true;
 	default:
 		return false;
@@ -7342,6 +7344,7 @@ static inline int ixgbe_enumerate_functions(struct ixgbe_adapter *adapter)
 	 */
 	switch (hw->device_id) {
 	case IXGBE_DEV_ID_82599_SFP_SF_QP:
+	case IXGBE_DEV_ID_82599_QSFP_SF_QP:
 		physfns = 4;
 		break;
 	default:
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 71f554a..369eef5 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -841,9 +841,35 @@ out:
 }
 
 /**
- *  ixgbe_identify_sfp_module_generic - Identifies SFP modules
+ *  ixgbe_identify_module_generic - Identifies module type
  *  @hw: pointer to hardware structure
  *
+ *  Determines HW type and calls appropriate function.
+ **/
+s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw)
+{
+	s32 status = IXGBE_ERR_SFP_NOT_PRESENT;
+
+	switch (hw->mac.ops.get_media_type(hw)) {
+	case ixgbe_media_type_fiber:
+		status = ixgbe_identify_sfp_module_generic(hw);
+		break;
+	case ixgbe_media_type_fiber_qsfp:
+		status = ixgbe_identify_qsfp_module_generic(hw);
+		break;
+	default:
+		hw->phy.sfp_type = ixgbe_sfp_type_not_present;
+		status = IXGBE_ERR_SFP_NOT_PRESENT;
+		break;
+	}
+
+	return status;
+}
+
+/**
+ *  ixgbe_identify_sfp_module_generic - Identifies SFP modules
+ *  @hw: pointer to hardware structure
+*
  *  Searches for and identifies the SFP module and assigns appropriate PHY type.
  **/
 s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
@@ -1122,6 +1148,156 @@ err_read_i2c_eeprom:
 }
 
 /**
+ * ixgbe_identify_qsfp_module_generic - Identifies QSFP modules
+ * @hw: pointer to hardware structure
+ *
+ * Searches for and identifies the QSFP module and assigns appropriate PHY type
+ **/
+s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw)
+{
+	struct ixgbe_adapter *adapter = hw->back;
+	s32 status = IXGBE_ERR_PHY_ADDR_INVALID;
+	u32 vendor_oui = 0;
+	enum ixgbe_sfp_type stored_sfp_type = hw->phy.sfp_type;
+	u8 identifier = 0;
+	u8 comp_codes_1g = 0;
+	u8 comp_codes_10g = 0;
+	u8 oui_bytes[3] = {0, 0, 0};
+	u16 enforce_sfp = 0;
+
+	if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber_qsfp) {
+		hw->phy.sfp_type = ixgbe_sfp_type_not_present;
+		status = IXGBE_ERR_SFP_NOT_PRESENT;
+		goto out;
+	}
+
+	status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_IDENTIFIER,
+					     &identifier);
+
+	if (status != 0)
+		goto err_read_i2c_eeprom;
+
+	if (identifier != IXGBE_SFF_IDENTIFIER_QSFP_PLUS) {
+		hw->phy.type = ixgbe_phy_sfp_unsupported;
+		status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+		goto out;
+	}
+
+	hw->phy.id = identifier;
+
+	/* LAN ID is needed for sfp_type determination */
+	hw->mac.ops.set_lan_id(hw);
+
+	status = hw->phy.ops.read_i2c_eeprom(hw, IXGBE_SFF_QSFP_10GBE_COMP,
+					     &comp_codes_10g);
+
+	if (status != 0)
+		goto err_read_i2c_eeprom;
+
+	if (comp_codes_10g & IXGBE_SFF_QSFP_DA_PASSIVE_CABLE) {
+		hw->phy.type = ixgbe_phy_qsfp_passive_unknown;
+		if (hw->bus.lan_id == 0)
+			hw->phy.sfp_type = ixgbe_sfp_type_da_cu_core0;
+		else
+			hw->phy.sfp_type = ixgbe_sfp_type_da_cu_core1;
+	} else if (comp_codes_10g & IXGBE_SFF_QSFP_DA_ACTIVE_CABLE) {
+		hw->phy.type = ixgbe_phy_qsfp_active_unknown;
+		if (hw->bus.lan_id == 0)
+			hw->phy.sfp_type = ixgbe_sfp_type_da_act_lmt_core0;
+		else
+			hw->phy.sfp_type = ixgbe_sfp_type_da_act_lmt_core1;
+	} else if (comp_codes_10g & (IXGBE_SFF_10GBASESR_CAPABLE |
+				     IXGBE_SFF_10GBASELR_CAPABLE)) {
+		if (hw->bus.lan_id == 0)
+			hw->phy.sfp_type = ixgbe_sfp_type_srlr_core0;
+		else
+			hw->phy.sfp_type = ixgbe_sfp_type_srlr_core1;
+	} else {
+		/* unsupported module type */
+		hw->phy.type = ixgbe_phy_sfp_unsupported;
+		status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+		goto out;
+	}
+
+	if (hw->phy.sfp_type != stored_sfp_type)
+		hw->phy.sfp_setup_needed = true;
+
+	/* Determine if the QSFP+ PHY is dual speed or not. */
+	hw->phy.multispeed_fiber = false;
+	if (((comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) &&
+	     (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)) ||
+	    ((comp_codes_1g & IXGBE_SFF_1GBASELX_CAPABLE) &&
+	     (comp_codes_10g & IXGBE_SFF_10GBASELR_CAPABLE)))
+		hw->phy.multispeed_fiber = true;
+
+	/* Determine PHY vendor for optical modules */
+	if (comp_codes_10g & (IXGBE_SFF_10GBASESR_CAPABLE |
+			      IXGBE_SFF_10GBASELR_CAPABLE)) {
+		status = hw->phy.ops.read_i2c_eeprom(hw,
+					IXGBE_SFF_QSFP_VENDOR_OUI_BYTE0,
+					&oui_bytes[0]);
+
+		if (status != 0)
+			goto err_read_i2c_eeprom;
+
+		status = hw->phy.ops.read_i2c_eeprom(hw,
+					IXGBE_SFF_QSFP_VENDOR_OUI_BYTE1,
+					&oui_bytes[1]);
+
+		if (status != 0)
+			goto err_read_i2c_eeprom;
+
+		status = hw->phy.ops.read_i2c_eeprom(hw,
+					IXGBE_SFF_QSFP_VENDOR_OUI_BYTE2,
+					&oui_bytes[2]);
+
+		if (status != 0)
+			goto err_read_i2c_eeprom;
+
+		vendor_oui =
+			((oui_bytes[0] << IXGBE_SFF_VENDOR_OUI_BYTE0_SHIFT) |
+			 (oui_bytes[1] << IXGBE_SFF_VENDOR_OUI_BYTE1_SHIFT) |
+			 (oui_bytes[2] << IXGBE_SFF_VENDOR_OUI_BYTE2_SHIFT));
+
+		if (vendor_oui == IXGBE_SFF_VENDOR_OUI_INTEL)
+			hw->phy.type = ixgbe_phy_qsfp_intel;
+		else
+			hw->phy.type = ixgbe_phy_qsfp_unknown;
+
+		hw->mac.ops.get_device_caps(hw, &enforce_sfp);
+		if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) {
+			/* Make sure we're a supported PHY type */
+			if (hw->phy.type == ixgbe_phy_qsfp_intel) {
+				status = 0;
+			} else {
+				if (hw->allow_unsupported_sfp == true) {
+					e_warn(hw, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.\n");
+					status = 0;
+				} else {
+					hw_dbg(hw,
+					       "QSFP module not supported\n");
+					hw->phy.type =
+						ixgbe_phy_sfp_unsupported;
+					status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+				}
+			}
+		} else {
+			status = 0;
+		}
+	}
+
+out:
+	return status;
+
+err_read_i2c_eeprom:
+	hw->phy.sfp_type = ixgbe_sfp_type_not_present;
+	hw->phy.id = 0;
+	hw->phy.type = ixgbe_phy_unknown;
+
+	return IXGBE_ERR_SFP_NOT_PRESENT;
+}
+
+/**
  *  ixgbe_get_sfp_init_sequence_offsets - Provides offset of PHY init sequence
  *  @hw: pointer to hardware structure
  *  @list_offset: offset to the SFP ID list
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
index fe64e723..9ec13b3 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
@@ -33,19 +33,25 @@
 #define IXGBE_I2C_EEPROM_DEV_ADDR2   0xA2
 
 /* EEPROM byte offsets */
-#define IXGBE_SFF_IDENTIFIER         0x0
-#define IXGBE_SFF_IDENTIFIER_SFP     0x3
-#define IXGBE_SFF_VENDOR_OUI_BYTE0   0x25
-#define IXGBE_SFF_VENDOR_OUI_BYTE1   0x26
-#define IXGBE_SFF_VENDOR_OUI_BYTE2   0x27
-#define IXGBE_SFF_1GBE_COMP_CODES    0x6
-#define IXGBE_SFF_10GBE_COMP_CODES   0x3
-#define IXGBE_SFF_CABLE_TECHNOLOGY   0x8
-#define IXGBE_SFF_CABLE_SPEC_COMP    0x3C
-#define IXGBE_SFF_SFF_8472_SWAP      0x5C
-#define IXGBE_SFF_SFF_8472_COMP      0x5E
-#define IXGBE_SFF_SFF_8472_OSCB         0x6E
-#define IXGBE_SFF_SFF_8472_ESCB         0x76
+#define IXGBE_SFF_IDENTIFIER		0x0
+#define IXGBE_SFF_IDENTIFIER_SFP	0x3
+#define IXGBE_SFF_VENDOR_OUI_BYTE0	0x25
+#define IXGBE_SFF_VENDOR_OUI_BYTE1	0x26
+#define IXGBE_SFF_VENDOR_OUI_BYTE2	0x27
+#define IXGBE_SFF_1GBE_COMP_CODES	0x6
+#define IXGBE_SFF_10GBE_COMP_CODES	0x3
+#define IXGBE_SFF_CABLE_TECHNOLOGY	0x8
+#define IXGBE_SFF_CABLE_SPEC_COMP	0x3C
+#define IXGBE_SFF_SFF_8472_SWAP		0x5C
+#define IXGBE_SFF_SFF_8472_COMP		0x5E
+#define IXGBE_SFF_SFF_8472_OSCB		0x6E
+#define IXGBE_SFF_SFF_8472_ESCB		0x76
+#define IXGBE_SFF_IDENTIFIER_QSFP_PLUS	0xD
+#define IXGBE_SFF_QSFP_VENDOR_OUI_BYTE0	0xA5
+#define IXGBE_SFF_QSFP_VENDOR_OUI_BYTE1	0xA6
+#define IXGBE_SFF_QSFP_VENDOR_OUI_BYTE2	0xA7
+#define IXGBE_SFF_QSFP_10GBE_COMP	0x83
+#define IXGBE_SFF_QSFP_1GBE_COMP	0x86
 
 /* Bitmasks */
 #define IXGBE_SFF_DA_PASSIVE_CABLE           0x4
@@ -60,6 +66,8 @@
 #define IXGBE_SFF_SOFT_RS_SELECT_10G    0x8
 #define IXGBE_SFF_SOFT_RS_SELECT_1G     0x0
 #define IXGBE_SFF_ADDRESSING_MODE	     0x4
+#define IXGBE_SFF_QSFP_DA_ACTIVE_CABLE       0x1
+#define IXGBE_SFF_QSFP_DA_PASSIVE_CABLE      0x8
 #define IXGBE_I2C_EEPROM_READ_MASK           0x100
 #define IXGBE_I2C_EEPROM_STATUS_MASK         0x3
 #define IXGBE_I2C_EEPROM_STATUS_NO_OPERATION 0x0
@@ -130,7 +138,9 @@ s32 ixgbe_get_phy_firmware_version_generic(struct ixgbe_hw *hw,
                                            u16 *firmware_version);
 
 s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw);
+s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw);
 s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw);
+s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw);
 s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
                                         u16 *list_offset,
                                         u16 *data_offset);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 4c91ea6..161ff18 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -69,6 +69,7 @@
 #define IXGBE_DEV_ID_82599_LS            0x154F
 #define IXGBE_DEV_ID_X540T               0x1528
 #define IXGBE_DEV_ID_82599_SFP_SF_QP     0x154A
+#define IXGBE_DEV_ID_82599_QSFP_SF_QP    0x1558
 #define IXGBE_DEV_ID_X540T1              0x1560
 
 /* VF Device IDs */
@@ -1520,9 +1521,11 @@ enum {
 #define IXGBE_ESDP_SDP5 0x00000020 /* SDP5 Data Value */
 #define IXGBE_ESDP_SDP6 0x00000040 /* SDP6 Data Value */
 #define IXGBE_ESDP_SDP0_DIR     0x00000100 /* SDP0 IO direction */
+#define IXGBE_ESDP_SDP1_DIR     0x00000200 /* SDP1 IO direction */
 #define IXGBE_ESDP_SDP4_DIR     0x00000004 /* SDP4 IO direction */
 #define IXGBE_ESDP_SDP5_DIR     0x00002000 /* SDP5 IO direction */
 #define IXGBE_ESDP_SDP0_NATIVE  0x00010000 /* SDP0 Native Function */
+#define IXGBE_ESDP_SDP1_NATIVE  0x00020000 /* SDP1 IO mode */
 
 /* LEDCTL Bit Masks */
 #define IXGBE_LED_IVRT_BASE      0x00000040
@@ -2582,6 +2585,10 @@ enum ixgbe_phy_type {
 	ixgbe_phy_sfp_ftl_active,
 	ixgbe_phy_sfp_unknown,
 	ixgbe_phy_sfp_intel,
+	ixgbe_phy_qsfp_passive_unknown,
+	ixgbe_phy_qsfp_active_unknown,
+	ixgbe_phy_qsfp_intel,
+	ixgbe_phy_qsfp_unknown,
 	ixgbe_phy_sfp_unsupported,
 	ixgbe_phy_generic
 };
@@ -2623,6 +2630,7 @@ enum ixgbe_media_type {
 	ixgbe_media_type_unknown = 0,
 	ixgbe_media_type_fiber,
 	ixgbe_media_type_fiber_fixed,
+	ixgbe_media_type_fiber_qsfp,
 	ixgbe_media_type_fiber_lco,
 	ixgbe_media_type_copper,
 	ixgbe_media_type_backplane,
@@ -2956,6 +2964,7 @@ struct ixgbe_phy_info {
 	bool                            smart_speed_active;
 	bool                            multispeed_fiber;
 	bool                            reset_if_overtemp;
+	bool                            qsfp_shared_i2c_bus;
 };
 
 #include "ixgbe_mbx.h"
-- 
1.7.11.7

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

* Re: [net-next 09/15] pci: move enum pcie_link_width into pci.h
  2013-07-29 12:52 ` [net-next 09/15] pci: move enum pcie_link_width into pci.h Jeff Kirsher
@ 2013-07-29 18:39   ` Bjorn Helgaas
  0 siblings, 0 replies; 65+ messages in thread
From: Bjorn Helgaas @ 2013-07-29 18:39 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: David Miller, Jacob Keller, netdev, gospo, sassmann, linux-pci

On Mon, Jul 29, 2013 at 6:52 AM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> pcie_link_width is the enum used to define the link width values for a pcie
> device. This enum should not be contained solely in pci_hotplug.h, and this
> patch moves it next to pci_bus_speed in pci.h
>
> 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>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  include/linux/pci.h         | 13 +++++++++++++
>  include/linux/pci_hotplug.h | 13 -------------
>  2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 95ff993..fc2d1fb 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -186,6 +186,19 @@ enum pci_bus_flags {
>         PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
>  };
>
> +/* These values come from the PCI Express Spec */
> +enum pcie_link_width {
> +       PCIE_LNK_WIDTH_RESRV    = 0x00,
> +       PCIE_LNK_X1             = 0x01,
> +       PCIE_LNK_X2             = 0x02,
> +       PCIE_LNK_X4             = 0x04,
> +       PCIE_LNK_X8             = 0x08,
> +       PCIE_LNK_X12            = 0x0C,
> +       PCIE_LNK_X16            = 0x10,
> +       PCIE_LNK_X32            = 0x20,
> +       PCIE_LNK_WIDTH_UNKNOWN  = 0xFF,
> +};
> +
>  /* Based on the PCI Hotplug Spec, but some values are made up by us */
>  enum pci_bus_speed {
>         PCI_SPEED_33MHz                 = 0x00,
> diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
> index 8db71dc..64e61e0 100644
> --- a/include/linux/pci_hotplug.h
> +++ b/include/linux/pci_hotplug.h
> @@ -28,19 +28,6 @@
>  #ifndef _PCI_HOTPLUG_H
>  #define _PCI_HOTPLUG_H
>
> -/* These values come from the PCI Express Spec */
> -enum pcie_link_width {
> -       PCIE_LNK_WIDTH_RESRV    = 0x00,
> -       PCIE_LNK_X1             = 0x01,
> -       PCIE_LNK_X2             = 0x02,
> -       PCIE_LNK_X4             = 0x04,
> -       PCIE_LNK_X8             = 0x08,
> -       PCIE_LNK_X12            = 0x0C,
> -       PCIE_LNK_X16            = 0x10,
> -       PCIE_LNK_X32            = 0x20,
> -       PCIE_LNK_WIDTH_UNKNOWN  = 0xFF,
> -};
> -
>  /**
>   * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use
>   * @owner: The module owner of this structure
> --
> 1.7.11.7
>

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

* Re: [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays
  2013-07-29 12:52 ` [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays Jeff Kirsher
@ 2013-07-29 18:44   ` Bjorn Helgaas
  2013-07-29 21:03     ` Keller, Jacob E
  0 siblings, 1 reply; 65+ messages in thread
From: Bjorn Helgaas @ 2013-07-29 18:44 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: David Miller, Jacob Keller, netdev, gospo, sassmann, linux-pci

On Mon, Jul 29, 2013 at 6:52 AM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> pcie_link_speed and pcix_bus_speed are arrays used by probe.c to correctly
> convert lnksta register values into the pci_bus_speed enum. These static arrays
> are useful outside probe for this purpose. This patch makes these defines into
> const arrays and exposes them with an extern header in linux/include/pci.h
>
> 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/pci/probe.c | 4 ++--
>  include/linux/pci.h | 3 +++
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> index 46ada5c..496c5b0 100644
> --- a/drivers/pci/probe.c
> +++ b/drivers/pci/probe.c
> @@ -513,7 +513,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
>         return bridge;
>  }
>
> -static unsigned char pcix_bus_speed[] = {
> +const unsigned char pcix_bus_speed[] = {
>         PCI_SPEED_UNKNOWN,              /* 0 */
>         PCI_SPEED_66MHz_PCIX,           /* 1 */
>         PCI_SPEED_100MHz_PCIX,          /* 2 */
> @@ -532,7 +532,7 @@ static unsigned char pcix_bus_speed[] = {
>         PCI_SPEED_133MHz_PCIX_533       /* F */
>  };
>
> -static unsigned char pcie_link_speed[] = {
> +const unsigned char pcie_link_speed[] = {
>         PCI_SPEED_UNKNOWN,              /* 0 */
>         PCIE_SPEED_2_5GT,               /* 1 */
>         PCIE_SPEED_5_0GT,               /* 2 */
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 0fd1f15..95ff993 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -120,6 +120,9 @@ typedef int __bitwise pci_power_t;
>  /* Remember to update this when the list above changes! */
>  extern const char *pci_power_names[];
>
> +extern const unsigned char pcix_bus_speed[];
> +extern const unsigned char pcie_link_speed[];

As far as I can tell, you didn't actually add anything that uses
pcix_bus_speed[].

You added a pcie_link_speed[] use only in drivers/pci/pci.c; maybe
this extern declaration could go in drivers/pci/pci.h to limit its
visibility?

If you update this patch, note that we conventionally capitalize "PCI:
Expose ..." in the changelog summary, e.g., "git log --oneline
drivers/pci".

>  static inline const char *pci_power_name(pci_power_t state)
>  {
>         return pci_power_names[1 + (int) state];
> --
> 1.7.11.7
>

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

* Re: [net-next 10/15] pci: Add function to obtain minimum link width and speed
  2013-07-29 12:52 ` [net-next 10/15] pci: Add function to obtain minimum link width and speed Jeff Kirsher
@ 2013-07-29 18:45   ` Bjorn Helgaas
  0 siblings, 0 replies; 65+ messages in thread
From: Bjorn Helgaas @ 2013-07-29 18:45 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: David Miller, Jacob Keller, netdev, gospo, sassmann, linux-pci

On Mon, Jul 29, 2013 at 6:52 AM, Jeff Kirsher
<jeffrey.t.kirsher@intel.com> wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> A PCI Express device can potentially report a link width and speed which it will
> not properly fulfill due to being plugged into a slower link higher in the
> chain. This function walks up the PCI bus chain and calculates the minimum link
> width and speed of this entire chain. This can be useful to enable a device to
> determine if it has enough bandwidth for optimum functionality.
>
> 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>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/pci.c   | 43 +++++++++++++++++++++++++++++++++++++++++++
>  include/linux/pci.h |  2 ++
>  2 files changed, 45 insertions(+)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index e37fea6..c71e78c 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -3579,6 +3579,49 @@ int pcie_set_mps(struct pci_dev *dev, int mps)
>  }
>
>  /**
> + * pcie_get_minimum_link - determine minimum link settings of a PCI device
> + * @dev: PCI device to query
> + * @speed: storage for minimum speed
> + * @width: storage for minimum width
> + *
> + * This function will walk up the PCI device chain and determine the minimum
> + * link width and speed of the device.
> + */
> +int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
> +                         enum pcie_link_width *width)
> +{
> +       int ret;
> +
> +       *speed = PCI_SPEED_UNKNOWN;
> +       *width = PCIE_LNK_WIDTH_UNKNOWN;
> +
> +       while (dev) {
> +               u16 lnksta;
> +               enum pci_bus_speed next_speed;
> +               enum pcie_link_width next_width;
> +
> +               ret = pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
> +               if (ret)
> +                       return ret;
> +
> +               next_speed = pcie_link_speed[lnksta & PCI_EXP_LNKSTA_CLS];
> +               next_width = (lnksta & PCI_EXP_LNKSTA_NLW) >>
> +                       PCI_EXP_LNKSTA_NLW_SHIFT;
> +
> +               if (next_speed < *speed)
> +                       *speed = next_speed;
> +
> +               if (next_width < *width)
> +                       *width = next_width;
> +
> +               dev = dev->bus->self;
> +       }
> +
> +       return 0;
> +}
> +EXPORT_SYMBOL(pcie_get_minimum_link);
> +
> +/**
>   * pci_select_bars - Make BAR mask from the type of resource
>   * @dev: the PCI device for which BAR mask is made
>   * @flags: resource type mask to be selected
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index fc2d1fb..38994de 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -937,6 +937,8 @@ int pcie_get_readrq(struct pci_dev *dev);
>  int pcie_set_readrq(struct pci_dev *dev, int rq);
>  int pcie_get_mps(struct pci_dev *dev);
>  int pcie_set_mps(struct pci_dev *dev, int mps);
> +int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
> +                         enum pcie_link_width *width);
>  int __pci_reset_function(struct pci_dev *dev);
>  int __pci_reset_function_locked(struct pci_dev *dev);
>  int pci_reset_function(struct pci_dev *dev);
> --
> 1.7.11.7
>

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

* Re: [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays
  2013-07-29 18:44   ` Bjorn Helgaas
@ 2013-07-29 21:03     ` Keller, Jacob E
  2013-07-29 21:19       ` Bjorn Helgaas
  0 siblings, 1 reply; 65+ messages in thread
From: Keller, Jacob E @ 2013-07-29 21:03 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Kirsher, Jeffrey T, David Miller, netdev, gospo, sassmann, linux-pci

On Mon, 2013-07-29 at 12:44 -0600, Bjorn Helgaas wrote:
> On Mon, Jul 29, 2013 at 6:52 AM, Jeff Kirsher
> <jeffrey.t.kirsher@intel.com> wrote:
> > From: Jacob Keller <jacob.e.keller@intel.com>
> >
> > pcie_link_speed and pcix_bus_speed are arrays used by probe.c to correctly
> > convert lnksta register values into the pci_bus_speed enum. These static arrays
> > are useful outside probe for this purpose. This patch makes these defines into
> > const arrays and exposes them with an extern header in linux/include/pci.h
> >
> > 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/pci/probe.c | 4 ++--
> >  include/linux/pci.h | 3 +++
> >  2 files changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
> > index 46ada5c..496c5b0 100644
> > --- a/drivers/pci/probe.c
> > +++ b/drivers/pci/probe.c
> > @@ -513,7 +513,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
> >         return bridge;
> >  }
> >
> > -static unsigned char pcix_bus_speed[] = {
> > +const unsigned char pcix_bus_speed[] = {
> >         PCI_SPEED_UNKNOWN,              /* 0 */
> >         PCI_SPEED_66MHz_PCIX,           /* 1 */
> >         PCI_SPEED_100MHz_PCIX,          /* 2 */
> > @@ -532,7 +532,7 @@ static unsigned char pcix_bus_speed[] = {
> >         PCI_SPEED_133MHz_PCIX_533       /* F */
> >  };
> >
> > -static unsigned char pcie_link_speed[] = {
> > +const unsigned char pcie_link_speed[] = {
> >         PCI_SPEED_UNKNOWN,              /* 0 */
> >         PCIE_SPEED_2_5GT,               /* 1 */
> >         PCIE_SPEED_5_0GT,               /* 2 */
> > diff --git a/include/linux/pci.h b/include/linux/pci.h
> > index 0fd1f15..95ff993 100644
> > --- a/include/linux/pci.h
> > +++ b/include/linux/pci.h
> > @@ -120,6 +120,9 @@ typedef int __bitwise pci_power_t;
> >  /* Remember to update this when the list above changes! */
> >  extern const char *pci_power_names[];
> >
> > +extern const unsigned char pcix_bus_speed[];
> > +extern const unsigned char pcie_link_speed[];
> 
> As far as I can tell, you didn't actually add anything that uses
> pcix_bus_speed[].
> 

I mostly added this for consistency...

> You added a pcie_link_speed[] use only in drivers/pci/pci.c; maybe
> this extern declaration could go in drivers/pci/pci.h to limit its
> visibility?

Pretty sure I use the pcie_link_speed in the ixgbe driver by including
the linux/pci.h header...  Check patch 11/15 of this series where I
actually use the values, so it would need to be in the linux/pci.h
header.

> 
> If you update this patch, note that we conventionally capitalize "PCI:
> Expose ..." in the changelog summary, e.g., "git log --oneline
> drivers/pci".

Oh. good to know, I will keep that in mind for future.
> 
> >  static inline const char *pci_power_name(pci_power_t state)
> >  {
> >         return pci_power_names[1 + (int) state];
> > --
> > 1.7.11.7
> >

Thanks,
Jake

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

* Re: [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays
  2013-07-29 21:03     ` Keller, Jacob E
@ 2013-07-29 21:19       ` Bjorn Helgaas
  0 siblings, 0 replies; 65+ messages in thread
From: Bjorn Helgaas @ 2013-07-29 21:19 UTC (permalink / raw)
  To: Keller, Jacob E
  Cc: Kirsher, Jeffrey T, David Miller, netdev, gospo, sassmann, linux-pci

On Mon, Jul 29, 2013 at 3:03 PM, Keller, Jacob E
<jacob.e.keller@intel.com> wrote:
> On Mon, 2013-07-29 at 12:44 -0600, Bjorn Helgaas wrote:
>> On Mon, Jul 29, 2013 at 6:52 AM, Jeff Kirsher
>> <jeffrey.t.kirsher@intel.com> wrote:
>> > From: Jacob Keller <jacob.e.keller@intel.com>
>> >
>> > pcie_link_speed and pcix_bus_speed are arrays used by probe.c to correctly
>> > convert lnksta register values into the pci_bus_speed enum. These static arrays
>> > are useful outside probe for this purpose. This patch makes these defines into
>> > const arrays and exposes them with an extern header in linux/include/pci.h
>> >
>> > 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/pci/probe.c | 4 ++--
>> >  include/linux/pci.h | 3 +++
>> >  2 files changed, 5 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
>> > index 46ada5c..496c5b0 100644
>> > --- a/drivers/pci/probe.c
>> > +++ b/drivers/pci/probe.c
>> > @@ -513,7 +513,7 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
>> >         return bridge;
>> >  }
>> >
>> > -static unsigned char pcix_bus_speed[] = {
>> > +const unsigned char pcix_bus_speed[] = {
>> >         PCI_SPEED_UNKNOWN,              /* 0 */
>> >         PCI_SPEED_66MHz_PCIX,           /* 1 */
>> >         PCI_SPEED_100MHz_PCIX,          /* 2 */
>> > @@ -532,7 +532,7 @@ static unsigned char pcix_bus_speed[] = {
>> >         PCI_SPEED_133MHz_PCIX_533       /* F */
>> >  };
>> >
>> > -static unsigned char pcie_link_speed[] = {
>> > +const unsigned char pcie_link_speed[] = {
>> >         PCI_SPEED_UNKNOWN,              /* 0 */
>> >         PCIE_SPEED_2_5GT,               /* 1 */
>> >         PCIE_SPEED_5_0GT,               /* 2 */
>> > diff --git a/include/linux/pci.h b/include/linux/pci.h
>> > index 0fd1f15..95ff993 100644
>> > --- a/include/linux/pci.h
>> > +++ b/include/linux/pci.h
>> > @@ -120,6 +120,9 @@ typedef int __bitwise pci_power_t;
>> >  /* Remember to update this when the list above changes! */
>> >  extern const char *pci_power_names[];
>> >
>> > +extern const unsigned char pcix_bus_speed[];
>> > +extern const unsigned char pcie_link_speed[];
>>
>> As far as I can tell, you didn't actually add anything that uses
>> pcix_bus_speed[].
>>
>
> I mostly added this for consistency...
>
>> You added a pcie_link_speed[] use only in drivers/pci/pci.c; maybe
>> this extern declaration could go in drivers/pci/pci.h to limit its
>> visibility?
>
> Pretty sure I use the pcie_link_speed in the ixgbe driver by including
> the linux/pci.h header...  Check patch 11/15 of this series where I
> actually use the values, so it would need to be in the linux/pci.h
> header.

I'm not sure I was copied on patch 11/15.  I assume it might be
"ixgbe: call pcie_get_mimimum_link to check if device has enough
bandwidth", and I see that patch uses the pci_bus_speed enum, so the
enum definitely needs to be in include/linux/pci.h.  But I don't see
the pcie_link_speed[] reference.

I did fetch your git tree and searched the diffs themselves but the
only use I saw was in pcie_get_minimum_link() in drivers/pci/pci.c.

Bjorn

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

* Re: [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth
  2013-07-29 12:52 ` [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth Jeff Kirsher
@ 2013-07-29 21:46   ` Keller, Jacob E
  0 siblings, 0 replies; 65+ messages in thread
From: Keller, Jacob E @ 2013-07-29 21:46 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: netdev

Hi Bjorn,

Here is the patch I was referring to, I think I see what you mean now...

On Mon, 2013-07-29 at 05:52 -0700, Jeff Kirsher wrote:
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This patch uses the new pcie_get_minimum_link function to perform a check to
> ensure that the adapter is hooked into a slot which is capable of providing the
> necessary bandwidth. This check supersedes the original method which only
> checked the current pci device. The new method is capable of determining the
> minimum speed and link of an entire PCI chain.
> 
> 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_main.c | 130 ++++++++++++++++++++++++--
>  1 file changed, 123 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 3aff87e..5ec2b74 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -195,6 +195,79 @@ static s32 ixgbe_get_parent_bus_info(struct ixgbe_adapter *adapter)
>  	return 0;
>  }
>  
> +/**
> + * ixgbe_check_from_parent - Determine whether PCIe info should come from parent
> + * @hw: hw specific details
> + *
> + * This function is used by probe to determine whether a device's PCI-Express
> + * bandwidth details should be gathered from the parent bus instead of from the
> + * device. Used to ensure that various locations all have the correct device ID
> + * checks.
> + */
> +static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
> +{
> +	switch (hw->device_id) {
> +	case IXGBE_DEV_ID_82599_SFP_SF_QP:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
> +static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
> +				     int expected_gts)
> +{
> +	int max_gts = 0;
> +	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
> +	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
> +	struct pci_dev *pdev;
> +
> +	/* determine whether to use the the parent device
> +	 */
> +	if (ixgbe_pcie_from_parent(&adapter->hw))
> +		pdev = adapter->pdev->bus->parent->self;
> +	else
> +		pdev = adapter->pdev;
> +
> +	if (pcie_get_minimum_link(pdev, &speed, &width) ||
> +	    speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) {
> +		e_dev_warn("Unable to determine PCI-Express slot throughput.\n");
> +		return;
> +	}
> +
> +	switch (speed) {
> +	case PCIE_SPEED_2_5GT:
> +		/* 8b/10b encoding reduces max throughput */
> +		max_gts = 2 * width;

I use the speed enums here, but I think you're right I don't use the
arrays, those are only used in the pci function directly, and I could
re-spin the patch to remove the addition of those.

Thanks,
Jake

> +		break;
> +	case PCIE_SPEED_5_0GT:
> +		/* 8b/10b encoding reduces max throughput */
> +		max_gts = 4 * width;
> +		break;
> +	case PCIE_SPEED_8_0GT:
> +		/* 128b/130b encoding has less impact on throughput */
> +		max_gts = 8 * width;
> +		break;
> +	default:
> +		e_dev_warn("Unable to determine PCI-Express throughput.\n");
> +		return;
> +	}
> +
> +	if (max_gts < expected_gts) {
> +		e_dev_warn("PCI-Express bandwidth of %dGT/s available (PCI Express:%s:Width x%d)\n",
> +			   max_gts,
> +			   (speed == PCIE_SPEED_8_0GT ? "8.0GT/s" :
> +			    speed == PCIE_SPEED_5_0GT ? "5.0GT/s" :
> +			    speed == PCIE_SPEED_2_5GT ? "2.5GT/s" :
> +			    "Unknown"),
> +			   width);
> +		e_dev_warn("This is not sufficient for optimal performance of this card.\n");
> +		e_dev_warn("For optimal performance, at least %dGT/s of bandwidth is required.\n",
> +			expected_gts);
> +		e_dev_warn("A slot with more lanes and/or higher speed is suggested.\n");
> +	}
> +}
> +
>  static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
>  {
>  	if (!test_bit(__IXGBE_DOWN, &adapter->state) &&
> @@ -7250,6 +7323,41 @@ static const struct net_device_ops ixgbe_netdev_ops = {
>  };
>  
>  /**
> + * ixgbe_enumerate_functions - Get the number of ports this device has
> + * @adapter: adapter structure
> + *
> + * This function enumerates the phsyical functions co-located on a single slot,
> + * in order to determine how many ports a device has. This is most useful in
> + * determining the required GT/s of PCIe bandwidth necessary for optimal
> + * performance.
> + **/
> +static inline int ixgbe_enumerate_functions(struct ixgbe_adapter *adapter)
> +{
> +	struct ixgbe_hw *hw = &adapter->hw;
> +	struct list_head *entry;
> +	int physfns = 0;
> +
> +	/* Some cards can not use the generic count PCIe functions method, and
> +	 * so must be hardcoded to the correct value.
> +	 */
> +	switch (hw->device_id) {
> +	case IXGBE_DEV_ID_82599_SFP_SF_QP:
> +		physfns = 4;
> +		break;
> +	default:
> +		list_for_each(entry, &adapter->pdev->bus_list) {
> +			struct pci_dev *pdev =
> +				list_entry(entry, struct pci_dev, bus_list);
> +			/* don't count virtual functions */
> +			if (!pdev->is_virtfn)
> +				physfns++;
> +		}
> +	}
> +
> +	return physfns;
> +}
> +
> +/**
>   * ixgbe_wol_supported - Check whether device supports WoL
>   * @hw: hw specific details
>   * @device_id: the device ID
> @@ -7331,7 +7439,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	struct ixgbe_hw *hw;
>  	const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
>  	static int cards_found;
> -	int i, err, pci_using_dac;
> +	int i, err, pci_using_dac, expected_gts;
>  	unsigned int indices = MAX_TX_QUEUES;
>  	u8 part_str[IXGBE_PBANUM_LENGTH];
>  #ifdef IXGBE_FCOE
> @@ -7620,7 +7728,7 @@ skip_sriov:
>  
>  	/* pick up the PCI bus settings for reporting later */
>  	hw->mac.ops.get_bus_info(hw);
> -	if (hw->device_id == IXGBE_DEV_ID_82599_SFP_SF_QP)
> +	if (ixgbe_pcie_from_parent(hw))
>  		ixgbe_get_parent_bus_info(adapter);
>  
>  	/* print bus type/speed/width info */
> @@ -7646,12 +7754,20 @@ skip_sriov:
>  		e_dev_info("MAC: %d, PHY: %d, PBA No: %s\n",
>  			   hw->mac.type, hw->phy.type, part_str);
>  
> -	if (hw->bus.width <= ixgbe_bus_width_pcie_x4) {
> -		e_dev_warn("PCI-Express bandwidth available for this card is "
> -			   "not sufficient for optimal performance.\n");
> -		e_dev_warn("For optimal performance a x8 PCI-Express slot "
> -			   "is required.\n");
> +	/* calculate the expected PCIe bandwidth required for optimal
> +	 * performance. Note that some older parts will never have enough
> +	 * bandwidth due to being older generation PCIe parts. We clamp these
> +	 * parts to ensure no warning is displayed if it can't be fixed.
> +	 */
> +	switch (hw->mac.type) {
> +	case ixgbe_mac_82598EB:
> +		expected_gts = min(ixgbe_enumerate_functions(adapter) * 10, 16);
> +		break;
> +	default:
> +		expected_gts = ixgbe_enumerate_functions(adapter) * 10;
> +		break;
>  	}
> +	ixgbe_check_minimum_link(adapter, expected_gts);
>  
>  	/* reset the hardware with the new settings */
>  	err = hw->mac.ops.start_hw(hw);



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

* Re: [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting.
  2013-07-29 12:51 ` [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting Jeff Kirsher
@ 2013-07-30  5:18   ` David Miller
  2013-07-30 16:17     ` Skidmore, Donald C
  0 siblings, 1 reply; 65+ messages in thread
From: David Miller @ 2013-07-30  5:18 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: donald.c.skidmore, netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 29 Jul 2013 05:51:59 -0700
> @@ -67,15 +67,39 @@ static s32 ixgbe_disable_pcie_master(struct ixgbe_hw *hw);
>   **/
>  s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)
>  {
> +	bool supported = false;
 ...
> +	return supported;

If the function is returning bool, fix the function's return type from
's32' to 'bool'.


> -		    (ixgbe_device_supports_autoneg_fc(hw) == 0)) {
> +		    (ixgbe_device_supports_autoneg_fc(hw))) {

I think the outermost parenthesis in "(ixgbe_device_supports_autoneg_fc(hw))"
should be removed.

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

* Re: [net-next 04/15] ixgbe: add new media type
  2013-07-29 12:52 ` [net-next 04/15] ixgbe: add new media type Jeff Kirsher
@ 2013-07-30  5:20   ` David Miller
  0 siblings, 0 replies; 65+ messages in thread
From: David Miller @ 2013-07-30  5:20 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: donald.c.skidmore, netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 29 Jul 2013 05:52:00 -0700

> +	status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_OSCB,
> +					    IXGBE_I2C_EEPROM_DEV_ADDR2,
> +					    eeprom_data);
> +	if (status) {
> +		hw_dbg(hw, "Failed to read Rx Rate Select RS1\n");
> +		goto out;
> +	}

Either the call, or the debugging message, is wrong.

They don't agree on whether this is a read or a write.

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

* RE: [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting.
  2013-07-30  5:18   ` David Miller
@ 2013-07-30 16:17     ` Skidmore, Donald C
  0 siblings, 0 replies; 65+ messages in thread
From: Skidmore, Donald C @ 2013-07-30 16:17 UTC (permalink / raw)
  To: David Miller, Kirsher, Jeffrey T; +Cc: netdev, gospo, sassmann

> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, July 29, 2013 10:19 PM
> To: Kirsher, Jeffrey T
> Cc: Skidmore, Donald C; netdev@vger.kernel.org; gospo@redhat.com;
> sassmann@redhat.com
> Subject: Re: [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting.
> 
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Mon, 29 Jul 2013 05:51:59 -0700
> > @@ -67,15 +67,39 @@ static s32 ixgbe_disable_pcie_master(struct
> ixgbe_hw *hw);
> >   **/
> >  s32 ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)  {
> > +	bool supported = false;
>  ...
> > +	return supported;
> 
> If the function is returning bool, fix the function's return type from 's32' to
> 'bool'.
> 
> 
> > -		    (ixgbe_device_supports_autoneg_fc(hw) == 0)) {
> > +		    (ixgbe_device_supports_autoneg_fc(hw))) {
> 
> I think the outermost parenthesis in
> "(ixgbe_device_supports_autoneg_fc(hw))"
> should be removed.

Thanks Dave, I'll clean this up and send the new patches to Jeff.

-Don Skidmore <donald.c.skidmore>

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

* Re: [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules
  2013-07-29 12:52 ` [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules Jeff Kirsher
@ 2013-08-02  9:08   ` Ben Hutchings
  2013-08-06  0:56     ` Tantilov, Emil S
  0 siblings, 1 reply; 65+ messages in thread
From: Ben Hutchings @ 2013-08-02  9:08 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: davem, Emil Tantilov, netdev, gospo, sassmann

On Mon, 2013-07-29 at 05:52 -0700, Jeff Kirsher wrote:
> From: Emil Tantilov <emil.s.tantilov@intel.com>
> 
> This patch fixes several issues with the previous implementation of the
> SFF data dump of SFP+ modules:
> 
> - removed the __IXGBE_READ_I2C flag - I2C access locking is handled in the
>   HW specific routines
> 
> - fixed the read loop to read data from ee->offset to ee->len
> 
> - the reads fail if __IXGBE_IN_SFP_INIT is set in the process - this is
>   needed because on some HW I2C operations can take long time and disrupt
>   the SFP and link detection process
> 
> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
> Reported-by: Ben Hutchings <bhutchings@solarflare.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
[...]
> @@ -2969,48 +2955,25 @@ static int ixgbe_get_module_eeprom(struct net_device *dev,
>  	int i = 0;
>  	int ret_val = 0;
>  
> -	/* ixgbe_get_module_info is called before this function in all
> -	 * cases, so we do not need any checks we already do above,
> -	 * and can trust ee->len to be a known value.
> -	 */
> +	if (ee->len == 0)
> +		return -EINVAL;
>  
> -	while (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
> -		msleep(100);
> -	set_bit(__IXGBE_READ_I2C, &adapter->state);
> +	for (i = ee->offset; i < ee->len; i++) {

                               i < ee->offset + ee->len

> +		/* I2C reads can take long time */
> +		if (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
> +			return -EBUSY;
>  
> -	/* Read the first block, SFF-8079 */
> -	for (i = 0; i < ETH_MODULE_SFF_8079_LEN; i++) {
> -		status = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);
> -		if (status != 0) {
> -			/* Error occured while reading module */
> +		if (i < ETH_MODULE_SFF_8079_LEN)
> +			status  = hw->phy.ops.read_i2c_eeprom(hw, i, &databyte);
> +		else
> +			status = hw->phy.ops.read_i2c_sff8472(hw, i, &databyte);
[...]
                                                     i - ETH_MODULE_SFF_8079_LEN ?

But this works anyway because the address is truncated to u8.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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

* RE: [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules
  2013-08-02  9:08   ` Ben Hutchings
@ 2013-08-06  0:56     ` Tantilov, Emil S
  0 siblings, 0 replies; 65+ messages in thread
From: Tantilov, Emil S @ 2013-08-06  0:56 UTC (permalink / raw)
  To: Ben Hutchings, Kirsher, Jeffrey T; +Cc: davem, netdev, gospo, sassmann

>-----Original Message-----
>From: netdev-owner@vger.kernel.org [mailto:netdev-
>owner@vger.kernel.org] On Behalf Of Ben Hutchings
>Sent: Friday, August 02, 2013 2:09 AM
>To: Kirsher, Jeffrey T
>Cc: davem@davemloft.net; Tantilov, Emil S;
>netdev@vger.kernel.org; gospo@redhat.com;
>sassmann@redhat.com
>Subject: Re: [net-next 07/15] ixgbe: fix SFF data dumps of
>SFP+ modules
>
>On Mon, 2013-07-29 at 05:52 -0700, Jeff Kirsher wrote:
>> From: Emil Tantilov <emil.s.tantilov@intel.com>
>>
>> This patch fixes several issues with the previous
>implementation of the
>> SFF data dump of SFP+ modules:
>>
>> - removed the __IXGBE_READ_I2C flag - I2C access locking
>is handled in the
>>   HW specific routines
>>
>> - fixed the read loop to read data from ee->offset to ee-
>>len
>>
>> - the reads fail if __IXGBE_IN_SFP_INIT is set in the
>process - this is
>>   needed because on some HW I2C operations can take long
>time and disrupt
>>   the SFP and link detection process
>>
>> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
>> Reported-by: Ben Hutchings <bhutchings@solarflare.com>
>> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>[...]
>> @@ -2969,48 +2955,25 @@ static int
>ixgbe_get_module_eeprom(struct net_device *dev,
>>  	int i = 0;
>>  	int ret_val = 0;
>>
>> -	/* ixgbe_get_module_info is called before this function
>in all
>> -	 * cases, so we do not need any checks we already do
>above,
>> -	 * and can trust ee->len to be a known value.
>> -	 */
>> +	if (ee->len == 0)
>> +		return -EINVAL;
>>
>> -	while (test_bit(__IXGBE_IN_SFP_INIT, &adapter->state))
>> -		msleep(100);
>> -	set_bit(__IXGBE_READ_I2C, &adapter->state);
>> +	for (i = ee->offset; i < ee->len; i++) {
>
>                               i < ee->offset + ee->len
>
>> +		/* I2C reads can take long time */
>> +		if (test_bit(__IXGBE_IN_SFP_INIT, &adapter-
>>state))
>> +			return -EBUSY;
>>
>> -	/* Read the first block, SFF-8079 */
>> -	for (i = 0; i < ETH_MODULE_SFF_8079_LEN; i++) {
>> -		status = hw->phy.ops.read_i2c_eeprom(hw, i,
>&databyte);
>> -		if (status != 0) {
>> -			/* Error occured while reading module */
>> +		if (i < ETH_MODULE_SFF_8079_LEN)
>> +			status  = hw->phy.ops.read_i2c_eeprom(hw, i,
>&databyte);
>> +		else
>> +			status = hw->phy.ops.read_i2c_sff8472(hw, i,
>&databyte);
>[...]
>                                                     i -
>ETH_MODULE_SFF_8079_LEN ?
>
>But this works anyway because the address is truncated to
>u8.

Actually as is the loop will only work when offset is 0, so it looks like it should be:

for (i = ee->offset; i < ee->offset + ee->len; i++) {


Unless you had something else in mind.

I will submit a fix for this.

Thanks,
Emil

>
>Ben.


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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 29 May 2014 08:10:01 -0700

> This series contains updates to i40e and i40evf.
 ...
> The following are changes since commit 6623b4194459c07859d3e3196c3994fa7be5b88e:
>   Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

And, as always, thanks for the detailed cover letter.

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

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

This series contains updates to i40e and i40evf.

Kevin updates the i40e and i40evf driver i40e_check_asq_alive() to ensure
the length register offset is non-zero which indicates that the software
has initialized the admin queue.  Also removes PCTYPE definitions which are
now reserved.

Mitch enables descriptor prefetch for rings belonging to the virtual function.
Also configures the VF minimum transmit rate to 50 Mbps rather than 0 which was
be interpreted as no limit at all.  Mitch found in order for the VF to achieve
its programmed transmit rate, we need to set the max credit value to 4.
Lastly fixes a Tx hang and firmware crash that happens after setting the MTU
on a VF by not using the RESETTING state during reinit, this is because
the RESETTING state means that a catastrophic hardware bad thing is happening
and the driver needs to tiptoe around and not use the admin queue or registers.
A reinit is no big deal and we can use the admin queue (and we should) so
do not set the state to RESETTING during reinit to resolve the bug.

Akeem changes the declaration of the transmit and receive rings inside
several loops to eliminate declaring the same ring every time for the
duration of the loop and declares them just once before the loop.  Also fixes
the driver to clear the recovery pending bit if pf_reset fails instead of
falling through the setup process.

Anjali makes a change based on feedback from Ben Hutchings that cmd->data
needs to be reported in ETHTOOL_GRXCLSRLCNT and use a helper function to
calculate the total filter count.

Jesse removes storm control since the storm control features are not apart
of the hardware and were mistakenly left in the code.

Greg changes tx_lpi_status and rx_lpi_status from bool to u32 to avoid
sparse errors.

Shannon adds the clear_pxe AdminQ API call to tell the firmware that the
driver is taking over from PXE.  In addition, relaxes the firmware API
check to allow more flexibility in handling newer NICs and NVMs in the field.

Vasu ensures that FCoE is disabled for MFP modes since it is not supported
by overriding the hardware FCoE capability.

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

Akeem G Abodunrin (2):
  i40e: Tx/Rx rings declaration
  i40e: Clear recovery pending, if reset failed

Anjali Singhai Jain (2):
  i40e: Report cmd->data in ETHTOOL_GRXCLSRLCNT instead of
    ETHTOOL_GRXCLSRULE
  i40e: Use the new i40e_get_fd_cnt_all function in other places

Greg Rose (1):
  i40e/i40evf: Change type to u32 to avoid sparse error

Jesse Brandeburg (1):
  i40e/i40evf: remove storm control

Kevin Scott (2):
  i40e/i40evf: Update check for AQ aliveness
  i40e/i40evf: Remove reserved PCTYPE defines

Mitch Williams (4):
  i40e: enable descriptor prefetch for VFs
  i40evf: don't round Tx rate down to 0
  i40evf: tweak Tx rate params and de-magic-ify
  i40evf: don't use RESETTING state during reinit

Shannon Nelson (2):
  i40e: add clear_pxe AdminQ request
  i40e: relax the firmware API version check

Vasu Dev (1):
  i40: disable FCoE for MFP modes

 drivers/net/ethernet/intel/i40e/i40e.h             |  9 +++++
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  3 +-
 drivers/net/ethernet/intel/i40e/i40e_common.c      | 42 +++++++++++++++++++++-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 37 +++++++------------
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 19 +++++-----
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |  2 ++
 drivers/net/ethernet/intel/i40e/i40e_register.h    |  4 ---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        | 33 +++++++----------
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        |  7 +---
 drivers/net/ethernet/intel/i40e/i40e_type.h        | 14 +++-----
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 13 +++++--
 drivers/net/ethernet/intel/i40evf/i40e_common.c    |  6 +++-
 drivers/net/ethernet/intel/i40evf/i40e_register.h  |  4 ---
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h      |  7 +---
 drivers/net/ethernet/intel/i40evf/i40e_type.h      | 14 +++-----
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  2 --
 16 files changed, 116 insertions(+), 100 deletions(-)

-- 
1.9.3

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-05-27  9:12 Jeff Kirsher
@ 2014-05-28 16:42 ` David Miller
  0 siblings, 0 replies; 65+ messages in thread
From: David Miller @ 2014-05-28 16:42 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Tue, 27 May 2014 02:12:16 -0700

> This series contains updates to e1000, e1000e, ixgbe and i40evf.

Pulled, thanks a lot Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-05-27  9:12 Jeff Kirsher
  2014-05-28 16:42 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-05-27  9:12 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to e1000, e1000e, ixgbe and i40evf.

Emil provides a fix for ixgbe so that non-fiber devices with MNG FW enabled
are able to link at 100Mbps.

Jacob provides several changes for ixgbe, most of which are PTP related.
Renames ixgbe_ptp_enable() to ixgbe_ptp_feature_enable() to better reflect
the functions purpose.  Extracts the hardware setup logic for the PTP
hardware bits from the ixgbe_ptp_set_ts_config() to enable future work for
the ixgbe_ptp_reset().  Maintain the hwstamp configuration through a reset
and extracts the creation of the PTP clock device from ptp_init() in order
to properly handle a suspend/resume cycle and only calls it if we don't
already have a ptp_clock pointer.

David provides a patch to expend the e1000e driver to turn on unicast
PROMISC when there is failure to write to a shared receive address register.
The fix update_phy_task() for 82579 is expanded to include newer PHYs as well
so that the dev_spec->eee_lp_ability has the correct value when going into
SX states.

Todd provides a e1000e fix an errata for 82574/82583 where it is possible
bad bits are read from SYSTIMH/L so check to see that the time is
incrementing at a reasonable rate and is a multiple of the time incremental
value.  Removes a redundant igb PHY power down register write.

Andi Kleen out of lines two write functions for e1000e to save 30k text size.

Tobias Klauser converts the e1000 and i40evf drivers to use the
is_broadcast_ether_addr() and is_multicast_ether_addr().

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

Andi Kleen (1):
  e1000e: Out of line __ew32_prepare/__ew32

David Ertman (3):
  e1000e: Failure to write SHRA turns on PROMISC mode
  e1000e: Cleanup parenthesis around return value
  e1000e: Fix expand setting EEE link info to all affected parts

Emil Tantilov (1):
  ixgbe: fix linking at 100Mbps on copper devices with MNG FW enabled

Jacob Keller (6):
  ixgbe: rename ixgbe_ptp_enable to ixgbe_ptp_feature_enable
  ixgbe: extract the hardware setup from the ixgbe_ptp_set_ts_config
  ixgbe: allow ixgbe_ptp_reset to maintain current hwtstamp config
  ixgbe: extract PTP clock device from ptp_init
  ixgbe: separate the PTP suspend and stop actions
  ixgbe: avoid duplicate code in suspend and stop paths

Tobias Klauser (2):
  e1000: Use is_broadcast_ether_addr/is_multicast_ether_addr helpers
  i40evf: Use is_multicast_ether_addr helper

Todd Fujinaka (2):
  e1000e: 82574/82583 TimeSync errata for SYSTIM read
  igb: remove redundant PHY power down register write

 drivers/net/ethernet/intel/e1000/e1000_hw.c     |   4 +-
 drivers/net/ethernet/intel/e1000e/80003es2lan.c |   1 +
 drivers/net/ethernet/intel/e1000e/82571.c       |   1 +
 drivers/net/ethernet/intel/e1000e/e1000.h       |  33 +----
 drivers/net/ethernet/intel/e1000e/hw.h          |   3 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.c     |  61 +++++++--
 drivers/net/ethernet/intel/e1000e/mac.c         |   9 +-
 drivers/net/ethernet/intel/e1000e/mac.h         |   3 +-
 drivers/net/ethernet/intel/e1000e/netdev.c      |  69 +++++++++-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c |   2 +-
 drivers/net/ethernet/intel/igb/e1000_phy.c      |  14 --
 drivers/net/ethernet/intel/igb/e1000_phy.h      |   1 -
 drivers/net/ethernet/intel/ixgbe/ixgbe.h        |   1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   |  29 +++--
 drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c    | 163 ++++++++++++++++++------
 15 files changed, 277 insertions(+), 117 deletions(-)

-- 
1.9.3

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 21 May 2014 05:00:58 -0700

> This series contains updates to i40e and i40evf.

Pulled, thanks Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-05-21 12:00 Jeff Kirsher
  2014-05-22 16:05 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-05-21 12:00 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e and i40evf.

Shannon makes minor changes to the AdminQ interface to bring it up to
date.  Removes the hard coding of stats struct size in ethtool, in prep
for adding data fields which are configuration dependent.

Catherine removes some unused and unneeded PCI bus defines.

Jesse fixes the copyright headers and finishes up the removal of the PTP
Tx work functionality which allows us to rely on the Tx timesync interrupt.

Mitch provides a number of fixes and cleanups for i40e/i40evf based on
suggestions from Ben Hutchings.  First is to use a macro parameter for
ethtool stats instead of just assuming that a valid netdev variable
exists.  Second is not to tell ethtool that the VF can do 10GbaseT, when
it really has no idea what its link speed is, so set the supported value
to 0 instead.  Make the ethtool_ops structure constant since it is
extremely unlikely to change at runtime.  Ethtool consistently reports
0 values for our ITR settings because we never actually use them, so
fix this by setting the default values to the specified default values.

Greg avoids a compile error by wrapping the call to i40e_alloc_vfs() in
CONFIG_PCI_IOV because the function itself is wrapped in the same
conditional compile block.

Alexander Gordeev updates the driver to use the new pci_enable_msi_range()
and pci_enable_msix_range() or pci_enable_msi_exact() and
pci_enable_msix_exact().

Jean Sacren provides a fix where the wrong error code was being passed to
i40e_open().

The following are changes since commit b6052af61a9e0dee236bcf4c69843126c0d28e4f:
  Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Alexander Gordeev (1):
  i40evf: Use pci_enable_msix_range() instead of pci_enable_msix()

Catherine Sullivan (1):
  i40evf: Remove unused defines

Greg Rose (1):
  i40e: Check PCI_IOV config to avoid compile error

Jean Sacren (1):
  i40e: fix passing wrong error code to i40e_open()

Jesse Brandeburg (2):
  i40evf: Fix the headers and update copyright year.
  i40e: remove Tx work for ptp

Mitch Williams (7):
  i40e: add required include
  i40evf: Use macro param for ethtool stats
  i40evf: don't lie to ethtool
  i40evf: make ethtool_ops const
  i40e/i40evf: set proper default for ITR registers
  i40e/i40evf: control auto ITR through ethtool
  i40e: Don't disable SR-IOV when VFs are assigned

Shannon Nelson (2):
  i40evf: Update AdminQ interface
  i40e: remove hardcode of stats struct size in ethtool

 drivers/net/ethernet/intel/i40e/i40e.h             |  4 --
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 63 +++++++---------
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  8 ++-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |  1 -
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  1 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 11 ++-
 drivers/net/ethernet/intel/i40evf/Makefile         |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq.c    |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq.h    |  5 +-
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 27 ++++---
 drivers/net/ethernet/intel/i40evf/i40e_alloc.h     |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_common.c    |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_hmc.h       |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_lan_hmc.h   |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_osdep.h     |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_prototype.h |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_register.h  |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_status.h    |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c      |  3 +
 drivers/net/ethernet/intel/i40evf/i40e_txrx.h      |  5 +-
 drivers/net/ethernet/intel/i40evf/i40e_type.h      | 12 +---
 drivers/net/ethernet/intel/i40evf/i40e_virtchnl.h  |  5 +-
 drivers/net/ethernet/intel/i40evf/i40evf.h         |  3 +
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 84 +++++++++++-----------
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 40 +++++------
 .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    |  3 +
 26 files changed, 179 insertions(+), 146 deletions(-)

-- 
1.9.0

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 28 Apr 2014 06:52:23 -0700

> This series contains updates to i40e and i40evf.

Pulled, thanks a lot Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-04-28 13:52 Jeff Kirsher
  2014-04-28 18:53 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-04-28 13:52 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e and i40evf.

Jacob provides a i40e patch to remove ptp_tx_work() because it conflicts
with the interrupt-based handler and will cause spurious warning messages
to be displayed in the kernel log.  Since the hardware can properly trigger
an interrupt, we do not need to poll for an available timestamp in a work
queue any more.

Greg provides two patches for i40e, first to retain the MAC filter list
when changing a port VLAN.  Second fixes an issue where the function to
set the VF MAC address was not taking the port VLAN filter into account
when setting/clearing/resetting the VF's host administered MAC address.

Mitch provides three patches for i40evf, first adds support for getting
and setting RSS hashing options, RSS LUT entries, and getting the number
of device channels from ethtool.  Fixes a panic that woudl occur in the VF
if the PF driver failed or was removed from the host kernel.

Shannon adds driver version string to the driver version command so that
can be passed down through the firmware to low-level NC-SI functions.

Neerav provides several patches, first redistributes queue vectors after
DCB reconfiguration because the total number of queues that are configured
for a VSI may change based on a change in the total number of TCs enabled
as a result of a change in the DCB configuration based on DCBX.  Second,
allows the driver probe to continue when querying DCB config fails.
Lastly, provides changes to retrieve and store missing link config
information that was not being cached in the struct i40e_link_status.

Kevin provides a couple of patches, first to change a int variable type
to u16 to avoid a typecheck failure.  Second to update a function
parameters to remove an argument which is no longer used.

The following are changes since commit a49eb42a341f1df8fa0f9dc4449f9dd4a3234a2f:
  sched, act: allow to clear all actions as well
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (2):
  i40e: Do not enable NTUPLE feature control in MFP mode
  i40e: Do not expose fd-sb commands from debugfs

Catherine Sullivan (1):
  i40e/i40evf: Bump build version

Greg Rose (2):
  i40e: Retain MAC filters when changing port VLAN
  i40e: Use port VLAN in MAC/VLAN filter configuration

Jacob Keller (1):
  i40e: remove ptp_tx_work timestamp work item

Kevin Scott (2):
  i40e: Change variable type to avoid typecheck failure
  i40e: Update function formal parameters

Mitch A Williams (1):
  i40evf: support ethtool RSS options

Mitch Williams (2):
  i40evf: fix panic on PF driver fail
  i40evf: remove debugging message

Neerav Parikh (3):
  i40e: Redistribute queue vectors after DCB reconfiguration
  i40e: Don't stop driver probe when querying DCB config fails
  i40e/i40evf: Retrieve and store missing link config information

Shannon Nelson (1):
  i40e/i40evf: add driver version string to driver version command

 drivers/net/ethernet/intel/i40e/i40e.h             |   2 -
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  21 +-
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |   6 -
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  19 +-
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_ptp.c         |  36 ---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |   3 -
 drivers/net/ethernet/intel/i40e/i40e_type.h        |   4 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  11 +-
 drivers/net/ethernet/intel/i40evf/i40e_type.h      |   4 +
 drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c | 316 +++++++++++++++++++++
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  15 +-
 12 files changed, 373 insertions(+), 68 deletions(-)

-- 
1.9.0

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

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

This series contains updates to e1000e, igb, i40e and i40evf

Anjali provides i40e fix to remove the ATR filter on RST as well as FIN
packets.  Cleans up add_del_fdir() because it was used and implemented
only for the add, so change the name and drop a parameter.  Adds the
ability to drop a flow if we wanted to and adds a flow director
message level to be used for flow director specific messages.  Provide
a fallback debug flow for i40e if the reset fails or the firmware is
unresponsive.

Mitch fixes an issue on i40evf where the Tx watchdog handler was causing
an oops when sending an admin queue message to request a reset because
the admin queue functions use spinlocks.

Greg provides a change to i40e to make the alloc and free queue vector
calls orthogonal.

Shannon fixes i40e to verify the eeprom checksum and firmware CRC status
bits, and shutdown the driver if they fail.  This change stops the
processing of traffic, but does not kill the PF netdev so that the
NVMUpdate process still has a chance at fixing the image.  Also provides
a fix to make sure the VSI has a netdev before trying to use it in
the debugfs netdev_ops commands.

Jakub Kicinski provides patches for e1000e and igb to fix a number issues
found in the PTP code.

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

Anjali Singhai Jain (6):
  i40e: Delete ATR filter on RST
  i40e: Cleanup in FDIR SB ethtool code
  i40e: Add functionality for FD SB to drop packets
  i40e/i40evf: Add an FD message level
  i40e: Use DEBUG_FD message level for an FD message
  i40e: Add a fallback debug flow for the driver

Greg Rose (1):
  i40e: Make the alloc and free queue vector calls orthogonal

Jakub Kicinski (4):
  e1000e: add timeout for TX HW time stamping work
  e1000e: remove redundant if clause from PTP work
  igb: never generate both software and hardware timestamps
  igb: fix race conditions on queuing skb for HW time stamp

Jesse Brandeburg (1):
  i40evf: remove double space after return

Mitch Williams (1):
  i40evf: fix oops in watchdog handler

Shannon Nelson (2):
  i40e: eeprom integrity check on load and empr
  i40e: check for netdev before debugfs use

 drivers/net/ethernet/intel/e1000e/e1000.h          |   2 +
 drivers/net/ethernet/intel/e1000e/ethtool.c        |   1 +
 drivers/net/ethernet/intel/e1000e/netdev.c         |  10 +-
 drivers/net/ethernet/intel/i40e/i40e.h             |   2 +
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 120 ++++++++++++---------
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  39 ++++---
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  72 ++++++++++---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  14 ++-
 drivers/net/ethernet/intel/i40e/i40e_type.h        |   1 +
 drivers/net/ethernet/intel/i40evf/i40e_prototype.h |   2 +-
 drivers/net/ethernet/intel/i40evf/i40e_type.h      |   1 +
 drivers/net/ethernet/intel/i40evf/i40evf.h         |   1 +
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  10 +-
 drivers/net/ethernet/intel/igb/igb.h               |   3 +-
 drivers/net/ethernet/intel/igb/igb_main.c          |   7 +-
 drivers/net/ethernet/intel/igb/igb_ptp.c           |   3 +
 16 files changed, 186 insertions(+), 102 deletions(-)

-- 
1.8.3.1

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-03-20  8:32 Jeff Kirsher
@ 2014-03-20 18:20 ` David Miller
  0 siblings, 0 replies; 65+ messages in thread
From: David Miller @ 2014-03-20 18:20 UTC (permalink / raw)
  To: jeffrey.t.kirsher
  Cc: netdev, gospo, sassmann, emil.s.tantilov, asharma, donald.c.skidmore

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 20 Mar 2014 01:32:50 -0700

> This series contains updates to e100, igb, igbvf, ixgbe and ixgbevf.
 ...
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-03-20  8:32 Jeff Kirsher
  2014-03-20 18:20 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-03-20  8:32 UTC (permalink / raw)
  To: davem
  Cc: Jeff Kirsher, netdev, gospo, sassmann, emil.s.tantilov, asharma,
	donald.c.skidmore

This series contains updates to e100, igb, igbvf, ixgbe and ixgbevf.

Stefan adds a igb patch to enable the ability strip VLAN header information
for packets bound for a VM on i350 hardware.

Joe Perches provides patches for e100, igb, igbvf, ixgbe and ixgbevf to
convert the use of __constant_<foo> to just <foo> to align with the rest
of the kernel.

Don provides two fixes for ixgbe, first resolves a link issue with DA
cables where we were not always freeing the firmware/software semaphore
after grabbing it.  Second stops caching whether the management firmware
was enabled, however since this is not static, we really need to verify
with each check.

Jacob provides six fixes/cleanups for ixgbe, most notably, correct
the stop_mac_link_on d3() to check the Core Clock Disable bit before
stopping link and to fully check to see if manage firmware is running or
could be enabled before bringing down the link.  Fix flow control
auto-negation for KR/KX/K4 interfaces, since setting up MAC link, the
cached autoc value and current autoc value were being incorrectly used to
determine whether link reset is required.

Emil provides a fix for ixgbe where there was a chance for aggressive
start_ndo_zmit() callers to sneak packets between enabling the Tx queues
and the link coming up.  To resolve this, move the call to enable Tx
queues to after the link is established.

The following are changes since commit a9baf10aafe7001501189099df4b91f90739e182:
  qeth: Fix IP version detection for VLAN traffic
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 errors related to protected AUTOC calls
  ixgbe: Stop cacheing if the MNG FW enabled

Emil Tantilov (1):
  ixgbe: enable tx queues after link up

Jacob Keller (6):
  ixgbe: check Core Clock Disable bit
  ixgbe: fix ixgbe_stop_mac_link_on_d3_82599 to check mng correctly
  ixgbe: fix ixgbe_setup_mac_link_82599 autoc variables
  ixgbe: remove unused media type
  ixgbe: use ixgbe_read_pci_cfg_word
  ixgbe: clean up ixgbe_atr_compute_perfect_hash_82599

Joe Perches (5):
  e100: Convert uses of __constant_<foo> to <foo>
  igb: Convert uses of __constant_<foo> to <foo>
  igbvf: Convert uses of __constant_<foo> to <foo>
  ixgbe: Convert uses of __constant_<foo> to <foo>
  ixgbevf: Convert uses of __constant_<foo> to <foo>

Stefan Assmann (1):
  igb: enable VLAN stripping for VMs with i350

 drivers/net/ethernet/intel/e100.c                 |   4 +-
 drivers/net/ethernet/intel/igb/e1000_82575.h      |   4 +
 drivers/net/ethernet/intel/igb/e1000_regs.h       |   1 +
 drivers/net/ethernet/intel/igb/igb_main.c         |  19 ++-
 drivers/net/ethernet/intel/igbvf/netdev.c         |   4 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c    |   1 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c    | 170 +++++-----------------
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.c   |  24 +--
 drivers/net/ethernet/intel/ixgbe/ixgbe_common.h   |   1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c     |   8 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c     |  68 +++++----
 drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h      |   4 -
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h     |   6 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c     |   1 -
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   4 +-
 15 files changed, 113 insertions(+), 206 deletions(-)

-- 
1.8.3.1

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-03-09  0:10   ` David Miller
@ 2014-03-09  1:12     ` Jeff Kirsher
  0 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2014-03-09  1:12 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

On Sat, 2014-03-08 at 19:10 -0500, David Miller wrote:
> From: David Miller <davem@davemloft.net>
> Date: Sat, 08 Mar 2014 18:50:08 -0500 (EST)
> 
> > From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > Date: Sat,  8 Mar 2014 01:25:26 -0800
> > 
> >> This series contains updates to e1000e, ixgbevf and igb.
> >  ...
> >>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> master
> > 
> > Pulled, thanks a lot Jeff, and again welcome back.
> 
> Jeff, please get this new warning fixed, thanks:
> 
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function
> ‘i40e_del_fdir_entry’:
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c:1441:18: warning:
> unused variable ‘pf’ [-Wunused-variable]
>   struct i40e_pf *pf = vsi->back;

Yeah, I noticed that as well.  I have a patch in my queue already to
resolve that, should be in my next pull request.  Thanks Dave!

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-03-08 23:50 ` David Miller
@ 2014-03-09  0:10   ` David Miller
  2014-03-09  1:12     ` Jeff Kirsher
  0 siblings, 1 reply; 65+ messages in thread
From: David Miller @ 2014-03-09  0:10 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: David Miller <davem@davemloft.net>
Date: Sat, 08 Mar 2014 18:50:08 -0500 (EST)

> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Sat,  8 Mar 2014 01:25:26 -0800
> 
>> This series contains updates to e1000e, ixgbevf and igb.
>  ...
>>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
> 
> Pulled, thanks a lot Jeff, and again welcome back.

Jeff, please get this new warning fixed, thanks:

drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function ‘i40e_del_fdir_entry’:
drivers/net/ethernet/intel/i40e/i40e_ethtool.c:1441:18: warning: unused variable ‘pf’ [-Wunused-variable]
  struct i40e_pf *pf = vsi->back;
                  ^

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-03-08  9:25 Jeff Kirsher
@ 2014-03-08 23:50 ` David Miller
  2014-03-09  0:10   ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: David Miller @ 2014-03-08 23:50 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat,  8 Mar 2014 01:25:26 -0800

> This series contains updates to e1000e, ixgbevf and igb.
 ...
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks a lot Jeff, and again welcome back.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-03-08  9:25 Jeff Kirsher
  2014-03-08 23:50 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-03-08  9:25 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to e1000e, ixgbevf and igb.

Majority of this series contains fixes and cleanups to e1000e,
most notably are:

Todd provides a fix to PTP in e1000e which adds a lock in e1000e_phc_adjfreq
to prevent concurrent changes to TIMINCA and SYSTIMH/L.  Then provides an
igb fix to use ARRAY_SIZE for array size calculation.

David provides the remaining e1000e which contain:
 - cleanup of pointer references that are no longer used
 - fix an issue on systems with Management Engine enabled with the
   ethernet cable unplugged
 - fix an issue on 82579 where enabling EEE LPI sooner than one second
   after link up causes link issues on some switches
 - refactor the power management flows to prevent the suspend path from
   being executed twice when hibernating
 - refactor the runtime power management to fix interfering with the
   functionality of Energy Efficient Ethernet when enabled and to fix
   the device from repeatedly flip between suspend and resume with the
   interface administratively downed
 - enable the feature PHY Ultra Low Power Mode which is a power saving
   feature that reduces the power consumption of the PHY when a cable is
   not connected
 - fix the ethtool offline tests for 82579 parts
 - fix SHRA register access for 82579 parts which was introduced by
   previous commit c3a0dce35af0 "e1000e: fix overrun of PHY RAR array"

Florian provides a fix for ixgbevf where skb->pkt_type was being checked
like a bitmask, but it is not a bitmask.

Fix an issue reported by Stephen Hemminger where there was a warning
about code defined but never used if IGB_HWMON is not defined.

The following are changes since commit 37147652cfaa20a87ead9bb04aec1834b40c5c97:
  6lowpan: reassembly: fix return of init function
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

David Ertman (11):
  e1000e: Cleanup unecessary references
  e1000e: Resolve issues with Management Engine (ME) briefly blocking
    PHY resets
  e1000e: Fix 82579 sets LPI too early.
  e1000e: Cleanup - Update GPL header and Copyright
  e1000e: Add missing branding strings in ich8lan.c
  e1000e: Refactor PM flows
  e1000e Refactor of Runtime Power Management
  e1000e: Feature Enable PHY Ultra Low Power Mode (ULP)
  e1000e: Fix not generating an error on invalid load parameter
  e1000e: Fix ethtool offline tests for 82579 parts
  e1000e: Fix SHRA register access for 82579

Florian Fainelli (1):
  ixgbevf: fix skb->pkt_type checks

Jeff Kirsher (1):
  igb: fix warning if !CONFIG_IGB_HWMON

Todd Fujinaka (2):
  e1000e: PTP lock in e1000e_phc_adjustfreq
  igb: fix array size calculation

 drivers/net/ethernet/intel/e1000e/80003es2lan.c   |  47 +--
 drivers/net/ethernet/intel/e1000e/80003es2lan.h   |  47 +--
 drivers/net/ethernet/intel/e1000e/82571.c         |  47 +--
 drivers/net/ethernet/intel/e1000e/82571.h         |  47 +--
 drivers/net/ethernet/intel/e1000e/Makefile        |   7 +-
 drivers/net/ethernet/intel/e1000e/defines.h       |  55 ++-
 drivers/net/ethernet/intel/e1000e/e1000.h         |  50 ++-
 drivers/net/ethernet/intel/e1000e/ethtool.c       |  63 ++--
 drivers/net/ethernet/intel/e1000e/hw.h            |  55 +--
 drivers/net/ethernet/intel/e1000e/ich8lan.c       | 427 ++++++++++++++++++----
 drivers/net/ethernet/intel/e1000e/ich8lan.h       |  72 ++--
 drivers/net/ethernet/intel/e1000e/mac.c           |  47 +--
 drivers/net/ethernet/intel/e1000e/mac.h           |  47 +--
 drivers/net/ethernet/intel/e1000e/manage.c        |  47 +--
 drivers/net/ethernet/intel/e1000e/manage.h        |  47 +--
 drivers/net/ethernet/intel/e1000e/netdev.c        | 286 +++++++++------
 drivers/net/ethernet/intel/e1000e/nvm.c           |  47 +--
 drivers/net/ethernet/intel/e1000e/nvm.h           |  47 +--
 drivers/net/ethernet/intel/e1000e/param.c         |  53 ++-
 drivers/net/ethernet/intel/e1000e/phy.c           |  47 +--
 drivers/net/ethernet/intel/e1000e/phy.h           |  47 +--
 drivers/net/ethernet/intel/e1000e/ptp.c           |  52 ++-
 drivers/net/ethernet/intel/e1000e/regs.h          |  48 ++-
 drivers/net/ethernet/intel/igb/e1000_82575.c      |   6 +-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   3 +-
 25 files changed, 1003 insertions(+), 738 deletions(-)

-- 
1.8.3.1

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu,  9 Jan 2014 04:52:09 -0800

> This series contains updates to i40e only.
 ...
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-01-09 12:52 Jeff Kirsher
  2014-01-09 20:13 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-09 12:52 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Anjali provides a fix where interrupts were not being re-enabled on ICR0
even though they were auto masked by hardware.  Then provides a fix to
cleanup RSS initialization because it was doing some extra work, so
remove the extra work and any bugs it created when managing number of
queues.  Since hardware requires a full packet template to be pointed to
when adding hardware flow filters, add the template and use it for
programming filters.

Jesse provides a fix to replace the use of driver specific defines with
kernel ETH_ALEN defines.  Then disables packet split because with the
use of GRO, we do not need the extra bus overhead.  Fixes spelling
error in code comment.

Kamil provides a fix for the driver where the hardware expects the MAC
address in a very specific format and the driver was filing the data
incorrectly.

Mitch provides a fix to resolve a panic on reset by adding checks to
VSI->rx_rings.  Then shortens alloc_rx_buff_failed and
alloc_rx_page_failed variables since both part of an RX specific
structure so just remove the _rx part of the name.  Then fixes
badly formatted lines, long lines and mis-formatted lines.

Shannon provides a fix to call AQ to release any reservation held by this
PF on the NVM resource lock on startup, in order to clear anything that
might have been left over from a previous run.  Then removes interrupt on
AQ error since nearly everything we do is synchronous, using the
interrupt-on-error bit is unnecessary and causing unneeded interrupts.
Adds code to handle the ability to send messages among the physical
function interfaces by the admin queue.

Catherine sets the MFP flag earlier in software init and uses that flag
to decide if other hardware work-arounds are required which turns
off flow director in MFP mode.

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

Anjali Singhai Jain (2):
  i40e: Re-enable interrupt on ICR0
  i40e: Cleanup reconfig rss path

Catherine Sullivan (1):
  i40e: Turn flow director off in MFP mode

Greg Rose (2):
  i40e: Fix GPL header
  i40e: add a comment on barrier and fix panic on reset

Jesse Brandeburg (4):
  i40e: use kernel specific defines
  i40e: disable packet split
  i40e: fix spelling errors
  i40e: Add a dummy packet template

Kamil Krawczyk (1):
  i40e: Fix MAC format in Write MAC address AQ cmd

Mitch Williams (2):
  i40e: shorten wordy fields
  i40e: trivial: formatting and checkpatch fixes

Shannon Nelson (3):
  i40e: release NVM resource reservation on startup
  i40e: remove interrupt on AQ error
  i40e: accept pf to pf adminq messages

 drivers/net/ethernet/intel/i40e/Makefile           |  7 +--
 drivers/net/ethernet/intel/i40e/i40e.h             |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      | 12 ++--
 drivers/net/ethernet/intel/i40e/i40e_adminq.h      |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_alloc.h       |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_common.c      | 14 +++--
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 13 ++---
 drivers/net/ethernet/intel/i40e/i40e_diag.c        |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_diag.h        |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 33 ++++++++---
 drivers/net/ethernet/intel/i40e/i40e_hmc.c         |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_hmc.h         |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c     |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h     |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 68 +++++++++++-----------
 drivers/net/ethernet/intel/i40e/i40e_nvm.c         |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_osdep.h       |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_register.h    |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_status.h      |  7 +--
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        | 44 +++++++-------
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        | 11 ++--
 drivers/net/ethernet/intel/i40e/i40e_type.h        | 15 ++---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl.h    | 11 ++--
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 ++--
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  7 +--
 27 files changed, 176 insertions(+), 174 deletions(-)

-- 
1.8.3.1

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-01-07  9:32 Jeff Kirsher
  0 siblings, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-07  9:32 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Anjali adds more functionality to debugfs to assist development and
testing of admin queue commands.

Greg makes sure broadcast promiscuous is disabled by default, otherwise
VLAN tagged packets out of the assigned VLAN domain are received.  Also
provides a fix when the 8021q driver is loaded, so that VLAN 0 tagged
packets are accepted so that upper layers can interpret the priority
bits. Then provides a fix to let the VF to request the PF to set its
already assigned MAC address without generating an error.  Greg also
adds helper functions to enable or disable internal switch loopback
when VFs are created or destroyed via the sysfs interface.

Shannon provides most of the changes, where he adds code to ensure
that the hardware waits to make sure that the firmware is ready as well
after reset.  Also updates the code to use the new features in the
firmware.  Provides a fix while in MFP mode where resources are
reduced, so use a smaller range of test registers than when in SFP mode.
Moves the PF ID initialization code to earlier in the driver
initialization function since a few operations need the information
before the first PF reset is called.  Shannon adds a check for MAC
type before reading anything from the registers to ensure we dealing
with the correct MAC type.  Then reworks Shadow RAM read word/buffer
functions as to not block whole NVM resources for SR read operations.

Mitch lastly provides a fix to correctly setup ARQ descriptors in
the cleanup code.

Catherine bumps the driver version due to all the recent changes.

The following are changes since commit 83111e7fe85f2dc8b61e463c71b971f4998d8e53:
  netfilter: Fix build failure in nfnetlink_queue_core.c.
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (1):
  i40e: Expose AQ debugfs hooks

Catherine Sullivan (1):
  i40e: Bump version

Greg Rose (4):
  i40e: Do not enable broadcast promiscuous by default
  i40e: Stop accepting any VLAN tag on VLAN 0 filter set
  i40e: Allow VF to set already assigned MAC address
  i40e: Enable/Disable PF switch LB on SR-IOV configure changes

Kamil Krawczyk (1):
  i40e: remove redundant AQ enable

Mitch Williams (1):
  i40e: correctly setup ARQ descriptors

Shannon Nelson (7):
  i40e: Add code to wait for FW to complete in reset path
  i40e: update firmware api to 1.1
  i40e: Reduce range of interrupt reg in reg test
  i40e: move PF ID init from PF reset to SC init
  i40e: check MAC type before any REG access
  i40e: rework shadow ram read functions
  i40e: whitespace paren and comment tweaks

 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  27 ++---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 126 +++++++++++++++------
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  51 ++++++---
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 112 ++++++++++++++++++
 drivers/net/ethernet/intel/i40e/i40e_diag.c        |   6 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  29 ++---
 drivers/net/ethernet/intel/i40e/i40e_nvm.c         |  67 +++--------
 drivers/net/ethernet/intel/i40e/i40e_register.h    |  22 ++++
 drivers/net/ethernet/intel/i40e/i40e_type.h        |  11 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 100 +++++++++++++---
 10 files changed, 395 insertions(+), 156 deletions(-)

-- 
1.8.3.1

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-01-06 18:26 ` David Miller
  2014-01-06 18:49   ` Jeff Kirsher
@ 2014-01-06 20:14   ` Jeff Kirsher
  1 sibling, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-06 20:14 UTC (permalink / raw)
  To: David Miller, Sergei Shtylyov; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 500 bytes --]

On Mon, 2014-01-06 at 13:26 -0500, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Mon,  6 Jan 2014 04:30:21 -0800
> 
> > This series contains updates to i40e only.
>  ...
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
> 
> Pulled, please make sure the coding style feedback does actually
> get addressed.
> 
> Thanks Jeff.

Just to be clear, this coding style will be fixed in patch 13 of the
next series I am sending out.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-01-06 18:26 ` David Miller
@ 2014-01-06 18:49   ` Jeff Kirsher
  2014-01-06 20:14   ` Jeff Kirsher
  1 sibling, 0 replies; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-06 18:49 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

On Mon, 2014-01-06 at 13:26 -0500, David Miller wrote:
> From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Date: Mon,  6 Jan 2014 04:30:21 -0800
> 
> > This series contains updates to i40e only.
>  ...
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
> 
> Pulled, please make sure the coding style feedback does actually
> get addressed.
> 
> Thanks Jeff.

Yes, I will make sure it is in one of the upcoming series.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-01-06 12:30 Jeff Kirsher
@ 2014-01-06 18:26 ` David Miller
  2014-01-06 18:49   ` Jeff Kirsher
  2014-01-06 20:14   ` Jeff Kirsher
  0 siblings, 2 replies; 65+ messages in thread
From: David Miller @ 2014-01-06 18:26 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon,  6 Jan 2014 04:30:21 -0800

> This series contains updates to i40e only.
 ...
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, please make sure the coding style feedback does actually
get addressed.

Thanks Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-01-06 12:30 Jeff Kirsher
  2014-01-06 18:26 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-06 12:30 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Majority of this series contains patches from Greg and Mitch to fix
up or add functionality to the PF/VF driver interactions.  Notably,
a fix for SR-IOV VF port VLAN which resolved the problem of port VLAN
configurations not being persistent across VF driver loads and unloads
and enable/disable of the feature.  Also do not enable the default port
on the VEB, which is designed only to bridge the PF to an Open vSwitch
or bridge.  Another fix to resolve a possible memory corruption
condition where ARQ messages are written to random memory locations.
Fix a problem where the 'ip link show' command would display stale
link address information after the link address was set via the 'ip
link set' command.

Anjali provides several patches, one which saves information that can
be used while cleaning the Tx ring and useful in detecting Tx hangs.
Then provides a fixes to the admin queue shutdown function to ensure
we are shutting down the queue in the shutdown path and ensure ASQ is
alive before issuing the admin queue command.

Shannon provides a fix for get/update vsi params where the incorrect
struct was being used.

The following are changes since commit b912b2f8fc71df4c3ffa7a9fe2c2227e8bcdaa07:
  net/mlx4_core: Warn if device doesn't have enough PCI bandwidth
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (4):
  i40e: Record dma buffer info for dummy packets
  i40e: Admin queue shutdown fixes
  i40e: check asq alive before notify
  i40e: Do not allow AQ calls from ndo-ops

Greg Rose (4):
  i40e: Fix SR-IOV VF port VLAN
  i40e: Do not enable default port on the VEB
  i40e: Fix VF driver MAC address configuration
  i40e: Hide the Port VLAN VLAN ID

Jesse Brandeburg (1):
  i40e: fix whitespace

Mitch Williams (5):
  i40e: avoid unnecessary register read
  i40e: use struct assign instead of memcpy
  i40e: don't allocate zero size
  i40e: acknowledge VFLR when disabling SR-IOV
  i40e: support VFs on PFs other than 0

Shannon Nelson (1):
  i40e: use correct struct for get and update vsi params

 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |   3 +
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  75 ++++++++------
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |   1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  45 ++++----
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |   5 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |   9 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 114 ++++++++++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |   2 +
 8 files changed, 169 insertions(+), 85 deletions(-)

-- 
1.8.3.1

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2014-01-05 10:46 Jeff Kirsher
@ 2014-01-06  1:31 ` David Miller
  0 siblings, 0 replies; 65+ messages in thread
From: David Miller @ 2014-01-06  1:31 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sun,  5 Jan 2014 02:46:52 -0800

> This series contains updates to i40e only.
 ...
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Looks fine, pulled, thanks Jeff.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2014-01-05 10:46 Jeff Kirsher
  2014-01-06  1:31 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2014-01-05 10:46 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Anjali provides two cleanups to remove unnecessary code and a fix
to resolve debugfs dumping only half the NVM.  Then provides a fix
to ethtool NVM reads where shadow RAM was used instead of actual
NVM reads.

Jesse provides a couple of fixes, one removes custom i40e functions
which duplicate existing kernel functionality.  Second fixes constant
cast issues by replacing __constant_htons with htons.

Mitch provides a couple of fixes for the VF interfaces in i40e.  First
provides a fix to guard against VF message races with can cause a panic.
Second fix reinitializes the buffer size each time we clean the ARQ,
because subsequent messages can be truncated. Lastly adds functionality
to enable/disable ICR 0 dynamically.

Vasu adds a simple guard against multiple includes of the i40e_txrx.h
file.

Shannon provides a couple of fixes, first fix swaps a couple of lines
around in the error handling if the allocation for the VSI array fails.
Second fixes an issue where we try to free the q_vector that has not
been setup which can panic the kernel.

David provides a patch to save off the point to memory and the length
of 2 structs used in the admin queue in order to store all info about
allocated kernel memory.

Neerav fixes ring allocation where allocation and clearing of rings
for a VSI should be using the alloc_queue_pairs and not num_queue_pairs.
Then removes the unused define for multi-queue enabled.

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

Anjali Singhai Jain (4):
  i40e: Dump the whole NVM, not half
  i40e: Change the ethtool NVM read method to use AQ
  i40e: Remove unnecessary prototypes
  i40e: remove un-necessary io-write

David Cassard (1):
  i40e: keep allocated memory in structs

Jesse Brandeburg (2):
  i40e: fix mac address checking
  i40e: fix constant cast issues

Mitch Williams (3):
  i40e: guard against vf message races
  i40e: use functions to enable and disable icr 0
  i40e: reinit buffer size each time

Neerav Parikh (2):
  i40e: Fix ring allocation
  i40e: I40E_FLAG_MQ_ENABLED is not used

Shannon Nelson (2):
  i40e: fix error handling when alloc of vsi array fails
  i40e: catch unset q_vector

Vasu Dev (1):
  i40e: add header file flag _I40E_TXRX_H_

 drivers/net/ethernet/intel/i40e/i40e.h             |  40 +++-----
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      | 103 +++++++++------------
 drivers/net/ethernet/intel/i40e/i40e_adminq.h      |  13 +--
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  27 ------
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  68 +++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  47 +++++-----
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |   1 -
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        |   4 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  28 +++---
 11 files changed, 162 insertions(+), 185 deletions(-)

-- 
1.8.3.1

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 19 Dec 2013 11:20:36 -0800

> Disregard this pull request.  I overlooked a patch that needs to either
> precede this series or get added to the series for VXLAN.
> 
> I will be sending out a v2 with the necessary patch added.

Ok.

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver Updates
  2013-12-19  6:34 Jeff Kirsher
@ 2013-12-19 19:20 ` Jeff Kirsher
  2013-12-19 19:47   ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-12-19 19:20 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 1897 bytes --]

On Wed, 2013-12-18 at 22:34 -0800, Jeff Kirsher wrote:
> This series contains updates to i40e only.
> 
> Anjali provides a patch to prevent messages from stray HMC events,
> except
> at interrupt message level, and refactors the HMC error handling.
> 
> Catherine adds routines in probe to populate/check PCI bus speed and
> width,
> then verify we are in a 8GT/s x8 PCIe slot and warn when we are not.
> 
> Shannon adds Wake-on-LAN support for i40e, fixes curly brace use as
> well as
> return type for i40e_vsi_clear_rings().  Lastly implements the
> set_settings
> and set_pauseparam ethtool functionality.
> 
> Joseph implements receive offload for VXLAN for i40e, where the
> hardware
> supports checksum offload/verification of the inner/outer header.
> 
> Mitch provides the bulk of the changes, where he refactors the VF
> reset
> code so that it works on real hardware.  Then does code cleanup by
> calling existing functions to enable and disable queues for VFs and
> remove unused functions.  Removes a unnecessary log messages that are
> seen at every VF reset, for example complaining about disabling queues
> that are already disabled.  Fixes an error return when the VF asks to
> add an invalid MAC address and if the VF sends a bad message, make it
> more informative about what is actually going on.
> 
> Jesse refactors the LED function to flash LED lights correctly.
> 
> The following are changes since commit
> 020e867c755610fa5a2a08a69707e636cf368b55:
>   isdn: use strlcpy() instead strcpy()
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> master

Dave-
Disregard this pull request.  I overlooked a patch that needs to either
precede this series or get added to the series for VXLAN.

I will be sending out a v2 with the necessary patch added.

Cheers,
Jeff

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* [net-next 00/15][pull request] Intel Wired LAN Driver Updates
@ 2013-12-19  6:34 Jeff Kirsher
  2013-12-19 19:20 ` Jeff Kirsher
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2013-12-19  6:34 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

This series contains updates to i40e only.

Anjali provides a patch to prevent messages from stray HMC events, except
at interrupt message level, and refactors the HMC error handling.

Catherine adds routines in probe to populate/check PCI bus speed and width,
then verify we are in a 8GT/s x8 PCIe slot and warn when we are not.

Shannon adds Wake-on-LAN support for i40e, fixes curly brace use as well as
return type for i40e_vsi_clear_rings().  Lastly implements the set_settings
and set_pauseparam ethtool functionality.

Joseph implements receive offload for VXLAN for i40e, where the hardware
supports checksum offload/verification of the inner/outer header.

Mitch provides the bulk of the changes, where he refactors the VF reset
code so that it works on real hardware.  Then does code cleanup by
calling existing functions to enable and disable queues for VFs and
remove unused functions.  Removes a unnecessary log messages that are
seen at every VF reset, for example complaining about disabling queues
that are already disabled.  Fixes an error return when the VF asks to
add an invalid MAC address and if the VF sends a bad message, make it
more informative about what is actually going on.

Jesse refactors the LED function to flash LED lights correctly.

The following are changes since commit 020e867c755610fa5a2a08a69707e636cf368b55:
  isdn: use strlcpy() instead strcpy()
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (1):
  i40e: Suppress HMC error to Interrupt message level

Catherine Sullivan (1):
  i40e: Populate and check pci bus speed and width

Jesse Brandeburg (1):
  i40e: update led set args

Joseph Gasparakis (1):
  i40e: Rx checksum offload for VXLAN

Mitch Williams (8):
  i40e: move i40e_reset_vf
  i40e: refactor VF reset flow
  i40e: remove redundant code
  i40e: remove chatty log messages
  i40e: fix error return
  i40e: be more informative
  i40e: make a define from a large constant
  i40e: report VF MAC addresses correctly

Shannon Nelson (3):
  i40e: add wake-on-lan support
  i40e: fix curly brace use and return type
  i40e: add set settings and pauseparam

 drivers/net/ethernet/intel/i40e/i40e.h             |   3 +
 drivers/net/ethernet/intel/i40e/i40e_common.c      | 136 ++++-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 145 +++++-
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 105 ++--
 drivers/net/ethernet/intel/i40e/i40e_prototype.h   |   3 +-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        |  56 ++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.h        |  20 +
 drivers/net/ethernet/intel/i40e/i40e_type.h        |  61 ++-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 559 ++++++---------------
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |   2 +-
 10 files changed, 572 insertions(+), 518 deletions(-)

-- 
1.8.3.1

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

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

This series contains updates to i40e only (again).

Jesse provides a fix for when tx_rings structure is NULL and we do not want
to panic. Then refactors the flow control set up and disables L2 flow control
by default.  Provides some trivial fixes as well as prevent compiler warnings.
Then to align to similar behaviour in ixgbe, use the total number of CPUs in
the system to suggest the number of transmit and receive queue pairs.

Shannon provides a i40e ethtool fix to get some more reasonable information
reports back out to the ethtool.  In addition, fixes PF reset after offline
test, where it reorders the test to put the register test last as it is the
only one that needs a reset, and we wait to trigger the reset until after we
clear the testing bit.  Lastly provides basic support for handling suspend
and resume for now, later on Wake-On-LAN support will be added.

Elizabeth Kappler adds netdev ops helper function.

Anjali provides changes to tell the stack about our actual number of queues
in order for RFS/RPS/XFS to work correctly.  Then provides several patches to
implement dynamically changing the queue count for the main VSI.  Adds
basic support for get/set channels for RSS so that the number of receive and
transmit queue pair can be changed via ethtool.  Cleans up the use of
rtnl_lock in the reset patch since it runs from a work time.

Neerav Parikh cleans up the VF interface to remove FCoE code as this
feature will not be supported on VF interfaces.

The following are changes since commit c45f812f0280c13f1b7992be5e0de512312a9e8f:
  8390 : Replace ei_debug with msg_enable/NETIF_MSG_* feature
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (6):
  i40e: Tell the stack about our actual number of queues
  i40e: reinit flow for the main VSI
  i40e: function to reconfigure RSS queues and rebuild
  i40e: debugfs command to change RSS queue count
  i40e: Add basic support for get/set channels for RSS
  i40e: rtnl_lock in reset path fixes

Elizabeth Kappler (1):
  i40e: add netdev ops helper function

Jesse Brandeburg (5):
  i40e: fix null dereference
  i40e: fix up some of the ethtool connection reporting
  i40e: init flow control settings to disabled
  i40e: trivial fixes
  i40e: use same number of queues as CPUs

Neerav Parikh (1):
  i40e: Remove FCoE in i40e_virtchnl_pf.c code

Shannon Nelson (2):
  i40e: fix pf reset after offline test
  i40e: support for suspend and resume

 drivers/net/ethernet/intel/i40e/i40e.h             |   6 +-
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |  22 +-
 drivers/net/ethernet/intel/i40e/i40e_diag.c        |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 146 +++++++-
 drivers/net/ethernet/intel/i40e/i40e_hmc.c         |   2 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        | 380 ++++++++++++++++++---
 drivers/net/ethernet/intel/i40e/i40e_type.h        |   4 +
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  29 +-
 8 files changed, 499 insertions(+), 92 deletions(-)

-- 
1.8.3.1

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri,  6 Dec 2013 00:06:13 -0800

> This series contains updates to i40e only.
> 
> Christopher Pau provides a patch to set pf_id based on device and
> function numbers since NICs with ARI enabled can have function
> numbers larger than 8.
> 
> Anjali provides 3 i40e patches to update hardware defines to keep
> in sync with hardware updates.
> 
> Shannon provides the majority of i40e patches, with 7.  First patch
> clears the admin queue head and tail registers during admin queue
> shutdown. Then simplifies the admin queue head-tail-len setups to
> use more virtual registers.  Provides several patches to cleanup
> and fix driver load and reset procedures to make more robust.  Lastly,
> provides an ethtool test for interrupts using the software interrupt.
> 
> Mitch provides some i40e patches which fixes up VF code in the PF
> driver, specifically the number of vectors per VF are reported by the
> hardware does not include vector 0, so we need to account for this
> when checking.  In addition, cleans up debugging messages.
> 
> Kamil provides an i40e patch to fix the diagnostics test by restricting
> the diagnostic test length.

Pulled, thanks a lot Jeff.

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

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

This series contains updates to i40e only.

Christopher Pau provides a patch to set pf_id based on device and
function numbers since NICs with ARI enabled can have function
numbers larger than 8.

Anjali provides 3 i40e patches to update hardware defines to keep
in sync with hardware updates.

Shannon provides the majority of i40e patches, with 7.  First patch
clears the admin queue head and tail registers during admin queue
shutdown. Then simplifies the admin queue head-tail-len setups to
use more virtual registers.  Provides several patches to cleanup
and fix driver load and reset procedures to make more robust.  Lastly,
provides an ethtool test for interrupts using the software interrupt.

Mitch provides some i40e patches which fixes up VF code in the PF
driver, specifically the number of vectors per VF are reported by the
hardware does not include vector 0, so we need to account for this
when checking.  In addition, cleans up debugging messages.

Kamil provides an i40e patch to fix the diagnostics test by restricting
the diagnostic test length.

The following are changes since commit d70f2cf520cf8c86c6b467fc5dcea524ec51dc2f:
  macvlan: Support creating macvtaps from macvlans
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Anjali Singhai Jain (3):
  i40e: sync header files with hardware
  i40e: register file updates
  i40e: firmware version fields offsets update

Christopher Pau (1):
  i40e: set pf_id based on device and function numbers

Kamil Krawczyk (1):
  i40e: restrict diag test length

Mitch Williams (3):
  i40e: allow one more vector for VFs
  i40e: properly add VF MAC addresses
  i40e: fix debugging messages

Shannon Nelson (7):
  i40e: clear AQ head and tail registers
  i40e: simplify aq head-tail-len setups
  i40e: select reset counters correctly
  i40e: retry call on timeout
  i40e: default debug mask setting
  i40e: add interrupt test
  i40e: add support for triggering EMPR

 drivers/net/ethernet/intel/i40e/i40e.h             |  19 +--
 drivers/net/ethernet/intel/i40e/i40e_adminq.c      |  66 +++++-----
 drivers/net/ethernet/intel/i40e/i40e_adminq.h      |   1 +
 drivers/net/ethernet/intel/i40e/i40e_common.c      |   6 +-
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     |   4 +
 drivers/net/ethernet/intel/i40e/i40e_diag.c        |   8 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  10 +-
 drivers/net/ethernet/intel/i40e/i40e_lan_hmc.h     |   4 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  37 +++++-
 drivers/net/ethernet/intel/i40e/i40e_register.h    | 134 +++++++--------------
 drivers/net/ethernet/intel/i40e/i40e_type.h        |  11 +-
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |   8 +-
 12 files changed, 155 insertions(+), 153 deletions(-)

-- 
1.8.3.1

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

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

This series contains updates to igb and e1000e.

Akeem provides 3 igb patches, the first resets the link when EEE is enabled
or disabled if the link is up.  His second patch changes a register read
which normally stores of the read value to "just-read" so that hardware
can accurately latch the register read.  Lastly, he adds rcu_lock to avoid
a possible race condition with igb_update_stats function.

Mitch provides a fix for SR-IOV, where MSI-X interrupts are required, so
make sure that MSI-X is enabled before allowing the user to turn on SR-IOV.

Alex's igb patch make it so that we limit the lower bound for max_frame_size
to the size of a standard Ethernet frame.  This allows for feature parity
with other Intel based drivers such as ixgbe.

Carolyn adds a SKU for a flashless i210 device and a fix for get_fw_version()
so that it works for all parts for igb.  In addition, she has 2 igb patches
to refactor NVM code to accommodate devices with no flash.  Lastly, she
adds code to check for the failure of pci_disable_link_state() to attempt
to work around a problem found with some systems.

Laura provides the remaining 2 igb patches.  One removing the hard-coded
value for the size of the RETA indirection table, and creates a macro instead
for the RETA indirection table.  The second adds the ethtool callbacks
necessary to change the RETA indirection table from userspace.

Bruce fixes a whitespace issue in a recent commit and resolves a jiffies
comparison warning by using time_after().

Li provides a fix for e1000e to avoid a kernel crash on shutdown by adding
one more check in e1000e_shutdown().  This is due to e1000e_shutdown()
trying to clear correctable errors on the upstream P2P bridge, when under
some cases we do not have the upstream P2P bridge.

The following are changes since commit 84ce22df92f5cf9ecb76d53f4bf5f6d504684540:
  net: davinci_mdio: use platform_{get,set}_drvdata()
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):
  igb: Update MTU so that it is always at least a standard frame size

Bruce Allan (2):
  e1000e: cleanup whitespace in recent commit
  e1000e: resolve checkpatch JIFFIES_COMPARISON warning

Carolyn Wyborny (5):
  igb: Refactor of init_nvm_params
  igb: Refactor NVM read functions to accommodate devices with no flash
  igb: Add device support for flashless SKU of i210 device
  igb: Fix get_fw_version function for all parts
  e1000e: Add code to check for failure of pci_disable_link_state call

Laura Mihaela Vasilescu (2):
  igb: Add macro for size of RETA indirection table
  igb: Expose RSS indirection table for ethtool

Li Zhang (1):
  e1000e: Avoid kernel crash during shutdown

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

 drivers/net/ethernet/intel/e1000e/ethtool.c    |   2 +-
 drivers/net/ethernet/intel/e1000e/hw.h         |   3 +-
 drivers/net/ethernet/intel/e1000e/netdev.c     |  92 ++++++++++-----
 drivers/net/ethernet/intel/igb/e1000_82575.c   | 117 ++++++++-----------
 drivers/net/ethernet/intel/igb/e1000_defines.h |  34 ++++--
 drivers/net/ethernet/intel/igb/e1000_hw.h      |   3 +
 drivers/net/ethernet/intel/igb/e1000_i210.c    | 155 ++++++++++++++++---------
 drivers/net/ethernet/intel/igb/e1000_i210.h    |   5 +-
 drivers/net/ethernet/intel/igb/e1000_nvm.c     |  80 +++++++++----
 drivers/net/ethernet/intel/igb/e1000_nvm.h     |   1 +
 drivers/net/ethernet/intel/igb/igb.h           |   5 +
 drivers/net/ethernet/intel/igb/igb_ethtool.c   | 106 ++++++++++++++++-
 drivers/net/ethernet/intel/igb/igb_main.c      | 105 ++++++++++-------
 drivers/net/ethernet/intel/igb/igb_ptp.c       |   8 +-
 14 files changed, 476 insertions(+), 240 deletions(-)

-- 
1.8.3.1

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 18 Apr 2013 16:30:07 -0700

> This series contains updates to ixgbe and igb.
> 
> The ixgbe changes contains 2 patches from the community, one which is a
> fix from akepner to fix a issue where netif_running() in shutdown was
> not done under rtnl_lock.  The other community fix from Joe Perches
> cleans up #ifdef CONFIG_DEBUG_FS which is no longer necessary.  The
> last ixgbe patch, from Jacob Keller, adds support for WoL on 82559
> SFP+ LOM.
> 
> The remaining patches are against igb, 10 of which were previously
> submitted in a pull request where changes were requested.
> 
> The following igb patches:
>  igb: Support for 100base-fx SFP
>  igb: Support to read and export SFF-8472/8079 data
> are v2 based on feedback from Dan Carpenter and Ben Hutchings in
> the previous pull request.
> 
> The largest set of changes are in my patch to cleanup code comments
> and whitespace to align the igb driver with the networking style of
> code comments.  While cleaning up the code comments, fixed several
> other whitespace/checkpatch.pl code formatting issues.
> 
> Other notable igb patches are EEE capable devices query the PHY to
> determine what the link partner is advertising, added support for
> i354 devices and added support for spoofchk config.
> 
> The following are changes since commit c1cb0d3b569b1d21ada8666efb42dfd437617a09:
>   Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks a lot Jeff.

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

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

This series contains updates to ixgbe and igb.

The ixgbe changes contains 2 patches from the community, one which is a
fix from akepner to fix a issue where netif_running() in shutdown was
not done under rtnl_lock.  The other community fix from Joe Perches
cleans up #ifdef CONFIG_DEBUG_FS which is no longer necessary.  The
last ixgbe patch, from Jacob Keller, adds support for WoL on 82559
SFP+ LOM.

The remaining patches are against igb, 10 of which were previously
submitted in a pull request where changes were requested.

The following igb patches:
 igb: Support for 100base-fx SFP
 igb: Support to read and export SFF-8472/8079 data
are v2 based on feedback from Dan Carpenter and Ben Hutchings in
the previous pull request.

The largest set of changes are in my patch to cleanup code comments
and whitespace to align the igb driver with the networking style of
code comments.  While cleaning up the code comments, fixed several
other whitespace/checkpatch.pl code formatting issues.

Other notable igb patches are EEE capable devices query the PHY to
determine what the link partner is advertising, added support for
i354 devices and added support for spoofchk config.

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

Akeem G. Abodunrin (5):
  igb: Support for 100base-fx SFP
  igb: Support to read and export SFF-8472/8079 data
  igb: Implement support to power sfp cage and turn on I2C
  igb: random code and comments fix
  igb: Fix sparse warnings on function pointers

Alexander Duyck (3):
  igb: Mask off check of frag_off as we only want fragment offset
  igb: Pull adapter out of main path in igb_xmit_frame_ring
  igb: Use rx/tx_itr_setting when setting up initial value of itr

Carolyn Wyborny (1):
  igb: Add support for i354 devices

Jacob Keller (1):
  ixgbe: Add support for WoL on 82599 SFP+ LOM

Jeff Kirsher (1):
  igb: Fix code comments and whitespace

Joe Perches (1):
  ixgbe: Remove unnecessary #ifdef CONFIG_DEBUG_FS tests

Lior Levy (1):
  igb: add support for spoofchk config

Matthew Vick (1):
  igb: Enable EEE LP advertisement

akepner (1):
  ixgbe: in shutdown, do netif_running() under rtnl_lock

 drivers/net/ethernet/intel/igb/e1000_82575.c   |  252 +++--
 drivers/net/ethernet/intel/igb/e1000_82575.h   |    2 +
 drivers/net/ethernet/intel/igb/e1000_defines.h |   50 +-
 drivers/net/ethernet/intel/igb/e1000_hw.h      |   57 +-
 drivers/net/ethernet/intel/igb/e1000_i210.c    |   93 +-
 drivers/net/ethernet/intel/igb/e1000_i210.h    |    4 +
 drivers/net/ethernet/intel/igb/e1000_mac.c     |  124 +--
 drivers/net/ethernet/intel/igb/e1000_mac.h     |   17 +-
 drivers/net/ethernet/intel/igb/e1000_mbx.c     |   11 +-
 drivers/net/ethernet/intel/igb/e1000_mbx.h     |   52 +-
 drivers/net/ethernet/intel/igb/e1000_nvm.c     |   27 +-
 drivers/net/ethernet/intel/igb/e1000_phy.c     |  259 ++---
 drivers/net/ethernet/intel/igb/e1000_regs.h    |   53 +-
 drivers/net/ethernet/intel/igb/igb.h           |  133 +--
 drivers/net/ethernet/intel/igb/igb_ethtool.c   |  345 +++++--
 drivers/net/ethernet/intel/igb/igb_hwmon.c     |   29 +-
 drivers/net/ethernet/intel/igb/igb_main.c      | 1270 +++++++++++++-----------
 drivers/net/ethernet/intel/igb/igb_ptp.c       |   61 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe.h       |    5 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c  |   15 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h  |    1 +
 21 files changed, 1604 insertions(+), 1256 deletions(-)

-- 
1.7.11.7

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

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

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri,  8 Mar 2013 02:07:02 -0800

> This series contains updates to ixgbevf and e1000e.
> 
> Alex's ixgbevf patch is meant to address several race issues that become
> possible because next_to_watch could possibly be set to a value that shows
> that the descriptor is done when it is not.  In order to correct that we
> instead make next_to_watch a pointer that is set to NULL during cleanup,
> and set to the eop_desc after the descriptor rings have been written.
> 
> Stephen's ixgbevf patch makes the PCI id table a const and reformats the
> table to match what the ixgbe driver does.
> 
> The remaining 13 patches from Bruce are cleanup patches for e1000e to
> resolve checkpatch.pl warnings/errors, removing blank lines where
> necessary and fix code formatting.
> 
> The following are changes since commit 7f0e44ac9f7f12a2519bfed9ea4df3c1471bd8bb:
>   ipv6 flowlabel: add __rcu annotations
> 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] 65+ messages in thread

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

This series contains updates to ixgbevf and e1000e.

Alex's ixgbevf patch is meant to address several race issues that become
possible because next_to_watch could possibly be set to a value that shows
that the descriptor is done when it is not.  In order to correct that we
instead make next_to_watch a pointer that is set to NULL during cleanup,
and set to the eop_desc after the descriptor rings have been written.

Stephen's ixgbevf patch makes the PCI id table a const and reformats the
table to match what the ixgbe driver does.

The remaining 13 patches from Bruce are cleanup patches for e1000e to
resolve checkpatch.pl warnings/errors, removing blank lines where
necessary and fix code formatting.

The following are changes since commit 7f0e44ac9f7f12a2519bfed9ea4df3c1471bd8bb:
  ipv6 flowlabel: add __rcu annotations
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Alexander Duyck (1):
  ixgbevf: Make next_to_watch a pointer and adjust memory barriers to
    avoid races

Bruce Allan (13):
  e1000e: cleanup CODE_INDENT checkpatch errors
  e1000e: cleanup SPACING checkpatch errors and warnings
  e1000e: cleanup LONG_LINE checkpatch warnings
  e1000e: cleanup LEADING_SPACE checkpatch warnings
  e1000e: cleanup PARENTHESIS_ALIGNMENT checkpatch checks
  e1000e: cleanup SPACING checkpatch checks
  e1000e: cleanup (add/remove) blank lines where appropriate
  e1000e: cleanup unusually placed comments
  e1000e: cleanup formatting of static structs
  e1000e: cleanup unnecessary line breaks
  e1000e: cleanup USLEEP_RANGE checkpatch checks
  e1000e: cleanup format of struct e1000_opt_list struct
  e1000e: cleanup - move defines to appropriate header file

Stephen Hemminger (1):
  ixgbevf: use PCI_DEVICE_TABLE macro

 drivers/net/ethernet/intel/e1000e/80003es2lan.c   | 131 ++++++-----
 drivers/net/ethernet/intel/e1000e/82571.c         |  38 ++-
 drivers/net/ethernet/intel/e1000e/82571.h         |   2 +
 drivers/net/ethernet/intel/e1000e/defines.h       |  25 +-
 drivers/net/ethernet/intel/e1000e/e1000.h         |  18 +-
 drivers/net/ethernet/intel/e1000e/ethtool.c       | 177 +++++++-------
 drivers/net/ethernet/intel/e1000e/hw.h            |   4 +-
 drivers/net/ethernet/intel/e1000e/ich8lan.c       | 195 ++++++++--------
 drivers/net/ethernet/intel/e1000e/mac.c           |  10 +-
 drivers/net/ethernet/intel/e1000e/netdev.c        | 269 ++++++++++------------
 drivers/net/ethernet/intel/e1000e/nvm.c           |   2 +-
 drivers/net/ethernet/intel/e1000e/param.c         |  62 +++--
 drivers/net/ethernet/intel/e1000e/phy.c           | 130 +++++------
 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h      |   2 +-
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |  80 ++++---
 15 files changed, 574 insertions(+), 571 deletions(-)

-- 
1.7.11.7

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

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

This series contains updates to e1000e only.

The following are changes since commit 1def9238d4aa2146924994aa4b7dc861f03b9362:
  net_sched: more precise pkt_len computation
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Bruce Allan (15):
  e1000e: SerDes autoneg flow control
  e1000e: Acquire/release semaphore when writing each EEPROM page
  e1000e: Invalid Image CSUM bit changed for I217
  e1000e: helper functions for accessing EMI registers
  e1000e: 82577: workaround for link drop issue
  e1000e: fix enabling of EEE on 82579 and I217
  e1000e: unexpected "Reset adapter" message when cable pulled
  e1000e: add missing bailout on error
  e1000e: resolve checkpatch PREFER_PR_LEVEL warning
  e1000e: cleanup redundant statistics counter
  e1000e: cleanup unusual comment placement
  e1000e: cleanup unnecessary line wrap
  e1000e: cleanup magic number
  e1000e: cleanup code duplication
  e1000e: merge multiple conditional statements into one

 drivers/net/ethernet/intel/e1000e/defines.h |  10 +-
 drivers/net/ethernet/intel/e1000e/e1000.h   |   2 +-
 drivers/net/ethernet/intel/e1000e/ethtool.c |   1 -
 drivers/net/ethernet/intel/e1000e/hw.h      |   4 +
 drivers/net/ethernet/intel/e1000e/ich8lan.c | 213 +++++++++++++++++++++-------
 drivers/net/ethernet/intel/e1000e/mac.c     | 125 ++++++++++++++++
 drivers/net/ethernet/intel/e1000e/netdev.c  |  67 ++++-----
 drivers/net/ethernet/intel/e1000e/nvm.c     |  26 ++--
 drivers/net/ethernet/intel/e1000e/param.c   |   3 +-
 9 files changed, 340 insertions(+), 111 deletions(-)

-- 
1.7.11.7

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

* Re: [net-next 00/15][pull request] Intel Wired LAN Driver updates
  2012-02-13 21:47 [net-next 00/15][pull request] Intel Wired LAN Driver updates Jeff Kirsher
@ 2012-02-13 23:48 ` David Miller
  0 siblings, 0 replies; 65+ messages in thread
From: David Miller @ 2012-02-13 23:48 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 13 Feb 2012 13:47:35 -0800

> The following series contains updates to e1000e only.  All of the
> patches are cleanup of the e1000e driver.
> 
> The following are changes since commit fafdbf84d7eb2cd7aee435cc381a0796e1a5ccb0:
>   trivial: typo hnalder -> handler
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Pulled, thanks.

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

* [net-next 00/15][pull request] Intel Wired LAN Driver updates
@ 2012-02-13 21:47 Jeff Kirsher
  2012-02-13 23:48 ` David Miller
  0 siblings, 1 reply; 65+ messages in thread
From: Jeff Kirsher @ 2012-02-13 21:47 UTC (permalink / raw)
  To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann

The following series contains updates to e1000e only.  All of the
patches are cleanup of the e1000e driver.

The following are changes since commit fafdbf84d7eb2cd7aee435cc381a0796e1a5ccb0:
  trivial: typo hnalder -> handler
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master

Bruce Allan (15):
  e1000e: cleanup: use goto for common work needed by multiple exit
    points
  e1000e: cleanup: rename goto labels to be more meaningful
  e1000e: potentially incorrect return for
    e1000_cfg_kmrn_10_100_80003es2lan
  e1000e: potential incorrect return for
    e1000_setup_copper_link_80003es2lan
  e1000e: cleanup: remove unnecessary assignments just before returning
  e1000e: cleanup: always return 0
  e1000e: potentially incorrect return for
    e1000_set_d3_lplu_state_ich8lan
  e1000e: cleanup: remove unreachable statement
  e1000e: cleanup: remove unnecessary variable ret_val
  e1000e: cleanup: remove unnecessary test and return
  e1000e: cleanup: remove unnecessary variable initializations
  e1000e: cleanup: minor whitespace addition (insert blank line
    separator)
  e1000e: potentially incorrect return for e1000_init_hw_ich8lan
  e1000e: potentially incorrect return for
    e1000e_setup_fiber_serdes_link
  e1000e: cleanup goto statements to exit points without common work

 drivers/net/ethernet/intel/e1000e/80003es2lan.c |   36 +---
 drivers/net/ethernet/intel/e1000e/82571.c       |   36 ++---
 drivers/net/ethernet/intel/e1000e/ich8lan.c     |  220 +++++++++------------
 drivers/net/ethernet/intel/e1000e/mac.c         |   25 +--
 drivers/net/ethernet/intel/e1000e/manage.c      |   32 +--
 drivers/net/ethernet/intel/e1000e/netdev.c      |   16 +-
 drivers/net/ethernet/intel/e1000e/nvm.c         |   32 ++--
 drivers/net/ethernet/intel/e1000e/phy.c         |  241 ++++++++++-------------
 8 files changed, 265 insertions(+), 373 deletions(-)

-- 
1.7.7.6

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

end of thread, other threads:[~2014-05-31  0:53 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-29 12:51 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-07-29 12:51 ` [net-next 01/15] ixgbe: Retain VLAN filtering in promiscuous + VT mode Jeff Kirsher
2013-07-29 12:51 ` [net-next 02/15] ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned Jeff Kirsher
2013-07-29 12:51 ` [net-next 03/15] ixgbe: fix fc autoneg ethtool reporting Jeff Kirsher
2013-07-30  5:18   ` David Miller
2013-07-30 16:17     ` Skidmore, Donald C
2013-07-29 12:52 ` [net-next 04/15] ixgbe: add new media type Jeff Kirsher
2013-07-30  5:20   ` David Miller
2013-07-29 12:52 ` [net-next 05/15] ixgbe: bump version number Jeff Kirsher
2013-07-29 12:52 ` [net-next 06/15] ixgbe: fix semaphore lock for I2C read/writes on 82598 Jeff Kirsher
2013-07-29 12:52 ` [net-next 07/15] ixgbe: fix SFF data dumps of SFP+ modules Jeff Kirsher
2013-08-02  9:08   ` Ben Hutchings
2013-08-06  0:56     ` Tantilov, Emil S
2013-07-29 12:52 ` [net-next 08/15] pci: expose pcie_link_speed and pcix_bus_speed arrays Jeff Kirsher
2013-07-29 18:44   ` Bjorn Helgaas
2013-07-29 21:03     ` Keller, Jacob E
2013-07-29 21:19       ` Bjorn Helgaas
2013-07-29 12:52 ` [net-next 09/15] pci: move enum pcie_link_width into pci.h Jeff Kirsher
2013-07-29 18:39   ` Bjorn Helgaas
2013-07-29 12:52 ` [net-next 10/15] pci: Add function to obtain minimum link width and speed Jeff Kirsher
2013-07-29 18:45   ` Bjorn Helgaas
2013-07-29 12:52 ` [net-next 11/15] ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth Jeff Kirsher
2013-07-29 21:46   ` Keller, Jacob E
2013-07-29 12:52 ` [net-next 12/15] ixgbe: fix lockdep annotation issue for ptp's work item Jeff Kirsher
2013-07-29 12:52 ` [net-next 13/15] ixgbe: rename LL_EXTENDED_STATS to use queue instead of q Jeff Kirsher
2013-07-29 12:52 ` [net-next 14/15] ixgbe: clear semaphore bits on timeouts Jeff Kirsher
2013-07-29 12:52 ` [net-next 15/15] ixgbe: add support for quad-port x520 adapter Jeff Kirsher
  -- strict thread matches above, loose matches on Subject: below --
2014-05-29 15:10 [net-next 00/15][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-05-31  0:53 ` David Miller
2014-05-27  9:12 Jeff Kirsher
2014-05-28 16:42 ` David Miller
2014-05-21 12:00 Jeff Kirsher
2014-05-22 16:05 ` David Miller
2014-04-28 13:52 Jeff Kirsher
2014-04-28 18:53 ` David Miller
2014-03-26 18:03 Jeff Kirsher
2014-03-20  8:32 Jeff Kirsher
2014-03-20 18:20 ` David Miller
2014-03-08  9:25 Jeff Kirsher
2014-03-08 23:50 ` David Miller
2014-03-09  0:10   ` David Miller
2014-03-09  1:12     ` Jeff Kirsher
2014-01-09 12:52 Jeff Kirsher
2014-01-09 20:13 ` David Miller
2014-01-07  9:32 Jeff Kirsher
2014-01-06 12:30 Jeff Kirsher
2014-01-06 18:26 ` David Miller
2014-01-06 18:49   ` Jeff Kirsher
2014-01-06 20:14   ` Jeff Kirsher
2014-01-05 10:46 Jeff Kirsher
2014-01-06  1:31 ` David Miller
2013-12-19  6:34 Jeff Kirsher
2013-12-19 19:20 ` Jeff Kirsher
2013-12-19 19:47   ` David Miller
2013-12-12 12:40 Jeff Kirsher
2013-12-06  8:06 Jeff Kirsher
2013-12-06 19:49 ` David Miller
2013-08-21  8:23 Jeff Kirsher
2013-04-18 23:30 Jeff Kirsher
2013-04-19 18:19 ` David Miller
2013-03-08 10:07 Jeff Kirsher
2013-03-08 17:25 ` David Miller
2013-01-11 10:23 Jeff Kirsher
2012-02-13 21:47 [net-next 00/15][pull request] Intel Wired LAN Driver updates Jeff Kirsher
2012-02-13 23:48 ` 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).