aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4.h2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c13
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h1
3 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index a18d33fdb271..5ab5c3133acd 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -392,7 +392,7 @@ struct port_info {
392 s16 xact_addr_filt; /* index of exact MAC address filter */ 392 s16 xact_addr_filt; /* index of exact MAC address filter */
393 u16 rss_size; /* size of VI's RSS table slice */ 393 u16 rss_size; /* size of VI's RSS table slice */
394 s8 mdio_addr; 394 s8 mdio_addr;
395 u8 port_type; 395 enum fw_port_type port_type;
396 u8 mod_type; 396 u8 mod_type;
397 u8 port_id; 397 u8 port_id;
398 u8 tx_chan; 398 u8 tx_chan;
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 973dbb7938c3..ccf3436024bc 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2325,7 +2325,7 @@ static int identify_port(struct net_device *dev,
2325 return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid, val); 2325 return t4_identify_port(adap, adap->fn, netdev2pinfo(dev)->viid, val);
2326} 2326}
2327 2327
2328static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps) 2328static unsigned int from_fw_linkcaps(enum fw_port_type type, unsigned int caps)
2329{ 2329{
2330 unsigned int v = 0; 2330 unsigned int v = 0;
2331 2331
@@ -2354,14 +2354,20 @@ static unsigned int from_fw_linkcaps(unsigned int type, unsigned int caps)
2354 SUPPORTED_10000baseKR_Full | SUPPORTED_1000baseKX_Full | 2354 SUPPORTED_10000baseKR_Full | SUPPORTED_1000baseKX_Full |
2355 SUPPORTED_10000baseKX4_Full; 2355 SUPPORTED_10000baseKX4_Full;
2356 else if (type == FW_PORT_TYPE_FIBER_XFI || 2356 else if (type == FW_PORT_TYPE_FIBER_XFI ||
2357 type == FW_PORT_TYPE_FIBER_XAUI || type == FW_PORT_TYPE_SFP) { 2357 type == FW_PORT_TYPE_FIBER_XAUI ||
2358 type == FW_PORT_TYPE_SFP ||
2359 type == FW_PORT_TYPE_QSFP_10G ||
2360 type == FW_PORT_TYPE_QSA) {
2358 v |= SUPPORTED_FIBRE; 2361 v |= SUPPORTED_FIBRE;
2359 if (caps & FW_PORT_CAP_SPEED_1G) 2362 if (caps & FW_PORT_CAP_SPEED_1G)
2360 v |= SUPPORTED_1000baseT_Full; 2363 v |= SUPPORTED_1000baseT_Full;
2361 if (caps & FW_PORT_CAP_SPEED_10G) 2364 if (caps & FW_PORT_CAP_SPEED_10G)
2362 v |= SUPPORTED_10000baseT_Full; 2365 v |= SUPPORTED_10000baseT_Full;
2363 } else if (type == FW_PORT_TYPE_BP40_BA) 2366 } else if (type == FW_PORT_TYPE_BP40_BA ||
2367 type == FW_PORT_TYPE_QSFP) {
2364 v |= SUPPORTED_40000baseSR4_Full; 2368 v |= SUPPORTED_40000baseSR4_Full;
2369 v |= SUPPORTED_FIBRE;
2370 }
2365 2371
2366 if (caps & FW_PORT_CAP_ANEG) 2372 if (caps & FW_PORT_CAP_ANEG)
2367 v |= SUPPORTED_Autoneg; 2373 v |= SUPPORTED_Autoneg;
@@ -2396,6 +2402,7 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
2396 cmd->port = PORT_FIBRE; 2402 cmd->port = PORT_FIBRE;
2397 else if (p->port_type == FW_PORT_TYPE_SFP || 2403 else if (p->port_type == FW_PORT_TYPE_SFP ||
2398 p->port_type == FW_PORT_TYPE_QSFP_10G || 2404 p->port_type == FW_PORT_TYPE_QSFP_10G ||
2405 p->port_type == FW_PORT_TYPE_QSA ||
2399 p->port_type == FW_PORT_TYPE_QSFP) { 2406 p->port_type == FW_PORT_TYPE_QSFP) {
2400 if (p->mod_type == FW_PORT_MOD_TYPE_LR || 2407 if (p->mod_type == FW_PORT_MOD_TYPE_LR ||
2401 p->mod_type == FW_PORT_MOD_TYPE_SR || 2408 p->mod_type == FW_PORT_MOD_TYPE_SR ||
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
index 89a75e31f6ae..291b6f219708 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h
@@ -2471,6 +2471,7 @@ enum fw_port_type {
2471 FW_PORT_TYPE_BP4_AP, 2471 FW_PORT_TYPE_BP4_AP,
2472 FW_PORT_TYPE_QSFP_10G, 2472 FW_PORT_TYPE_QSFP_10G,
2473 FW_PORT_TYPE_QSFP, 2473 FW_PORT_TYPE_QSFP,
2474 FW_PORT_TYPE_QSA,
2474 FW_PORT_TYPE_BP40_BA, 2475 FW_PORT_TYPE_BP40_BA,
2475 2476
2476 FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_M 2477 FW_PORT_TYPE_NONE = FW_PORT_CMD_PTYPE_M