aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/io.h
diff options
context:
space:
mode:
authorDavid Moore <dcm@MIT.EDU>2007-12-19 03:09:18 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-01-30 16:22:23 -0500
commit0642b6577f1d455ed99e2da4a4d9216a866d2449 (patch)
tree35ae292471403cfe0f1a6ef9dc4c7d24b16ff340 /include/asm-s390/io.h
parent4b11ea96a08a0f97a16edba55a615354c6d846b5 (diff)
firewire: fw-ohci: Fix for dualbuffer three-or-more buffers
This patch fixes the problem where different OHCI 1.1 controllers behave differently when a received iso packet straddles three or more buffers when using the dual-buffer receive mode. Two changes are made in order to handle this situation: 1. The packet sync DMA descriptor is given a non-zero header length and non-zero payload length. This is because zero-payload descriptors are not discussed in the OHCI 1.1 specs and their behavior is thus undefined. Instead we use a header size just large enough for a single header and a payload length of 4 bytes for this first descriptor. 2. As we process received packets in the context's tasklet, read the packet length out of the headers. Keep track of the running total of the packet length as "excess_bytes", so we can ignore any descriptors where no packet starts or ends. These descriptors may not have had their first_res_count or second_res_count fields updated by the controller so we cannot rely on those values. The main drawback of this patch is that the excess_bytes value might get "out of sync" with the packet descriptors if something strange happens to the DMA program. I'm not if such a thing could ever happen, but I appreciate any suggestions in making it more robust. Also, the packet-per-buffer support may need a similar fix to deal with issue 1, but I haven't done any work on that yet. Stefan, I'm hoping that with this patch, all your OHCI 1.1 controllers will work properly with an unmodified version of libdc1394. Signed-off-by: David Moore <dcm@acm.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/asm-s390/io.h')
0 files changed, 0 insertions, 0 deletions