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

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

Merge branch 'qed-fixes'



Sudarsana Reddy Kalluru says:

====================
qed*: Fix series.

The patch series addresses few issues in the qed* drivers.

Please consider applying it to 'net' branch.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5dc2d399 82a4e71b
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -709,9 +709,9 @@ qed_dcbx_get_local_lldp_params(struct qed_hwfn *p_hwfn,
	p_local = &p_hwfn->p_dcbx_info->lldp_local[LLDP_NEAREST_BRIDGE];
	p_local = &p_hwfn->p_dcbx_info->lldp_local[LLDP_NEAREST_BRIDGE];


	memcpy(params->lldp_local.local_chassis_id, p_local->local_chassis_id,
	memcpy(params->lldp_local.local_chassis_id, p_local->local_chassis_id,
	       ARRAY_SIZE(p_local->local_chassis_id));
	       sizeof(p_local->local_chassis_id));
	memcpy(params->lldp_local.local_port_id, p_local->local_port_id,
	memcpy(params->lldp_local.local_port_id, p_local->local_port_id,
	       ARRAY_SIZE(p_local->local_port_id));
	       sizeof(p_local->local_port_id));
}
}


static void
static void
@@ -723,9 +723,9 @@ qed_dcbx_get_remote_lldp_params(struct qed_hwfn *p_hwfn,
	p_remote = &p_hwfn->p_dcbx_info->lldp_remote[LLDP_NEAREST_BRIDGE];
	p_remote = &p_hwfn->p_dcbx_info->lldp_remote[LLDP_NEAREST_BRIDGE];


	memcpy(params->lldp_remote.peer_chassis_id, p_remote->peer_chassis_id,
	memcpy(params->lldp_remote.peer_chassis_id, p_remote->peer_chassis_id,
	       ARRAY_SIZE(p_remote->peer_chassis_id));
	       sizeof(p_remote->peer_chassis_id));
	memcpy(params->lldp_remote.peer_port_id, p_remote->peer_port_id,
	memcpy(params->lldp_remote.peer_port_id, p_remote->peer_port_id,
	       ARRAY_SIZE(p_remote->peer_port_id));
	       sizeof(p_remote->peer_port_id));
}
}


static int
static int
+1 −1
Original line number Original line Diff line number Diff line
@@ -1804,7 +1804,7 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
			DP_INFO(p_hwfn, "Failed to update driver state\n");
			DP_INFO(p_hwfn, "Failed to update driver state\n");


		rc = qed_mcp_ov_update_eswitch(p_hwfn, p_hwfn->p_main_ptt,
		rc = qed_mcp_ov_update_eswitch(p_hwfn, p_hwfn->p_main_ptt,
					       QED_OV_ESWITCH_VEB);
					       QED_OV_ESWITCH_NONE);
		if (rc)
		if (rc)
			DP_INFO(p_hwfn, "Failed to update eswitch mode\n");
			DP_INFO(p_hwfn, "Failed to update eswitch mode\n");
	}
	}
+8 −0
Original line number Original line Diff line number Diff line
@@ -789,6 +789,14 @@ static int qed_slowpath_setup_int(struct qed_dev *cdev,
	/* We want a minimum of one slowpath and one fastpath vector per hwfn */
	/* We want a minimum of one slowpath and one fastpath vector per hwfn */
	cdev->int_params.in.min_msix_cnt = cdev->num_hwfns * 2;
	cdev->int_params.in.min_msix_cnt = cdev->num_hwfns * 2;


	if (is_kdump_kernel()) {
		DP_INFO(cdev,
			"Kdump kernel: Limit the max number of requested MSI-X vectors to %hd\n",
			cdev->int_params.in.min_msix_cnt);
		cdev->int_params.in.num_vectors =
			cdev->int_params.in.min_msix_cnt;
	}

	rc = qed_set_int_mode(cdev, false);
	rc = qed_set_int_mode(cdev, false);
	if (rc)  {
	if (rc)  {
		DP_ERR(cdev, "qed_slowpath_setup_int ERR\n");
		DP_ERR(cdev, "qed_slowpath_setup_int ERR\n");
+17 −2
Original line number Original line Diff line number Diff line
@@ -4513,6 +4513,8 @@ static void qed_sriov_enable_qid_config(struct qed_hwfn *hwfn,
static int qed_sriov_enable(struct qed_dev *cdev, int num)
static int qed_sriov_enable(struct qed_dev *cdev, int num)
{
{
	struct qed_iov_vf_init_params params;
	struct qed_iov_vf_init_params params;
	struct qed_hwfn *hwfn;
	struct qed_ptt *ptt;
	int i, j, rc;
	int i, j, rc;


	if (num >= RESC_NUM(&cdev->hwfns[0], QED_VPORT)) {
	if (num >= RESC_NUM(&cdev->hwfns[0], QED_VPORT)) {
@@ -4525,8 +4527,8 @@ static int qed_sriov_enable(struct qed_dev *cdev, int num)


	/* Initialize HW for VF access */
	/* Initialize HW for VF access */
	for_each_hwfn(cdev, j) {
	for_each_hwfn(cdev, j) {
		struct qed_hwfn *hwfn = &cdev->hwfns[j];
		hwfn = &cdev->hwfns[j];
		struct qed_ptt *ptt = qed_ptt_acquire(hwfn);
		ptt = qed_ptt_acquire(hwfn);


		/* Make sure not to use more than 16 queues per VF */
		/* Make sure not to use more than 16 queues per VF */
		params.num_queues = min_t(int,
		params.num_queues = min_t(int,
@@ -4562,6 +4564,19 @@ static int qed_sriov_enable(struct qed_dev *cdev, int num)
		goto err;
		goto err;
	}
	}


	hwfn = QED_LEADING_HWFN(cdev);
	ptt = qed_ptt_acquire(hwfn);
	if (!ptt) {
		DP_ERR(hwfn, "Failed to acquire ptt\n");
		rc = -EBUSY;
		goto err;
	}

	rc = qed_mcp_ov_update_eswitch(hwfn, ptt, QED_OV_ESWITCH_VEB);
	if (rc)
		DP_INFO(cdev, "Failed to update eswitch mode\n");
	qed_ptt_release(hwfn, ptt);

	return num;
	return num;


err:
err:
+8 −2
Original line number Original line Diff line number Diff line
@@ -337,8 +337,14 @@ int qede_ptp_get_ts_info(struct qede_dev *edev, struct ethtool_ts_info *info)
{
{
	struct qede_ptp *ptp = edev->ptp;
	struct qede_ptp *ptp = edev->ptp;


	if (!ptp)
	if (!ptp) {
		return -EIO;
		info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
					SOF_TIMESTAMPING_RX_SOFTWARE |
					SOF_TIMESTAMPING_SOFTWARE;
		info->phc_index = -1;

		return 0;
	}


	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
	info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
				SOF_TIMESTAMPING_RX_SOFTWARE |
				SOF_TIMESTAMPING_RX_SOFTWARE |