diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2015-11-01 09:52:13 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2015-11-05 08:25:31 -0500 |
commit | a354cf00c71390c46927335fe20b65f38a528b59 (patch) | |
tree | d3863f9b6df07618a57592fd602dae64e70d437a | |
parent | 2ae4b6b20e2004dccf80d804ae52b073377c2f5b (diff) |
firewire: ohci: propagate return code from soft_reset to probe and resume
software_reset() may fail
- due to unresponsive chip with -EBUSY (-16), or
- due to ejected or unseated card with -ENODEV (-19).
Let the PCI probe and resume routines log the actual error code instead
of hardwired -EBUSY.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r-- | drivers/firewire/ohci.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index c2f5117fd8cb..8bf89267dc25 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -2278,9 +2278,10 @@ static int ohci_enable(struct fw_card *card, | |||
2278 | u32 lps, version, irqs; | 2278 | u32 lps, version, irqs; |
2279 | int i, ret; | 2279 | int i, ret; |
2280 | 2280 | ||
2281 | if (software_reset(ohci)) { | 2281 | ret = software_reset(ohci); |
2282 | if (ret < 0) { | ||
2282 | ohci_err(ohci, "failed to reset ohci card\n"); | 2283 | ohci_err(ohci, "failed to reset ohci card\n"); |
2283 | return -EBUSY; | 2284 | return ret; |
2284 | } | 2285 | } |
2285 | 2286 | ||
2286 | /* | 2287 | /* |