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

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

Merge branch 'qed-load-unload-mfw'



Yuval Mintz says:

====================
qed: load/unload mfw series

This series correct the unload flow and greatly enhances its
initialization flow in regard to interactions between driver
and management firmware.

Patch #1 makes sure unloading is done under management-firmware's
'criticial section' protection.

Patches #2 - #4 move driver into using a newer scheme for loading
in regard to the MFW; This newer scheme would help cleaning the device
in case a previous instance has dirtied it [preboot, PDA, etc.].

Patches #5 - #6 let driver inform management-firmware on number of
resources which are dependent on the non-management firmware used.
Patch #7 then uses a new resource [BDQ] instead of some set value.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 30b38236 d0d40a73
Loading
Loading
Loading
Loading
+30 −3
Original line number Original line Diff line number Diff line
@@ -51,7 +51,19 @@
#include "qed_hsi.h"
#include "qed_hsi.h"


extern const struct qed_common_ops qed_common_ops_pass;
extern const struct qed_common_ops qed_common_ops_pass;
#define DRV_MODULE_VERSION "8.10.10.21"

#define QED_MAJOR_VERSION               8
#define QED_MINOR_VERSION               10
#define QED_REVISION_VERSION            10
#define QED_ENGINEERING_VERSION 21

#define QED_VERSION						 \
	((QED_MAJOR_VERSION << 24) | (QED_MINOR_VERSION << 16) | \
	 (QED_REVISION_VERSION << 8) | QED_ENGINEERING_VERSION)

#define STORM_FW_VERSION				       \
	((FW_MAJOR_VERSION << 24) | (FW_MINOR_VERSION << 16) | \
	 (FW_REVISION_VERSION << 8) | FW_ENGINEERING_VERSION)


#define MAX_HWFNS_PER_DEVICE    (4)
#define MAX_HWFNS_PER_DEVICE    (4)
#define NAME_SIZE 16
#define NAME_SIZE 16
@@ -59,8 +71,6 @@ extern const struct qed_common_ops qed_common_ops_pass;


#define QED_WFQ_UNIT	100
#define QED_WFQ_UNIT	100


#define ISCSI_BDQ_ID(_port_id) (_port_id)
#define FCOE_BDQ_ID(_port_id) ((_port_id) + 2)
#define QED_WID_SIZE            (1024)
#define QED_WID_SIZE            (1024)
#define QED_PF_DEMS_SIZE        (4)
#define QED_PF_DEMS_SIZE        (4)


@@ -76,6 +86,15 @@ union qed_mcp_protocol_stats;
enum qed_mcp_protocol_type;
enum qed_mcp_protocol_type;


/* helpers */
/* helpers */
#define QED_MFW_GET_FIELD(name, field) \
	(((name) & (field ## _MASK)) >> (field ## _SHIFT))

#define QED_MFW_SET_FIELD(name, field, value)				       \
	do {								       \
		(name)	&= ~((field ## _MASK) << (field ## _SHIFT));	       \
		(name)	|= (((value) << (field ## _SHIFT)) & (field ## _MASK));\
	} while (0)

static inline u32 qed_db_addr(u32 cid, u32 DEMS)
static inline u32 qed_db_addr(u32 cid, u32 DEMS)
{
{
	u32 db_addr = FIELD_VALUE(DB_LEGACY_ADDR_DEMS, DEMS) |
	u32 db_addr = FIELD_VALUE(DB_LEGACY_ADDR_DEMS, DEMS) |
@@ -198,6 +217,7 @@ enum qed_resources {
	QED_LL2_QUEUE,
	QED_LL2_QUEUE,
	QED_CMDQS_CQS,
	QED_CMDQS_CQS,
	QED_RDMA_STATS_QUEUE,
	QED_RDMA_STATS_QUEUE,
	QED_BDQ,
	QED_MAX_RESC,
	QED_MAX_RESC,
};
};


@@ -355,6 +375,12 @@ struct qed_fw_data {
	u32			init_ops_size;
	u32			init_ops_size;
};
};


#define DRV_MODULE_VERSION		      \
	__stringify(QED_MAJOR_VERSION) "."    \
	__stringify(QED_MINOR_VERSION) "."    \
	__stringify(QED_REVISION_VERSION) "." \
	__stringify(QED_ENGINEERING_VERSION)

struct qed_simd_fp_handler {
struct qed_simd_fp_handler {
	void	*token;
	void	*token;
	void	(*func)(void *);
	void	(*func)(void *);
@@ -732,5 +758,6 @@ void qed_get_protocol_stats(struct qed_dev *cdev,
			    enum qed_mcp_protocol_type type,
			    enum qed_mcp_protocol_type type,
			    union qed_mcp_protocol_stats *stats);
			    union qed_mcp_protocol_stats *stats);
int qed_slowpath_irq_req(struct qed_hwfn *hwfn);
int qed_slowpath_irq_req(struct qed_hwfn *hwfn);
void qed_slowpath_irq_sync(struct qed_hwfn *p_hwfn);


#endif /* _QED_H */
#endif /* _QED_H */
+0 −3
Original line number Original line Diff line number Diff line
@@ -85,9 +85,6 @@ struct qed_dcbx_app_metadata {
	enum qed_pci_personality personality;
	enum qed_pci_personality personality;
};
};


#define QED_MFW_GET_FIELD(name, field) \
	(((name) & (field ## _MASK)) >> (field ## _SHIFT))

struct qed_dcbx_info {
struct qed_dcbx_info {
	struct lldp_status_params_s lldp_remote[LLDP_MAX_LLDP_AGENTS];
	struct lldp_status_params_s lldp_remote[LLDP_MAX_LLDP_AGENTS];
	struct lldp_config_params_s lldp_local[LLDP_MAX_LLDP_AGENTS];
	struct lldp_config_params_s lldp_local[LLDP_MAX_LLDP_AGENTS];
+331 −248

File changed.

Preview size limit exceeded, changes collapsed.

+52 −21

File changed.

Preview size limit exceeded, changes collapsed.

+21 −9

File changed.

Preview size limit exceeded, changes collapsed.

Loading