diff options
| -rw-r--r-- | drivers/firewire/ohci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 435ed800d03f..ce767a4882fb 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
| @@ -1006,13 +1006,12 @@ static void ar_context_run(struct ar_context *ctx) | |||
| 1006 | 1006 | ||
| 1007 | static struct descriptor *find_branch_descriptor(struct descriptor *d, int z) | 1007 | static struct descriptor *find_branch_descriptor(struct descriptor *d, int z) |
| 1008 | { | 1008 | { |
| 1009 | int b, key; | 1009 | __le16 branch; |
| 1010 | 1010 | ||
| 1011 | b = (le16_to_cpu(d->control) & DESCRIPTOR_BRANCH_ALWAYS) >> 2; | 1011 | branch = d->control & cpu_to_le16(DESCRIPTOR_BRANCH_ALWAYS); |
| 1012 | key = (le16_to_cpu(d->control) & DESCRIPTOR_KEY_IMMEDIATE) >> 8; | ||
| 1013 | 1012 | ||
| 1014 | /* figure out which descriptor the branch address goes in */ | 1013 | /* figure out which descriptor the branch address goes in */ |
| 1015 | if (z == 2 && (b == 3 || key == 2)) | 1014 | if (z == 2 && branch == cpu_to_le16(DESCRIPTOR_BRANCH_ALWAYS)) |
| 1016 | return d; | 1015 | return d; |
| 1017 | else | 1016 | else |
| 1018 | return d + z - 1; | 1017 | return d + z - 1; |
