Skip to content

Commit

Permalink
Merge branch 'qed-dcbnl'
Browse files Browse the repository at this point in the history
Sudarsana Reddy Kalluru says:

====================
qed/qede support for dcbnl.

This series adds the dcbnl functionality to the driver. Patch (1) adds
the qed infrastucture for querying/configuring the dcbx parameters.
Patch (2) adds the qed infrastructure for dcbnl APIs. And patch (3)
adds the qede support for dcbnl.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 8, 2016
2 parents 6f23d96 + 489e45a commit df0437e
Show file tree
Hide file tree
Showing 10 changed files with 2,168 additions and 1 deletion.
1,623 changes: 1,622 additions & 1 deletion drivers/net/ethernet/qlogic/qed/qed_dcbx.c

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_dcbx.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,24 @@ struct qed_dcbx_app_data {
u8 tc; /* Traffic Class */
};

#ifdef CONFIG_DCB
#define QED_DCBX_VERSION_DISABLED 0
#define QED_DCBX_VERSION_IEEE 1
#define QED_DCBX_VERSION_CEE 2

struct qed_dcbx_set {
#define QED_DCBX_OVERRIDE_STATE BIT(0)
#define QED_DCBX_OVERRIDE_PFC_CFG BIT(1)
#define QED_DCBX_OVERRIDE_ETS_CFG BIT(2)
#define QED_DCBX_OVERRIDE_APP_CFG BIT(3)
#define QED_DCBX_OVERRIDE_DSCP_CFG BIT(4)
u32 override_flags;
bool enabled;
struct qed_dcbx_admin_params config;
u32 ver_num;
};
#endif

struct qed_dcbx_results {
bool dcbx_enabled;
u8 pf_id;
Expand All @@ -55,6 +73,9 @@ struct qed_dcbx_info {
struct qed_dcbx_results results;
struct dcbx_mib operational;
struct dcbx_mib remote;
#ifdef CONFIG_DCB
struct qed_dcbx_set set;
#endif
u8 dcbx_cap;
};

Expand All @@ -67,6 +88,13 @@ struct qed_dcbx_mib_meta_data {
u32 addr;
};

#ifdef CONFIG_DCB
int qed_dcbx_get_config_params(struct qed_hwfn *, struct qed_dcbx_set *);

int qed_dcbx_config_params(struct qed_hwfn *,
struct qed_ptt *, struct qed_dcbx_set *, bool);
#endif

/* QED local interface routines */
int
qed_dcbx_mib_update_event(struct qed_hwfn *,
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_hsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -7244,6 +7244,9 @@ struct public_drv_mb {
#define DRV_MB_PARAM_CFG_VF_MSIX_VF_ID_MASK 0x000000FF
#define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_SHIFT 8
#define DRV_MB_PARAM_CFG_VF_MSIX_SB_NUM_MASK 0x0000FF00
#define DRV_MB_PARAM_LLDP_SEND_MASK 0x00000001
#define DRV_MB_PARAM_LLDP_SEND_SHIFT 0


#define DRV_MB_PARAM_SET_LED_MODE_OPER 0x0
#define DRV_MB_PARAM_SET_LED_MODE_ON 0x1
Expand Down
7 changes: 7 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2166,10 +2166,17 @@ static int qed_fp_cqe_completion(struct qed_dev *dev,
extern const struct qed_iov_hv_ops qed_iov_ops_pass;
#endif

#ifdef CONFIG_DCB
extern const struct qed_eth_dcbnl_ops qed_dcbnl_ops_pass;
#endif

static const struct qed_eth_ops qed_eth_ops_pass = {
.common = &qed_common_ops_pass,
#ifdef CONFIG_QED_SRIOV
.iov = &qed_iov_ops_pass,
#endif
#ifdef CONFIG_DCB
.dcb = &qed_dcbnl_ops_pass,
#endif
.fill_dev_info = &qed_fill_eth_dev_info,
.register_ops = &qed_register_eth_ops,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/qlogic/qede/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
obj-$(CONFIG_QEDE) := qede.o

qede-y := qede_main.o qede_ethtool.o
qede-$(CONFIG_DCB) += qede_dcbnl.o
3 changes: 3 additions & 0 deletions drivers/net/ethernet/qlogic/qede/qede.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ union qede_reload_args {
u16 mtu;
};

#ifdef CONFIG_DCB
void qede_set_dcbnl_ops(struct net_device *ndev);
#endif
void qede_config_debug(uint debug, u32 *p_dp_module, u8 *p_dp_level);
void qede_set_ethtool_ops(struct net_device *netdev);
void qede_reload(struct qede_dev *edev,
Expand Down
Loading

0 comments on commit df0437e

Please sign in to comment.