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

Commit 2490c65f authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
This series contains updates to i40e only.

Greg provides fixes for the NPAR transmit scheduler where the driver
initialization caused the BW configurations to not take effect, so use
a BW configuration read and write back to "kick" the transmit scheduler
into action.  Fixes the ethtool offline test, where we were not actually
taking the device offline before doing the testing.

Matt modifies the get and set LED functions so they ignore activity LEDs
since we are required to blink the link LEDs only.

Neerav provides a workaround for whenever a DCBX configuration is changed,
where the firmware doe not set the operational status bit of the
application TLV status as returned from the "Get CEE DCBX Oper Cfg" admin
queue command.  So remove the check for the operational and sync bits of
the application TLV status until a firmware fix is provided.

Shannon changes the driver to grab the NVM devstarter version and not
the image version, since it is the more useful version and is what
should be displayed.  Moves the IRQ tracking setup and tear down into
the same routines that do the IRQ setup and tear down.  This keeps
like activities together and allows us to track exactly the number
of vectors reserved from the OS, which may be fewer than are available
from the hardware.

Jesse provides a fix to use a more portable sign extension by replacing
0xffff.... with ~(u64)0 or ~(u32)0.  Also fixes XPS mask when resetting,
where the driver would accidentally clear the XPS mask for all queues
back to 0.  This caused higher CPU utilization and had some other
performance impacts for transmit tests.  Cleans up some whitespace
formatting.

Catherine provides a fix where some firmware versions are incorrectly
reporting a breakout cable as PHY type 0x3 when it should be 0x16
(I40E_PHY_TYPE_10GBASE_SFPP_CU).  Adds the 10G and 40G AOC PHY types
to the case statement in get_media_type and ethtool get_settings so
that the correct information gets reported back to the user.

Anjali provides IOREMAP changes for future device support, where we
do not want to map the whole CSR space since some of it is mapped by
other drivers with different mapping methods.

Mitch changes the i40e driver to not "spam" the system log with
messages about VF VSI when VFs are created and when they are reset to
reduce user annoyance.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4b5edb2f d3866a07
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@

#define I40E_MAX_NUM_DESCRIPTORS      4096
#define I40E_MAX_REGISTER     0x800000
#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)
#define I40E_DEFAULT_NUM_DESCRIPTORS  512
#define I40E_REQ_DESCRIPTOR_MULTIPLE  32
#define I40E_MIN_NUM_DESCRIPTORS      64
+2 −1
Original line number Diff line number Diff line
@@ -606,7 +606,8 @@ i40e_status i40e_init_adminq(struct i40e_hw *hw)
		goto init_adminq_free_arq;

	/* get the NVM version info */
	i40e_read_nvm_word(hw, I40E_SR_NVM_IMAGE_VERSION, &hw->nvm.version);
	i40e_read_nvm_word(hw, I40E_SR_NVM_DEV_STARTER_VERSION,
			   &hw->nvm.version);
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
	i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
	hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
+40 −2
Original line number Diff line number Diff line
@@ -541,7 +541,6 @@ struct i40e_rx_ptype_decoded i40e_ptype_lookup[] = {
	I40E_PTT_UNUSED_ENTRY(255)
};


/**
 * i40e_init_shared_code - Initialize the shared code
 * @hw: pointer to hardware structure
@@ -834,6 +833,8 @@ static enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
	case I40E_PHY_TYPE_10GBASE_CR1:
	case I40E_PHY_TYPE_40GBASE_CR4:
	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
	case I40E_PHY_TYPE_40GBASE_AOC:
	case I40E_PHY_TYPE_10GBASE_AOC:
		media = I40E_MEDIA_TYPE_DA;
		break;
	case I40E_PHY_TYPE_1000BASE_KX:
@@ -1083,8 +1084,11 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
	return gpio_val;
}

#define I40E_LED0 22
#define I40E_COMBINED_ACTIVITY 0xA
#define I40E_FILTER_ACTIVITY 0xE
#define I40E_LINK_ACTIVITY 0xC
#define I40E_MAC_ACTIVITY 0xD
#define I40E_LED0 22

/**
 * i40e_led_get - return current on/off mode
@@ -1097,6 +1101,7 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx)
 **/
u32 i40e_led_get(struct i40e_hw *hw)
{
	u32 current_mode = 0;
	u32 mode = 0;
	int i;

@@ -1109,6 +1114,20 @@ u32 i40e_led_get(struct i40e_hw *hw)
		if (!gpio_val)
			continue;

		/* ignore gpio LED src mode entries related to the activity
		 * LEDs
		 */
		current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
				>> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
		switch (current_mode) {
		case I40E_COMBINED_ACTIVITY:
		case I40E_FILTER_ACTIVITY:
		case I40E_MAC_ACTIVITY:
			continue;
		default:
			break;
		}

		mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >>
			I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT;
		break;
@@ -1128,6 +1147,7 @@ u32 i40e_led_get(struct i40e_hw *hw)
 **/
void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
{
	u32 current_mode = 0;
	int i;

	if (mode & 0xfffffff0)
@@ -1142,6 +1162,20 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
		if (!gpio_val)
			continue;

		/* ignore gpio LED src mode entries related to the activity
		 * LEDs
		 */
		current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK)
				>> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT);
		switch (current_mode) {
		case I40E_COMBINED_ACTIVITY:
		case I40E_FILTER_ACTIVITY:
		case I40E_MAC_ACTIVITY:
			continue;
		default:
			break;
		}

		gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK;
		/* this & is a bit of paranoia, but serves as a range check */
		gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) &
@@ -1448,6 +1482,10 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
	else
		hw_link_info->lse_enable = false;

	if ((hw->aq.fw_maj_ver < 4 || (hw->aq.fw_maj_ver == 4 &&
	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;

	/* save link status information */
	if (link)
		*link = *hw_link_info;
+1 −1
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ static void i40e_cee_to_dcb_v1_config(
	sync = (status & I40E_TLV_STATUS_SYNC) ? 1 : 0;
	oper = (status & I40E_TLV_STATUS_OPER) ? 1 : 0;
	/* Add APPs if Error is False and Oper/Sync is True */
	if (!err && sync && oper) {
	if (!err) {
		/* CEE operating configuration supports FCoE/iSCSI/FIP only */
		dcbcfg->numapps = I40E_CEE_OPER_MAX_APPS;

+13 −1
Original line number Diff line number Diff line
@@ -259,6 +259,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
		break;
	case I40E_PHY_TYPE_XLAUI:
	case I40E_PHY_TYPE_XLPPI:
	case I40E_PHY_TYPE_40GBASE_AOC:
		ecmd->supported = SUPPORTED_40000baseCR4_Full;
		break;
	case I40E_PHY_TYPE_40GBASE_KR4:
@@ -328,6 +329,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
	case I40E_PHY_TYPE_XFI:
	case I40E_PHY_TYPE_SFI:
	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
	case I40E_PHY_TYPE_10GBASE_AOC:
		ecmd->supported = SUPPORTED_10000baseT_Full;
		break;
	case I40E_PHY_TYPE_SGMII:
@@ -1530,6 +1532,7 @@ static void i40e_diag_test(struct net_device *netdev,
			   struct ethtool_test *eth_test, u64 *data)
{
	struct i40e_netdev_priv *np = netdev_priv(netdev);
	bool if_running = netif_running(netdev);
	struct i40e_pf *pf = np->vsi->back;

	if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
@@ -1537,6 +1540,12 @@ static void i40e_diag_test(struct net_device *netdev,
		netif_info(pf, drv, netdev, "offline testing starting\n");

		set_bit(__I40E_TESTING, &pf->state);
		/* If the device is online then take it offline */
		if (if_running)
			/* indicate we're in test mode */
			dev_close(netdev);
		else
			i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));

		/* Link test performed before hardware reset
		 * so autoneg doesn't interfere with test result
@@ -1559,6 +1568,9 @@ static void i40e_diag_test(struct net_device *netdev,

		clear_bit(__I40E_TESTING, &pf->state);
		i40e_do_reset(pf, (1 << __I40E_PF_RESET_REQUESTED));

		if (if_running)
			dev_open(netdev);
	} else {
		/* Online tests */
		netif_info(pf, drv, netdev, "online testing starting\n");
@@ -2368,7 +2380,7 @@ static int i40e_set_channels(struct net_device *dev,
 *
 * Returns a u32 bitmap of flags.
 **/
u32 i40e_get_priv_flags(struct net_device *dev)
static u32 i40e_get_priv_flags(struct net_device *dev)
{
	struct i40e_netdev_priv *np = netdev_priv(dev);
	struct i40e_vsi *vsi = np->vsi;
Loading