Commit 5e78f7fd authored by Ganesh Goudar's avatar Ganesh Goudar Committed by David S. Miller

cxgb4/cxgb4vf: Display 25G and 100G link speed

Add support to report 25G and 100G links, which was missed
as part of commit "eb97ad99".
Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c5e70991
...@@ -188,18 +188,24 @@ static void link_report(struct net_device *dev) ...@@ -188,18 +188,24 @@ static void link_report(struct net_device *dev)
const struct port_info *p = netdev_priv(dev); const struct port_info *p = netdev_priv(dev);
switch (p->link_cfg.speed) { switch (p->link_cfg.speed) {
case 10000: case 100:
s = "10Gbps"; s = "100Mbps";
break; break;
case 1000: case 1000:
s = "1000Mbps"; s = "1Gbps";
break; break;
case 100: case 10000:
s = "100Mbps"; s = "10Gbps";
break;
case 25000:
s = "25Gbps";
break; break;
case 40000: case 40000:
s = "40Gbps"; s = "40Gbps";
break; break;
case 100000:
s = "100Gbps";
break;
default: default:
pr_info("%s: unsupported speed: %d\n", pr_info("%s: unsupported speed: %d\n",
dev->name, p->link_cfg.speed); dev->name, p->link_cfg.speed);
...@@ -4397,9 +4403,9 @@ static void print_port_info(const struct net_device *dev) ...@@ -4397,9 +4403,9 @@ static void print_port_info(const struct net_device *dev)
spd = " 8 GT/s"; spd = " 8 GT/s";
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100M) if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100M)
bufp += sprintf(bufp, "100/"); bufp += sprintf(bufp, "100M/");
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G)
bufp += sprintf(bufp, "1000/"); bufp += sprintf(bufp, "1G/");
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G)
bufp += sprintf(bufp, "10G/"); bufp += sprintf(bufp, "10G/");
if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G) if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_25G)
......
...@@ -158,20 +158,23 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok) ...@@ -158,20 +158,23 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok)
netif_carrier_on(dev); netif_carrier_on(dev);
switch (pi->link_cfg.speed) { switch (pi->link_cfg.speed) {
case 40000: case 100:
s = "40Gbps"; s = "100Mbps";
break;
case 1000:
s = "1Gbps";
break; break;
case 10000: case 10000:
s = "10Gbps"; s = "10Gbps";
break; break;
case 25000:
case 1000: s = "25Gbps";
s = "1000Mbps";
break; break;
case 40000:
case 100: s = "40Gbps";
s = "100Mbps"; break;
case 100000:
s = "100Gbps";
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment