Skip to content

Commit 989594e

Browse files
anishdavem330
authored andcommitted
cxgb4 : Update fw interface file for DCBx support. Adds all the required fields to fw interface to communicate DCBx info
Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9f8b93c commit 989594e

1 file changed

Lines changed: 76 additions & 19 deletions

File tree

‎drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h‎

Lines changed: 76 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ enum fw_retval {
4646
FW_EFAULT = 14, /* bad address; fw bad */
4747
FW_EBUSY = 16, /* resource busy */
4848
FW_EEXIST = 17, /* file exists */
49+
FW_ENODEV = 19, /* no such device */
4950
FW_EINVAL = 22, /* invalid argument */
5051
FW_ENOSPC = 28, /* no space left on device */
5152
FW_ENOSYS = 38, /* functionality not implemented */
53+
FW_ENODATA = 61, /* no data available */
5254
FW_EPROTO = 71, /* protocol error */
5355
FW_EADDRINUSE = 98, /* address already in use */
5456
FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */
@@ -989,6 +991,7 @@ enum fw_params_param_dmaq {
989991
FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10,
990992
FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11,
991993
FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12,
994+
FW_PARAMS_PARAM_DMAQ_EQ_DCBPRIO_ETH = 0x13,
992995
};
993996

994997
#define FW_PARAMS_MNEM(x) ((x) << 24)
@@ -1422,6 +1425,7 @@ struct fw_vi_enable_cmd {
14221425
#define FW_VI_ENABLE_CMD_VIID(x) ((x) << 0)
14231426
#define FW_VI_ENABLE_CMD_IEN(x) ((x) << 31)
14241427
#define FW_VI_ENABLE_CMD_EEN(x) ((x) << 30)
1428+
#define FW_VI_ENABLE_CMD_DCB_INFO(x) ((x) << 28)
14251429
#define FW_VI_ENABLE_CMD_LED (1U << 29)
14261430

14271431
/* VI VF stats offset definitions */
@@ -1594,6 +1598,9 @@ enum fw_port_action {
15941598
FW_PORT_ACTION_GET_PORT_INFO = 0x0003,
15951599
FW_PORT_ACTION_L2_PPP_CFG = 0x0004,
15961600
FW_PORT_ACTION_L2_DCB_CFG = 0x0005,
1601+
FW_PORT_ACTION_DCB_READ_TRANS = 0x0006,
1602+
FW_PORT_ACTION_DCB_READ_RECV = 0x0007,
1603+
FW_PORT_ACTION_DCB_READ_DET = 0x0008,
15971604
FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010,
15981605
FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011,
15991606
FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012,
@@ -1637,6 +1644,14 @@ enum fw_port_dcb_type {
16371644
FW_PORT_DCB_TYPE_PRIORATE = 0x02,
16381645
FW_PORT_DCB_TYPE_PFC = 0x03,
16391646
FW_PORT_DCB_TYPE_APP_ID = 0x04,
1647+
FW_PORT_DCB_TYPE_CONTROL = 0x05,
1648+
};
1649+
1650+
enum fw_port_dcb_feature_state {
1651+
FW_PORT_DCB_FEATURE_STATE_PENDING = 0x0,
1652+
FW_PORT_DCB_FEATURE_STATE_SUCCESS = 0x1,
1653+
FW_PORT_DCB_FEATURE_STATE_ERROR = 0x2,
1654+
FW_PORT_DCB_FEATURE_STATE_TIMEOUT = 0x3,
16401655
};
16411656

16421657
struct fw_port_cmd {
@@ -1648,9 +1663,11 @@ struct fw_port_cmd {
16481663
__be32 r;
16491664
} l1cfg;
16501665
struct fw_port_l2cfg {
1651-
__be16 ctlbf_to_ivlan0;
1666+
__u8 ctlbf;
1667+
__u8 ovlan3_to_ivlan0;
16521668
__be16 ivlantype;
1653-
__be32 txipg_pkd;
1669+
__be16 txipg_force_pinfo;
1670+
__be16 mtu;
16541671
__be16 ovlan0mask;
16551672
__be16 ovlan0type;
16561673
__be16 ovlan1mask;
@@ -1666,24 +1683,60 @@ struct fw_port_cmd {
16661683
__be16 acap;
16671684
__be16 mtu;
16681685
__u8 cbllen;
1669-
__u8 r9;
1670-
__be32 r10;
1671-
__be64 r11;
1686+
__u8 auxlinfo;
1687+
__u8 dcbxdis_pkd;
1688+
__u8 r8_lo[3];
1689+
__be64 r9;
16721690
} info;
1673-
struct fw_port_ppp {
1674-
__be32 pppen_to_ncsich;
1675-
__be32 r11;
1676-
} ppp;
1677-
struct fw_port_dcb {
1678-
__be16 cfg;
1679-
u8 up_map;
1680-
u8 sf_cfgrc;
1681-
__be16 prot_ix;
1682-
u8 pe7_to_pe0;
1683-
u8 numTCPFCs;
1684-
__be32 pgid0_to_pgid7;
1685-
__be32 numTCs_oui;
1686-
u8 pgpc[8];
1691+
struct fw_port_diags {
1692+
__u8 diagop;
1693+
__u8 r[3];
1694+
__be32 diagval;
1695+
} diags;
1696+
union fw_port_dcb {
1697+
struct fw_port_dcb_pgid {
1698+
__u8 type;
1699+
__u8 apply_pkd;
1700+
__u8 r10_lo[2];
1701+
__be32 pgid;
1702+
__be64 r11;
1703+
} pgid;
1704+
struct fw_port_dcb_pgrate {
1705+
__u8 type;
1706+
__u8 apply_pkd;
1707+
__u8 r10_lo[5];
1708+
__u8 num_tcs_supported;
1709+
__u8 pgrate[8];
1710+
} pgrate;
1711+
struct fw_port_dcb_priorate {
1712+
__u8 type;
1713+
__u8 apply_pkd;
1714+
__u8 r10_lo[6];
1715+
__u8 strict_priorate[8];
1716+
} priorate;
1717+
struct fw_port_dcb_pfc {
1718+
__u8 type;
1719+
__u8 pfcen;
1720+
__u8 r10[5];
1721+
__u8 max_pfc_tcs;
1722+
__be64 r11;
1723+
} pfc;
1724+
struct fw_port_app_priority {
1725+
__u8 type;
1726+
__u8 r10[2];
1727+
__u8 idx;
1728+
__u8 user_prio_map;
1729+
__u8 sel_field;
1730+
__be16 protocolid;
1731+
__be64 r12;
1732+
} app_priority;
1733+
struct fw_port_dcb_control {
1734+
__u8 type;
1735+
__u8 all_syncd_pkd;
1736+
__be16 pfc_state_to_app_state;
1737+
__be32 r11;
1738+
__be64 r12;
1739+
} control;
16871740
} dcb;
16881741
} u;
16891742
};
@@ -1720,6 +1773,10 @@ struct fw_port_cmd {
17201773
#define FW_PORT_CMD_MODTYPE_MASK 0x1f
17211774
#define FW_PORT_CMD_MODTYPE_GET(x) (((x) >> 0) & FW_PORT_CMD_MODTYPE_MASK)
17221775

1776+
#define FW_PORT_CMD_DCBXDIS (1U << 7)
1777+
#define FW_PORT_CMD_APPLY (1U << 7)
1778+
#define FW_PORT_CMD_ALL_SYNCD (1U << 7)
1779+
17231780
#define FW_PORT_CMD_PPPEN(x) ((x) << 31)
17241781
#define FW_PORT_CMD_TPSRC(x) ((x) << 28)
17251782
#define FW_PORT_CMD_NCSISRC(x) ((x) << 24)

0 commit comments

Comments
 (0)