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

Commit 02dc4025 authored by Yuval Mintz's avatar Yuval Mintz Committed by David S. Miller
Browse files

bnx2x: Use correct fastpath version for VFs.



Our FW can support several fastpath HSI [for backward compatibility] but up
until now VFs were always configured to use latest fastpath HSI [although VF
driver might be older and use an older fastpath HSI].

For linux drivers, the differences are insignificant since driver never
utilized features that were overridden by the HSI change. But for VMs running
other operating systems this might be a problem.
In addition, eventually FW might change fastpath HSI in such a manner that
backward compatibility WILL break unless configured with proper version.

This patch fixes the issue for other operating system VMs, as well as lays
the ground work for forward compatibility in regard to the fastpath HSI.

Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarAriel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36c71a73
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3163,6 +3163,8 @@ static void bnx2x_pf_q_prep_general(struct bnx2x *bp,
		gen_init->mtu = bp->dev->mtu;

	gen_init->cos = cos;

	gen_init->fp_hsi = ETH_FP_HSI_VERSION;
}

static void bnx2x_pf_rx_q_prep(struct bnx2x *bp,
+1 −1
Original line number Diff line number Diff line
@@ -4336,7 +4336,7 @@ static void bnx2x_q_fill_init_general_data(struct bnx2x *bp,
		test_bit(BNX2X_Q_FLG_FCOE, flags) ?
		LLFC_TRAFFIC_TYPE_FCOE : LLFC_TRAFFIC_TYPE_NW;

	gen_data->fp_hsi_ver = ETH_FP_HSI_VERSION;
	gen_data->fp_hsi_ver = params->fp_hsi;

	DP(BNX2X_MSG_SP, "flags: active %d, cos %d, stats en %d\n",
	   gen_data->activate_flg, gen_data->cos, gen_data->statistics_en_flg);
+2 −0
Original line number Diff line number Diff line
@@ -937,6 +937,8 @@ struct bnx2x_general_setup_params {
	u8		spcl_id;
	u16		mtu;
	u8		cos;

	u8		fp_hsi;
};

struct bnx2x_rxq_setup_params {
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@ void bnx2x_vfop_qctor_prep(struct bnx2x *bp,
	/* Setup-op general parameters */
	setup_p->gen_params.spcl_id = vf->sp_cl_id;
	setup_p->gen_params.stat_id = vfq_stat_id(vf, q);
	setup_p->gen_params.fp_hsi = vf->fp_hsi;

	/* Setup-op pause params:
	 * Nothing to do, the pause thresholds are set by default to 0 which
+2 −0
Original line number Diff line number Diff line
@@ -205,6 +205,8 @@ struct bnx2x_virtf {
	/* slow-path operations */
	struct mutex			op_mutex; /* one vfop at a time mutex */
	enum channel_tlvs		op_current;

	u8 fp_hsi;
};

#define BNX2X_NR_VIRTFN(bp)	((bp)->vfdb->sriov.nr_virtfn)
Loading