Skip to content

Commit

Permalink
firewire: ohci: propagate return code from soft_reset to probe and re…
Browse files Browse the repository at this point in the history
…sume

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 <[email protected]>
  • Loading branch information
Stefan Richter committed Nov 5, 2015
1 parent 2ae4b6b commit a354cf0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2278,9 +2278,10 @@ static int ohci_enable(struct fw_card *card,
u32 lps, version, irqs;
int i, ret;

if (software_reset(ohci)) {
ret = software_reset(ohci);
if (ret < 0) {
ohci_err(ohci, "failed to reset ohci card\n");
return -EBUSY;
return ret;
}

/*
Expand Down

0 comments on commit a354cf0

Please sign in to comment.