summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2018-05-23 13:37:59 -0500
committerDavid S. Miller <davem@davemloft.net>2018-05-24 22:19:26 -0400
commitab5ec33b9ac285d01a0e0fa94b0fdcb64262b928 (patch)
tree9ed7d68e5d1a9a6af2df0622321e39a2e905f136 /drivers/net/ethernet/ibm
parent17c8705838a5acafbc77079c72378fc7e0f0a876 (diff)
downloadtalos-op-linux-ab5ec33b9ac285d01a0e0fa94b0fdcb64262b928.tar.gz
talos-op-linux-ab5ec33b9ac285d01a0e0fa94b0fdcb64262b928.zip
ibmvnic: Handle error case when setting link state
If setting the link state is not successful, print a warning with the resulting return code and return it to be handled by the caller. Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index f1f744ebb14e..b1bbd5bcc129 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -929,6 +929,10 @@ static int set_link_state(struct ibmvnic_adapter *adapter, u8 link_state)
/* Partuial success, delay and re-send */
mdelay(1000);
resend = true;
+ } else if (adapter->init_done_rc) {
+ netdev_warn(netdev, "Unable to set link state, rc=%d\n",
+ adapter->init_done_rc);
+ return adapter->init_done_rc;
}
} while (resend);
OpenPOWER on IntegriCloud