summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
diff options
context:
space:
mode:
authorGanesh Goudar <ganeshgr@chelsio.com>2017-05-19 17:50:15 +0530
committerDavid S. Miller <davem@davemloft.net>2017-05-21 13:30:29 -0400
commit2061ec3f1370d5491e801a693618af2b933781fe (patch)
tree22e758f7174e39a869f9af83c2ca827b8562b6cd /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
parent66aa0678efc29abd2ab02a09b23f9a8bc9f12a6c (diff)
downloadlwn-2061ec3f1370d5491e801a693618af2b933781fe.tar.gz
lwn-2061ec3f1370d5491e801a693618af2b933781fe.zip
cxgb4 : retrieve port information from firmware
issue get port information command to firmware to retrieve port information and update if it is different from what was last recorded and also add indication for supported link modes for firmware port types FW_PORT_TYPE_SFP28, FW_PORT_TYPE_KR_SFP28, FW_PORT_TYPE_CR4_QSFP. Based on the original work by Casey Leedom <leedom@chelsio.com> Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 4249ffbc0427..2ae54d54aea8 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2245,6 +2245,13 @@ static int cxgb_open(struct net_device *dev)
return err;
}
+ /* It's possible that the basic port information could have
+ * changed since we first read it.
+ */
+ err = t4_update_port_info(pi);
+ if (err < 0)
+ return err;
+
err = link_start(dev);
if (!err)
netif_tx_start_all_queues(dev);