diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2010-04-12 10:35:05 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-04-19 19:58:32 +0200 |
commit | 3a1f0a0e3d871e3d3e08a1429009992151becda8 (patch) | |
tree | 79bb6e3cb82e58310442c986d46077ad8ff2dddc /drivers/firewire | |
parent | a2612cb16d4d8447793609cbdd2a2f4f156c0020 (diff) |
firewire: core: fix retries calculation in iso manage_channel()
If there is a permanent error condition when communicating with the IRM,
after the sixth error, the retry variable will be decremented to -1.
If, in this case, the bits in channels_mask are not yet exhausted, the
next channel is retried 2^32 times.
To fix this, check that retry is never decremented beyond zero.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/core-iso.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c index 99c20f1b613a..34a513725c9e 100644 --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c @@ -250,8 +250,10 @@ static int manage_channel(struct fw_card *card, int irm_id, int generation, /* 1394-1995 IRM, fall through to retry. */ default: - if (retry--) + if (retry) { + retry--; i--; + } } } |