Commit 6f0282bf authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'qed-SmartAN-query-support'



Sudarsana Reddy Kalluru says:

====================
qed*: SmartAN query support

SmartAN feature detects the peer/cable capabilities and establishes the
link in the best possible configuration.
The patch series adds support for querying the capability. Please consider
applying it net-next.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents bc794e6e f15cff04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12796,6 +12796,7 @@ struct public_drv_mb {
#define FW_MB_PARAM_GET_PF_RDMA_BOTH		0x3

/* get MFW feature support response */
#define FW_MB_PARAM_FEATURE_SUPPORT_SMARTLINQ	0x00000001
#define FW_MB_PARAM_FEATURE_SUPPORT_EEE		0x00000002
#define FW_MB_PARAM_FEATURE_SUPPORT_VLINK	0x00010000

+2 −0
Original line number Diff line number Diff line
@@ -281,6 +281,8 @@ int qed_fill_dev_info(struct qed_dev *cdev,
		if (hw_info->b_wol_support == QED_WOL_SUPPORT_PME)
			dev_info->wol_support = true;

		dev_info->smart_an = qed_mcp_is_smart_an_supported(p_hwfn);

		dev_info->abs_pf_id = QED_LEADING_HWFN(cdev)->abs_pf_id;
	} else {
		qed_vf_get_fw_version(&cdev->hwfns[0], &dev_info->fw_major,
+6 −0
Original line number Diff line number Diff line
@@ -3654,6 +3654,12 @@ void qed_mcp_resc_lock_default_init(struct qed_resc_lock_params *p_lock,
	}
}

bool qed_mcp_is_smart_an_supported(struct qed_hwfn *p_hwfn)
{
	return !!(p_hwfn->mcp_info->capabilities &
		  FW_MB_PARAM_FEATURE_SUPPORT_SMARTLINQ);
}

int qed_mcp_get_capabilities(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
{
	u32 mcp_resp;
+10 −0
Original line number Diff line number Diff line
@@ -1148,6 +1148,16 @@ void qed_mcp_resc_lock_default_init(struct qed_resc_lock_params *p_lock,
				    struct qed_resc_unlock_params *p_unlock,
				    enum qed_resc_lock
				    resource, bool b_is_permanent);

/**
 * @brief - Return whether management firmware support smart AN
 *
 * @param p_hwfn
 *
 * @return bool - true if feature is supported.
 */
bool qed_mcp_is_smart_an_supported(struct qed_hwfn *p_hwfn);

/**
 * @brief Learn of supported MFW features; To be done during early init
 *
+10 −1
Original line number Diff line number Diff line
@@ -186,11 +186,13 @@ static const struct {

enum {
	QEDE_PRI_FLAG_CMT,
	QEDE_PRI_FLAG_SMART_AN_SUPPORT, /* MFW supports SmartAN */
	QEDE_PRI_FLAG_LEN,
};

static const char qede_private_arr[QEDE_PRI_FLAG_LEN][ETH_GSTRING_LEN] = {
	"Coupled-Function",
	"SmartAN capable",
};

enum qede_ethtool_tests {
@@ -404,8 +406,15 @@ static int qede_get_sset_count(struct net_device *dev, int stringset)
static u32 qede_get_priv_flags(struct net_device *dev)
{
	struct qede_dev *edev = netdev_priv(dev);
	u32 flags = 0;

	return (!!(edev->dev_info.common.num_hwfns > 1)) << QEDE_PRI_FLAG_CMT;
	if (edev->dev_info.common.num_hwfns > 1)
		flags |= BIT(QEDE_PRI_FLAG_CMT);

	if (edev->dev_info.common.smart_an)
		flags |= BIT(QEDE_PRI_FLAG_SMART_AN_SUPPORT);

	return flags;
}

struct qede_link_mode_mapping {
Loading