aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2014-06-20 00:37:11 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-23 00:13:33 -0400
commit989594e2f28df8ec83a41cd08c5ce5dc1072e251 (patch)
tree973a0a62aeea9739d2b8be9f867824c743f7ab06 /drivers
parent9f8b93cb32e088d3377c86fabb666b884bac0f12 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h95
1 files changed, 76 insertions, 19 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
index 9cc973fbcf26..e83c94bbac41 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
@@ -46,9 +46,11 @@ enum fw_retval {
46 FW_EFAULT = 14, /* bad address; fw bad */ 46 FW_EFAULT = 14, /* bad address; fw bad */
47 FW_EBUSY = 16, /* resource busy */ 47 FW_EBUSY = 16, /* resource busy */
48 FW_EEXIST = 17, /* file exists */ 48 FW_EEXIST = 17, /* file exists */
49 FW_ENODEV = 19, /* no such device */
49 FW_EINVAL = 22, /* invalid argument */ 50 FW_EINVAL = 22, /* invalid argument */
50 FW_ENOSPC = 28, /* no space left on device */ 51 FW_ENOSPC = 28, /* no space left on device */
51 FW_ENOSYS = 38, /* functionality not implemented */ 52 FW_ENOSYS = 38, /* functionality not implemented */
53 FW_ENODATA = 61, /* no data available */
52 FW_EPROTO = 71, /* protocol error */ 54 FW_EPROTO = 71, /* protocol error */
53 FW_EADDRINUSE = 98, /* address already in use */ 55 FW_EADDRINUSE = 98, /* address already in use */
54 FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */ 56 FW_EADDRNOTAVAIL = 99, /* cannot assigned requested address */
@@ -989,6 +991,7 @@ enum fw_params_param_dmaq {
989 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10, 991 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_MNGT = 0x10,
990 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11, 992 FW_PARAMS_PARAM_DMAQ_EQ_CMPLIQID_CTRL = 0x11,
991 FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12, 993 FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH = 0x12,
994 FW_PARAMS_PARAM_DMAQ_EQ_DCBPRIO_ETH = 0x13,
992}; 995};
993 996
994#define FW_PARAMS_MNEM(x) ((x) << 24) 997#define FW_PARAMS_MNEM(x) ((x) << 24)
@@ -1422,6 +1425,7 @@ struct fw_vi_enable_cmd {
1422#define FW_VI_ENABLE_CMD_VIID(x) ((x) << 0) 1425#define FW_VI_ENABLE_CMD_VIID(x) ((x) << 0)
1423#define FW_VI_ENABLE_CMD_IEN(x) ((x) << 31) 1426#define FW_VI_ENABLE_CMD_IEN(x) ((x) << 31)
1424#define FW_VI_ENABLE_CMD_EEN(x) ((x) << 30) 1427#define FW_VI_ENABLE_CMD_EEN(x) ((x) << 30)
1428#define FW_VI_ENABLE_CMD_DCB_INFO(x) ((x) << 28)
1425#define FW_VI_ENABLE_CMD_LED (1U << 29) 1429#define FW_VI_ENABLE_CMD_LED (1U << 29)
1426 1430
1427/* VI VF stats offset definitions */ 1431/* VI VF stats offset definitions */
@@ -1594,6 +1598,9 @@ enum fw_port_action {
1594 FW_PORT_ACTION_GET_PORT_INFO = 0x0003, 1598 FW_PORT_ACTION_GET_PORT_INFO = 0x0003,
1595 FW_PORT_ACTION_L2_PPP_CFG = 0x0004, 1599 FW_PORT_ACTION_L2_PPP_CFG = 0x0004,
1596 FW_PORT_ACTION_L2_DCB_CFG = 0x0005, 1600 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,
1597 FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010, 1604 FW_PORT_ACTION_LOW_PWR_TO_NORMAL = 0x0010,
1598 FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011, 1605 FW_PORT_ACTION_L1_LOW_PWR_EN = 0x0011,
1599 FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012, 1606 FW_PORT_ACTION_L2_WOL_MODE_EN = 0x0012,
@@ -1637,6 +1644,14 @@ enum fw_port_dcb_type {
1637 FW_PORT_DCB_TYPE_PRIORATE = 0x02, 1644 FW_PORT_DCB_TYPE_PRIORATE = 0x02,
1638 FW_PORT_DCB_TYPE_PFC = 0x03, 1645 FW_PORT_DCB_TYPE_PFC = 0x03,
1639 FW_PORT_DCB_TYPE_APP_ID = 0x04, 1646 FW_PORT_DCB_TYPE_APP_ID = 0x04,
1647 FW_PORT_DCB_TYPE_CONTROL = 0x05,
1648};
1649
1650enum 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,
1640}; 1655};
1641 1656
1642struct fw_port_cmd { 1657struct fw_port_cmd {
@@ -1648,9 +1663,11 @@ struct fw_port_cmd {
1648 __be32 r; 1663 __be32 r;
1649 } l1cfg; 1664 } l1cfg;
1650 struct fw_port_l2cfg { 1665 struct fw_port_l2cfg {
1651 __be16 ctlbf_to_ivlan0; 1666 __u8 ctlbf;
1667 __u8 ovlan3_to_ivlan0;
1652 __be16 ivlantype; 1668 __be16 ivlantype;
1653 __be32 txipg_pkd; 1669 __be16 txipg_force_pinfo;
1670 __be16 mtu;
1654 __be16 ovlan0mask; 1671 __be16 ovlan0mask;
1655 __be16 ovlan0type; 1672 __be16 ovlan0type;
1656 __be16 ovlan1mask; 1673 __be16 ovlan1mask;
@@ -1666,24 +1683,60 @@ struct fw_port_cmd {
1666 __be16 acap; 1683 __be16 acap;
1667 __be16 mtu; 1684 __be16 mtu;
1668 __u8 cbllen; 1685 __u8 cbllen;
1669 __u8 r9; 1686 __u8 auxlinfo;
1670 __be32 r10; 1687 __u8 dcbxdis_pkd;
1671 __be64 r11; 1688 __u8 r8_lo[3];
1689 __be64 r9;
1672 } info; 1690 } info;
1673 struct fw_port_ppp { 1691 struct fw_port_diags {
1674 __be32 pppen_to_ncsich; 1692 __u8 diagop;
1675 __be32 r11; 1693 __u8 r[3];
1676 } ppp; 1694 __be32 diagval;
1677 struct fw_port_dcb { 1695 } diags;
1678 __be16 cfg; 1696 union fw_port_dcb {
1679 u8 up_map; 1697 struct fw_port_dcb_pgid {
1680 u8 sf_cfgrc; 1698 __u8 type;
1681 __be16 prot_ix; 1699 __u8 apply_pkd;
1682 u8 pe7_to_pe0; 1700 __u8 r10_lo[2];
1683 u8 numTCPFCs; 1701 __be32 pgid;
1684 __be32 pgid0_to_pgid7; 1702 __be64 r11;
1685 __be32 numTCs_oui; 1703 } pgid;
1686 u8 pgpc[8]; 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;
1687 } dcb; 1740 } dcb;
1688 } u; 1741 } u;
1689}; 1742};
@@ -1720,6 +1773,10 @@ struct fw_port_cmd {
1720#define FW_PORT_CMD_MODTYPE_MASK 0x1f 1773#define FW_PORT_CMD_MODTYPE_MASK 0x1f
1721#define FW_PORT_CMD_MODTYPE_GET(x) (((x) >> 0) & FW_PORT_CMD_MODTYPE_MASK) 1774#define FW_PORT_CMD_MODTYPE_GET(x) (((x) >> 0) & FW_PORT_CMD_MODTYPE_MASK)
1722 1775
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
1723#define FW_PORT_CMD_PPPEN(x) ((x) << 31) 1780#define FW_PORT_CMD_PPPEN(x) ((x) << 31)
1724#define FW_PORT_CMD_TPSRC(x) ((x) << 28) 1781#define FW_PORT_CMD_TPSRC(x) ((x) << 28)
1725#define FW_PORT_CMD_NCSISRC(x) ((x) << 24) 1782#define FW_PORT_CMD_NCSISRC(x) ((x) << 24)