cxgb4/cxgb4vf: Add link mode mask API to cxgb4 and cxgb4vf
Subsystems (4)
PATCH 1/1 cxgb4/cxgb4vf: Add link mode mask API to cxgb4 and cxgb4vf
Based on original work by Casey Leedom <[email protected]>
Signed-off-by Ganesh Goudar <[email protected]>
--- drivers/net/ethernet/chelsio/cxgb4/cxgb4.h | 1 + drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 375 ++++++++++++++------- drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 + drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h | 24 +- .../net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 276 +++++++++------ drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h | 1 + drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c | 3 + 7 files changed, 446 insertions(+), 236 deletions(-)
drivers/net/ethernet/chelsio/cxgb4/cxgb4.h +1 -0
@@ -418,6 +418,7 @@ struct trace_params {struct link_config {unsigned short supported;/* link capabilities */ unsigned short advertising;/* advertised capabilities */ +unsigned short lp_advertising;/* peer advertised capabilities */ unsigned short requested_speed;/* speed user has requested */ unsigned short speed;/* actual link speed */ unsigned char requested_fc;/* flow control user has requested */
drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +245 -130
431 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +2 -0
@@ -7219,6 +7219,7 @@ void t4_handle_get_port_info(struct port_info *pi, const __be64 *rpl) lc->speed = speed; lc->fc = fc; lc->supported =be16_to_cpu (p->u.info.pcap); + lc->lp_advertising =be16_to_cpu (p->u.info.lpacap);t4_os_link_changed (adap, pi->port_id, link_ok); } }
@@ -7284,6 +7285,7 @@ static void get_pci_mode(struct adapter *adapter, struct pci_params *p)static void init_link_config (struct link_config *lc,unsigned int caps) { lc->supported = caps; + lc->lp_advertising =0 ; lc->requested_speed =0 ; lc->speed =0 ; lc->requested_fc = lc->fc =PAUSE_RX |PAUSE_TX ;
drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h +15 -9
@@ -2249,20 +2249,20 @@ struct fw_acl_vlan_cmd {enum fw_port_cap {FW_PORT_CAP_SPEED_100M =0x0001 ,FW_PORT_CAP_SPEED_1G =0x0002 , -FW_PORT_CAP_SPEED_2_5G =0x0004 , +FW_PORT_CAP_SPEED_25G =0x0004 ,FW_PORT_CAP_SPEED_10G =0x0008 ,FW_PORT_CAP_SPEED_40G =0x0010 ,FW_PORT_CAP_SPEED_100G =0x0020 ,FW_PORT_CAP_FC_RX =0x0040 ,FW_PORT_CAP_FC_TX =0x0080 ,FW_PORT_CAP_ANEG =0x0100 , -FW_PORT_CAP_MDI_0 =0x0200 , -FW_PORT_CAP_MDI_1 =0x0400 , -FW_PORT_CAP_BEAN =0x0800 , -FW_PORT_CAP_PMA_LPBK =0x1000 , -FW_PORT_CAP_PCS_LPBK =0x2000 , -FW_PORT_CAP_PHYXS_LPBK =0x4000 , -FW_PORT_CAP_FAR_END_LPBK =0x8000 , +FW_PORT_CAP_MDIX =0x0200 , +FW_PORT_CAP_MDIAUTO =0x0400 , +FW_PORT_CAP_FEC =0x0800 , +FW_PORT_CAP_TECHKR =0x1000 , +FW_PORT_CAP_TECHKX4 =0x2000 , +FW_PORT_CAP_802_3_PAUSE =0x4000 , +FW_PORT_CAP_802_3_ASM_DIR =0x8000 , };enum fw_port_mdi {
@@ -2376,7 +2376,8 @@ struct fw_port_cmd {__u8 cbllen;__u8 auxlinfo;__u8 dcbxdis_pkd; -__u8 r8_lo[3 ]; +__u8 r8_lo; +__be16 lpacap;__be64 r9; } info;struct fw_port_diags {
@@ -2555,6 +2556,11 @@ enum fw_port_type {FW_PORT_TYPE_QSA ,FW_PORT_TYPE_QSFP ,FW_PORT_TYPE_BP40_BA , +FW_PORT_TYPE_KR4_100G , +FW_PORT_TYPE_CR4_QSFP , +FW_PORT_TYPE_CR_QSFP , +FW_PORT_TYPE_CR2_QSFP , +FW_PORT_TYPE_SFP28 ,FW_PORT_TYPE_NONE =FW_PORT_CMD_PTYPE_M };
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +179 -97
291 lines not on this page · raw message
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_common.h +1 -0
@@ -107,6 +107,7 @@ struct t4vf_port_stats {struct link_config {unsigned int supported;/* link capabilities */ unsigned int advertising;/* advertised capabilities */ +unsigned short lp_advertising;/* peer advertised capabilities */ unsigned short requested_speed;/* speed user has requested */ unsigned short speed;/* actual link speed */ unsigned char requested_fc;/* flow control user has requested */
drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c +3 -0
@@ -328,6 +328,7 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,static void init_link_config (struct link_config *lc,unsigned int caps) { lc->supported = caps; + lc->lp_advertising =0 ; lc->requested_speed =0 ; lc->speed =0 ; lc->requested_fc = lc->fc =PAUSE_RX |PAUSE_TX ;
@@ -1743,6 +1744,8 @@ int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl) lc->fc = fc; lc->supported =be16_to_cpu (port_cmd->u.info.pcap); + lc->lp_advertising = +be16_to_cpu (port_cmd->u.info.lpacap);t4vf_os_link_changed (adapter, pidx, link_ok); } }
Signature · 1 line
2.7.4
From: Ganesh Goudar <[email protected]>
Date: Thu, 21 Jul 2016 20:19:18 +0530
Quoted 3 lines
Based on original work by Casey Leedom <[email protected]>
Signed-off-by Ganesh Goudar <[email protected]>
Applied.