diff options
author | Lendacky, Thomas <Thomas.Lendacky@amd.com> | 2017-06-28 13:42:16 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-29 15:14:17 -0400 |
commit | 42d452dc4a3674bbe53fa80f00f31f72385252dd (patch) | |
tree | dfe439db768303505685817ddd995eae8bb8ea52 /drivers/net/ethernet/amd/xgbe/xgbe-main.c | |
parent | 9018ff5331a64aa9e6dd600345bb1d087684fdff (diff) | |
download | linux-42d452dc4a3674bbe53fa80f00f31f72385252dd.tar.gz linux-42d452dc4a3674bbe53fa80f00f31f72385252dd.tar.bz2 linux-42d452dc4a3674bbe53fa80f00f31f72385252dd.zip |
amd-xgbe: Handle return code from software reset function
Currently the function that performs a software reset of the hardware
provides a return code. During driver probe check this return code and
exit with an error if the software reset fails.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd/xgbe/xgbe-main.c')
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-main.c b/drivers/net/ethernet/amd/xgbe/xgbe-main.c index 17ac8f9a51a0..982368b560ba 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-main.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-main.c @@ -277,7 +277,11 @@ int xgbe_config_netdev(struct xgbe_prv_data *pdata) pdata->desc_ded_period = jiffies; /* Issue software reset to device */ - pdata->hw_if.exit(pdata); + ret = pdata->hw_if.exit(pdata); + if (ret) { + dev_err(dev, "software reset failed\n"); + return ret; + } /* Set default configuration data */ xgbe_default_config(pdata); |