Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89632
b: refs/heads/master
c: 4328656
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Apr 18, 2008
1 parent e5201c0 commit 5f81cec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad3c0fe8b8d1656a56ce2ef05ed5ccba790b4566
refs/heads/master: 43286568adb3ccd4b2f1d0cb7393c355f03e4f39
8 changes: 5 additions & 3 deletions trunk/drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
struct fw_ohci *ohci = ctx->ohci;
struct fw_packet p;
u32 status, length, tcode;
int evt;

p.header[0] = cond_le32_to_cpu(buffer[0]);
p.header[1] = cond_le32_to_cpu(buffer[1]);
Expand Down Expand Up @@ -536,13 +537,14 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
/* FIXME: What to do about evt_* errors? */
length = (p.header_length + p.payload_length + 3) / 4;
status = cond_le32_to_cpu(buffer[length]);
evt = (status >> 16) & 0x1f;

p.ack = ((status >> 16) & 0x1f) - 16;
p.ack = evt - 16;
p.speed = (status >> 21) & 0x7;
p.timestamp = status & 0xffff;
p.generation = ohci->request_generation;

log_ar_at_event('R', p.speed, p.header, status >> 16 & 0x1f);
log_ar_at_event('R', p.speed, p.header, evt);

/*
* The OHCI bus reset handler synthesizes a phy packet with
Expand All @@ -554,7 +556,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
* request.
*/

if (p.ack + 16 == 0x09)
if (evt == OHCI1394_evt_bus_reset)
ohci->request_generation = (p.header[2] >> 16) & 0xff;
else if (ctx == &ohci->ar_request_ctx)
fw_core_handle_request(&ohci->card, &p);
Expand Down

0 comments on commit 5f81cec

Please sign in to comment.