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

Commit 55218ce6 authored by Dmitry Bogdanov's avatar Dmitry Bogdanov Committed by Jinesh K. Jayakumar
Browse files

atlantic forwarding driver v1.1.1

  [ATLDRV-1315] - driver 1.1.0 crashes at start on A1
  [ATLDRV-1317] - A2: Incorrect ntuple L4 filter behavior
  [ATLDRV-1325] - A2: can not turn off flow control on Antigua
  [ATLDRV-1326] - A2: Cannot get EEE settings on Antigua
  [ATLDRV-1331] - A2: update reset sequence

Change-Id: I8e2dfe6854d71e5637c0babdfcfd8ed3bc7b6f6a
Signed-off: Dmitry Bogdanov <dbogdanov@marvell.com>
Git-commit: 7edd86bf7b8a734372f11cdec7c11bb2411c2b8c
Git-repo: https://github.com/aquantia/linux-4.14-atlantic-forwarding


Signed-off-by: default avatarJinesh K. Jayakumar <jineshk@codeaurora.org>
parent 968968c3
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -308,11 +308,11 @@ static void atl2_set_eee(struct atl_link_state *lstate,
		return;
	}

	link_options->eee_100M = eee_advertized & BIT(atl_link_type_idx_100m);
	link_options->eee_1G = eee_advertized & BIT(atl_link_type_idx_1g);
	link_options->eee_2P5G = eee_advertized & BIT(atl_link_type_idx_2p5g);
	link_options->eee_5G = eee_advertized & BIT(atl_link_type_idx_5g);
	link_options->eee_10G = eee_advertized & BIT(atl_link_type_idx_10g);
	link_options->eee_100M = !!(eee_advertized & BIT(atl_link_type_idx_100m));
	link_options->eee_1G = !!(eee_advertized & BIT(atl_link_type_idx_1g));
	link_options->eee_2P5G = !!(eee_advertized & BIT(atl_link_type_idx_2p5g));
	link_options->eee_5G = !!(eee_advertized & BIT(atl_link_type_idx_5g));
	link_options->eee_10G = !!(eee_advertized & BIT(atl_link_type_idx_10g));
}

/* fw lock must be held */
@@ -387,6 +387,8 @@ static u32 a2_fw_caps_to_mask(struct device_link_caps_s *link_caps)
		supported |= BIT(atl_link_type_idx_2p5g) << ATL_EEE_BIT_OFFT;
	if (link_caps->eee_1G)
		supported |= BIT(atl_link_type_idx_1g) << ATL_EEE_BIT_OFFT;
	if (link_caps->eee_100M)
		supported |= BIT(atl_link_type_idx_100m) << ATL_EEE_BIT_OFFT;

	return supported;
}
@@ -422,6 +424,8 @@ static u32 a2_fw_lkp_to_mask(struct lkp_link_caps_s *lkp_link_caps)
		rate |= BIT(atl_link_type_idx_2p5g) << ATL_EEE_BIT_OFFT;
	if (lkp_link_caps->eee_1G)
		rate |= BIT(atl_link_type_idx_1g) << ATL_EEE_BIT_OFFT;
	if (lkp_link_caps->eee_100M)
		rate |= BIT(atl_link_type_idx_100m) << ATL_EEE_BIT_OFFT;

	return rate;
}
+3 −3
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
#include <linux/netdevice.h>
#include <linux/moduleparam.h>

#define ATL_VERSION "1.1.0"
#define ATL_VERSION "1.1.1"

struct atl_nic;
enum atl_fwd_notify;
@@ -106,14 +106,14 @@ struct atl2_rxf_l3 {
		};
	};
	u16 proto;
	u16 cmd;
	u32 cmd;
	u16 usage;
};

struct atl2_rxf_l4 {
	__be16 dst_port;
	__be16 src_port;
	u16 cmd;
	u32 cmd;
	u16 usage;
};

+6 −4
Original line number Diff line number Diff line
@@ -425,7 +425,7 @@ static int atl_set_pauseparam(struct net_device *ndev,
	struct atl_link_state *lstate = &hw->link_state;
	struct atl_fc_state *fc = &lstate->fc;

	if (atl_fw_major(hw) < 2)
	if ((hw->chip_id == ATL_ATLANTIC) && (atl_fw_major(hw) < 2))
		return -EOPNOTSUPP;

	if (pause->autoneg)
@@ -459,6 +459,7 @@ static int atl_get_eee(struct net_device *ndev, struct ethtool_eee *eee)
	eee->eee_enabled = eee->tx_lpi_enabled = lstate->eee_enabled;
	eee->eee_active = lstate->eee;

	if (lstate->link)
		ret = atl_get_lpi_timer(nic, &eee->tx_lpi_timer);

	return ret;
@@ -471,7 +472,7 @@ static int atl_set_eee(struct net_device *ndev, struct ethtool_eee *eee)
	struct atl_link_state *lstate = &hw->link_state;
	uint32_t tmp = 0;

	if (atl_fw_major(hw) < 2)
	if ((hw->chip_id == ATL_ATLANTIC) && (atl_fw_major(hw) < 2))
		return -EOPNOTSUPP;

	atl_get_lpi_timer(nic, &tmp);
@@ -2272,6 +2273,7 @@ void atl_update_ntuple_flt(struct atl_nic *nic, int idx)
	if (!(cmd & ATL_NTC_EN)) {
		atl_write(hw, ATL_NTUPLE_CTRL(idx), cmd);

		if (nic->hw.new_rpf)
			atl2_update_ntuple_flt(nic, idx);
		return;
	}
+15 −2
Original line number Diff line number Diff line
@@ -214,7 +214,8 @@ static int atl2_hw_reset(struct atl_hw *hw)

	busy_wait(50, mdelay(1), rbl_status,
		  atl_read(hw, ATL2_MIF_BOOT_REG_ADR),
		  !(rbl_status & ATL2_BOOT_STARTED));
		  ((rbl_status & ATL2_BOOT_STARTED) == 0) ||
		  (rbl_status == 0xffffffff));
	if (!(rbl_status & ATL2_BOOT_STARTED))
		atl_dev_dbg("Boot code probably hanged, reboot anyway");

@@ -237,7 +238,8 @@ static int atl2_hw_reset(struct atl_hw *hw)
	/* Wait for RBL boot */
	busy_wait(200, mdelay(1), rbl_status,
		  atl_read(hw, ATL2_MIF_BOOT_REG_ADR),
		  !(rbl_status & ATL2_BOOT_STARTED));
		  ((rbl_status & ATL2_BOOT_STARTED) == 0) ||
		  (rbl_status == 0xffffffff));
	if (!(rbl_status & ATL2_BOOT_STARTED)) {
		err = -ETIME;
		atl_dev_err("Boot code hanged");
@@ -1371,8 +1373,18 @@ static void atl2_rpf_act_rslvr_record_set(struct atl_hw *hw, u8 location,
int atl2_act_rslvr_table_set(struct atl_hw *hw, u8 location,
			     u32 tag, u32 mask, u32 action)
{
	static char action_str[][32] = {"Drop", "Host", "Management",
					"Host & Management"};
	static char valid_str[][32] = {"Not Valid", "Valid"};
	static char rss_str[][32] = {"Queue", "TC"};
	int err = 0;

	dev_dbg(&hw->pdev->dev, "ACTRSLVR[%d] TAG %#x MASK %#x ACTION %#x (%s, %s %d, %s)",
		location, tag, mask, action,
		action_str[(action >> 8) & 3], rss_str[!!(action & BIT(7))],
		(action >> 2) & 0x1f,
		valid_str[action & 1]);

	err = atl_hwsem_get(hw, ATL2_MCP_SEM_ACT_RSLVR);
	if (err)
		return err;
@@ -1400,6 +1412,7 @@ static void atl2_hw_init_new_rx_filters(struct atl_hw *hw)
	atl_write(hw, ATL2_RPF_REC_TAB_EN, 0xFFFF);
	atl_write_bits(hw, ATL_RX_UC_FLT_REG2(0), 22, 6, ATL2_RPF_TAG_BASE_UC);
	atl_write_bits(hw, ATL2_RX_FLT_L2_BC_TAG, 0, 6, ATL2_RPF_TAG_BASE_UC);
	atl_set_bits(hw, ATL2_RPF_L3_FLT(0), BIT(0x17));

	atl2_act_rslvr_table_set(hw,
				 ATL2_RPF_L2_PROMISC_OFF_INDEX,
+8 −0
Original line number Diff line number Diff line
Version 1.1.1
==============
[ATLDRV-1315] - driver 1.1.0 crashes at start on A1
[ATLDRV-1317] - A2: Incorrect ntuple L4 filter behavior
[ATLDRV-1325] - A2: can not turn off flow control on Antigua
[ATLDRV-1326] - A2: Cannot get EEE settings on Antigua
[ATLDRV-1331] - A2: update reset sequence

Version 1.1.0
==============
[ATLDRV-1210] - A2: FWD: Basic functionality and bringup