117 | | queue_packet(fwhandle, len, 0, tag, sy); |
---|
| 117 | // queue_packet(fwhandle, len, 0, tag, sy); |
---|
| 118 | if (queue_packet(fwhandle, len, 0, tag, sy) < 0) { |
---|
| 119 | fprintf(stderr, "queue packet fail @ cycle %d\n", cycle); |
---|
| 120 | } |
---|
| 352 | { |
---|
| 353 | static int expected_cycle = -1; |
---|
| 354 | signed int i, pkt_count; |
---|
| 355 | if (expected_cycle<0) expected_cycle = cycle; |
---|
| 356 | if (cycle != expected_cycle) { |
---|
| 357 | fprintf(stderr, "expected=%d, cycle=%d\n", expected_cycle, cycle); |
---|
| 358 | fprintf(stderr, " iso.packet_count=%d, iso.irq_interval=%d\n", fwhandle->iso.packet_count, fwhandle->iso.irq_interval); |
---|
| 359 | fprintf(stderr, " iso.buf_packets=%d\n", fwhandle->iso.buf_packets); |
---|
| 360 | fprintf(stderr, " interrupt->header_length=%d\n", interrupt->header_length); |
---|
| 361 | fprintf(stderr, " header: "); |
---|
| 362 | for (i=0; i<interrupt->header_length/4; i++) |
---|
| 363 | fprintf(stderr, " 0x%08x ", be32_to_cpu(interrupt->header[i])); |
---|
| 364 | fprintf(stderr, "\n"); |
---|
| 365 | } |
---|
| 366 | |
---|
| 367 | pkt_count = fwhandle->iso.packet_count; |
---|
| 368 | i = queue_xmit_packets(handle, fwhandle->iso.buf_packets, cycle); |
---|
| 369 | expected_cycle = cycle + (fwhandle->iso.packet_count-pkt_count); |
---|
| 370 | if (fwhandle->iso.packet_count < pkt_count) |
---|
| 371 | fprintf(stderr, "iso.packet_count=%d, pkt_count=%d\n", fwhandle->iso.packet_count, pkt_count); |
---|
| 372 | if (expected_cycle>=8000) expected_cycle -= 8000; |
---|
| 373 | |
---|
| 374 | return i; |
---|
| 375 | } |
---|
| 376 | |
---|