summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>2018-05-23 21:37:59 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-25 05:19:26 +0300
commitab5ec33b9ac285d01a0e0fa94b0fdcb64262b928 (patch)
tree9ed7d68e5d1a9a6af2df0622321e39a2e905f136 /drivers/net/ethernet/ibm
parent17c8705838a5acafbc77079c72378fc7e0f0a876 (diff)
downloadlinux-ab5ec33b9ac285d01a0e0fa94b0fdcb64262b928.tar.xz
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);