Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60cd0854 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
Intel Wired LAN Driver Updates 2015-02-09

This series contains updates to i40e and i40evf only.

Rickard Strandqvist removes an unused function for i40e.

John Linville reorders a piece of code so that y_budget does not get used
by the FCoE code before it gets initialized.

Mitch adds a delay after VF reset with a minimum of 10ms to allow the
hardware internal FIFOs to flush.  Bumps up the ARQ descriptors, since
we can easily overrun the PF's admin receive queue.  Added locking around
the VF reset code, since during VF deallocation, we cannot depend on
simply masking the interrupt since this does not lock out the service task,
which can still call the reset routine.  Fix a potential multi-minute
delay on driver unload, VF disable or system shutdown.  When the module
is being unloaded, waiting for the PF to politely handle all of our admin
queue requests might take forever with a lot of VFs enabled, so just
stop everything and request a VF reset.  Also stops the watchdog during
shutdown to prevent a log full of admin queue errors and the occasional
hang when the system is shut down.

Anjali forces Tx descriptor writebacks on ITR by kicking off the SWINT
interrupt since we noticed that there are non-cache-aligned Tx
descriptors waiting in the ring while interrupts are disabled under NAPI.
Enables loopback for the FCoE VSI, so that VSIs can directly talk to each
other without going out on the wire.

Matthew fixes an LED blink issue by making sure to clear the GPIO blink
field, instead of OR'ing against zero if the field is already '1'.

Greg cleans up a function header comment.

Vasu helps biosdevname user tool to differentiate dev_port for PCoE netdev
and PF netdev, by setting different dev_port value for FCoE netdev.

Carolyn adds a call to u64_stats_init to the receive setup in order to
avoid lockdep errors with seqcount on newer kernels.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1d966d03 638702bd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -87,8 +87,8 @@
#define I40E_MINIMUM_FCOE             1 /* minimum number of QPs for FCoE */
#endif /* I40E_FCOE */
#define I40E_MAX_AQ_BUF_SIZE          4096
#define I40E_AQ_LEN                   128
#define I40E_AQ_WORK_LIMIT            16
#define I40E_AQ_LEN                   256
#define I40E_AQ_WORK_LIMIT            32
#define I40E_MAX_USER_PRIORITY        8
#define I40E_DEFAULT_MSG_ENABLE       4
#define I40E_QUEUE_WAIT_RETRY_LIMIT   10
@@ -148,6 +148,7 @@ enum i40e_state_t {
	__I40E_FD_FLUSH_REQUESTED,
	__I40E_RESET_FAILED,
	__I40E_PORT_TX_SUSPENDED,
	__I40E_VF_DISABLE,
};

enum i40e_interrupt_policy {
+4 −2
Original line number Diff line number Diff line
@@ -1142,8 +1142,10 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
		if (mode == I40E_LINK_ACTIVITY)
			blink = false;

		gpio_val |= (blink ? 1 : 0) <<
			    I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT;
		if (blink)
			gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
		else
			gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);

		wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val);
		break;
+7 −9
Original line number Diff line number Diff line
@@ -38,15 +38,6 @@
#include "i40e.h"
#include "i40e_fcoe.h"

/**
 * i40e_rx_is_fip - returns true if the rx packet type is FIP
 * @ptype: the packet type field from rx descriptor write-back
 **/
static inline bool i40e_rx_is_fip(u16 ptype)
{
	return ptype == I40E_RX_PTYPE_L2_FIP_PAY2;
}

/**
 * i40e_rx_is_fcoe - returns true if the rx packet type is FCoE
 * @ptype: the packet type field from rx descriptor write-back
@@ -404,6 +395,7 @@ int i40e_fcoe_vsi_init(struct i40e_vsi *vsi, struct i40e_vsi_context *ctxt)
					    I40E_AQ_VSI_PROP_INGRESS_UP_VALID |
					    I40E_AQ_VSI_PROP_EGRESS_UP_VALID));

	info->switch_id = cpu_to_le16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
	enabled_tc = i40e_get_fcoe_tc_map(pf);
	i40e_vsi_setup_queue_map(vsi, ctxt, enabled_tc, true);

@@ -1511,6 +1503,12 @@ void i40e_fcoe_config_netdev(struct net_device *netdev, struct i40e_vsi *vsi)
	strlcpy(netdev->name, "fcoe%d", IFNAMSIZ-1);
	netdev->mtu = FCOE_MTU;
	SET_NETDEV_DEV(netdev, &pf->pdev->dev);
	/* set different dev_port value 1 for FCoE netdev than the default
	 * zero dev_port value for PF netdev, this helps biosdevname user
	 * tool to differentiate them correctly while both attached to the
	 * same PCI function.
	 */
	netdev->dev_port = 1;
	i40e_add_filter(vsi, hw->mac.san_addr, 0, false, false);
	i40e_add_filter(vsi, (u8[6]) FC_FCOE_FLOGI_MAC, 0, false, false);
	i40e_add_filter(vsi, FIP_ALL_FCOE_MACS, 0, false, false);
+8 −6
Original line number Diff line number Diff line
@@ -2940,7 +2940,7 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
/**
 * i40e_irq_dynamic_disable - Disable default interrupt generation settings
 * @vsi: pointer to a vsi
 * @vector: enable a particular Hw Interrupt vector
 * @vector: disable a particular Hw Interrupt vector
 **/
void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector)
{
@@ -6933,17 +6933,17 @@ static int i40e_init_msix(struct i40e_pf *pf)
	if (pf->flags & I40E_FLAG_FD_SB_ENABLED)
		other_vecs++;

	/* Scale down if necessary, and the rings will share vectors */
	pf->num_lan_msix = min_t(int, pf->num_lan_msix,
			(hw->func_caps.num_msix_vectors - other_vecs));
	v_budget = pf->num_lan_msix + other_vecs;

#ifdef I40E_FCOE
	if (pf->flags & I40E_FLAG_FCOE_ENABLED) {
		pf->num_fcoe_msix = pf->num_fcoe_qps;
		v_budget += pf->num_fcoe_msix;
	}

#endif
	/* Scale down if necessary, and the rings will share vectors */
	pf->num_lan_msix = min_t(int, pf->num_lan_msix,
			(hw->func_caps.num_msix_vectors - other_vecs));
	v_budget = pf->num_lan_msix + other_vecs;

	pf->msix_entries = kcalloc(v_budget, sizeof(struct msix_entry),
				   GFP_KERNEL);
@@ -9736,6 +9736,8 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)

	set_bit(__I40E_SUSPENDED, &pf->state);
	set_bit(__I40E_DOWN, &pf->state);
	del_timer_sync(&pf->service_timer);
	cancel_work_sync(&pf->service_task);
	rtnl_lock();
	i40e_prep_for_reset(pf);
	rtnl_unlock();
+4 −2
Original line number Diff line number Diff line
@@ -836,8 +836,8 @@ static void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
{
	u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
		  I40E_PFINT_DYN_CTLN_SWINT_TRIG_MASK |
		  I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK
		  /* allow 00 to be written to the index */;
		  I40E_PFINT_DYN_CTLN_SW_ITR_INDX_ENA_MASK;
		  /* allow 00 to be written to the index */

	wr32(&vsi->back->hw,
	     I40E_PFINT_DYN_CTLN(q_vector->v_idx + vsi->base_vector - 1),
@@ -1098,6 +1098,8 @@ int i40e_setup_rx_descriptors(struct i40e_ring *rx_ring)
	if (!rx_ring->rx_bi)
		goto err;

		u64_stats_init(rx_ring->syncp);

	/* Round up to nearest 4K */
	rx_ring->size = ring_is_16byte_desc_enabled(rx_ring)
		? rx_ring->count * sizeof(union i40e_16byte_rx_desc)
Loading