summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2009-11-23 21:37:48 +0100
committerGravatar Stefan Richter 2009-11-23 21:41:02 +0100
commit4c4d62f248d1c58a0cbd35d19f8ffda9bb4551f7 (patch)
treec82d69fcc075448efbc69b72ed2094852ef1014a
parentInitialize unused fields in ioctl arguments (diff)
Addendum to 'Calculate iso receive cycles on firewire-core'
The number of packets is a 4th of the number of header bytes (in case of ABI version 1). Also, wrap after an increment over 8000. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--src/fw-iso.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fw-iso.c b/src/fw-iso.c
index 677b98d..88909dc 100644
--- a/src/fw-iso.c
+++ b/src/fw-iso.c
@@ -196,7 +196,7 @@ flush_recv_packets(raw1394handle_t handle,
cycle = interrupt->cycle;
cycle &= 0x1fff;
cycle += 8000;
- cycle -= end - p;
+ cycle -= interrupt->header_length / 4;
}
dropped = 0;
@@ -211,8 +211,11 @@ flush_recv_packets(raw1394handle_t handle,
if (header_has_timestamp)
cycle = be32_to_cpu(*p++) & 0x1fff;
- else
+ else {
cycle++;
+ if (cycle >= 8000)
+ cycle -= 8000;
+ }
d = fwhandle->iso.recv_handler(handle, fwhandle->iso.tail, len,
channel, tag, sy, cycle, dropped);
t-5&id=cabf9efa4d5c2e630100d437c2b290cb1e517e17&follow=1'>switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-26errorsGravatar John Cowan 1-1/+4 2021-07-26more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-26update preview linkGravatar John Cowan 1-1/+1 2021-07-26MN-W reviewGravatar John Cowan 1-6/+6 2021-07-26paired mutatorsGravatar John Cowan 1-43/+68 2021-07-25exceptionsGravatar John Cowan 1-1/+15 2021-07-25new exampleGravatar John Cowan 1-1/+4 2021-07-25updatesGravatar John Cowan 1-2/+4 2021-07-24dtd always first argumentGravatar John Cowan 1-9/+9 2021-07-23DTO to DTDGravatar John Cowan 1-55/+52 2021-07-22typoGravatar John Cowan 1-1/+1 2021-07-22switching to explicit dtosGravatar John Cowan 1-88/+102 2021-07-22errorsGravatar John Cowan 1-1/+4 2021-07-22more MN-W reviewGravatar John Cowan 1-5/+5 2021-07-20update preview linkGravatar John Cowan 1-1/+1 2021-07-20MN-W reviewGravatar John Cowan 1-6/+6 2021-07-18Fix typo.Gravatar Arthur A. Gleckler 2-4/+4 2021-07-18Add <p> around abstract.Gravatar Arthur A. Gleckler 1-2/+2 2021-07-18Publish first draft.draft-1Gravatar Arthur A. Gleckler 3-0/+114 2021-07-18Ignore trailing whitespace.Gravatar Arthur A. Gleckler 11-129/+129 2021-07-18Ignore "Dictionaries.log".Gravatar Arthur A. Gleckler 1-1/+2 2021-07-18Fix errors reported by W3C HTML Validator.Gravatar Arthur A. Gleckler 1-27/+27 2021-07-18Eliminate unnecessary redirect by using TLS/SSL.Gravatar Arthur A. Gleckler 1-1/+1