projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
17c8705
)
ibmvnic: Handle error case when setting link state
author
Thomas Falcon
<tlfalcon@linux.vnet.ibm.com>
Wed, 23 May 2018 18:37:59 +0000
(13:37 -0500)
committer
David S. Miller
<davem@davemloft.net>
Fri, 25 May 2018 02:19:26 +0000
(22:19 -0400)
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>
drivers/net/ethernet/ibm/ibmvnic.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/ibm/ibmvnic.c
b/drivers/net/ethernet/ibm/ibmvnic.c
index f1f744ebb14ebd79dd2c389fc7ab68ac993463df..b1bbd5bcc129c62e6f1610be4483166f9be2408a 100644
(file)
--- 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);