1. 31 1月, 2008 2 次提交
    • D
      firewire: fw-ohci: Bug fixes for packet-per-buffer support · bcee893c
      David Moore 提交于
      This patch corrects a number of bugs in the current OHCI 1.0
      packet-per-buffer support:
      
      1. Correctly deal with payloads that cross a page boundary.  The
      previous version would not split the descriptor at such a boundary,
      potentially corrupting unrelated memory.
      
      2. Allow user-space to specify multiple packets per struct
      fw_cdev_iso_packet in the same way that dual-buffer allows.  This is
      signaled by header_length being a multiple of header_size.  This
      multiple determines the number of packets.  The payload size allocated
      per packet is determined by dividing the total payload size by the
      number of packets.
      
      3. Make sync support work properly for packet-per-buffer.
      
      I have tested this patch with libdc1394 by forcing my OHCI 1.1
      controller to use the packet-per-buffer support instead of dual-buffer.
      
      I would greatly appreciate testing by those who have a DV devices and
      other types of iso streamers to make sure I didn't cause any
      regressions.
      
      Stefan, with this patch, I'm hoping that libdc1394 will work with all
      your OHCI 1.0 controllers now.
      
      The one bit of future work that remains for packet-per-buffer support is
      the automatic compaction of short payloads that I discussed with
      Kristian.
      Signed-off-by: NDavid Moore <dcm@acm.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      bcee893c
    • D
      firewire: fw-ohci: Fix for dualbuffer three-or-more buffers · 0642b657
      David Moore 提交于
      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: NDavid Moore <dcm@acm.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0642b657
  2. 11 12月, 2007 1 次提交
    • J
      firewire: OHCI 1.0 Isochronous Receive support · a186b4a6
      Jarod Wilson 提交于
      Third rendition of FireWire OHCI 1.0 Isochronous Receive support, using a
      zer-copy method similar to OHCI 1.1 which puts the IR data payload directly
      into the userspace buffer. The zero-copy implementation eliminates the
      video artifacts, audio popping, and buffer underrun problems seen with
      version 1 of this patch, as well as fixing a regression in OHCI 1.1 support
      introduced by version 2 of this patch.
      
      Successfully tested in OHCI 1.1 mode on the following chipsets:
      
      - NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
      - Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)
      - Ti TSB41AB2 (rev 01), OHCI 1.1 (PCI on SB Audigy)
      - Apple UniNorth 2 (rev 81), OHCI 1.1 (PowerBook G4 onboard)
      
      Successfully tested in OHCI 1.0 mode on the following chipsets:
      
      - Agere FW323 (rev 06), OHCI 1.0 (Mac Mini onboard)
      - Agere FW323 (rev 06), OHCI 1.0 (PCI)
      - Via VT6306 (rev 46), OHCI 1.0 (PCI)
      - NEC OrangeLink (rev 01), OHCI 1.0 (PCI)
      - NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
      - Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)
      
      The bulk of testing was done in an x86_64 system, but was also successfully
      sanity-tested on other systems, including a PPC(32) PowerBook G4 and an i686
      EPIA M10k. Crude benchmarking (watching top during capture) puts the cpu
      utilization during capture on the EPIA's 1GHz Via C3 processor around 13%,
      which is down from 30% with the v1 code.
      
      Some implementation details:
      
      To maintain the same userspace API as dual-buffer mode, we set up two
      descriptors for every incoming packet. The first is an INPUT_MORE descriptor,
      pointing to a buffer large enough to hold just the packet's iso headers,
      immediately followed by an INPUT_LAST descriptor, pointing to a chunk of the
      userspace buffer big enough for the packet's data payload. With this setup,
      each incoming packet fills in these two descriptors in a manner that very
      closely emulates dual-buffer receive, to the point where the bulk of the
      handle_ir_* code is now identical between the two (and probably primed for
      some restructuring to share code between them).
      
      The only caveat I have at the moment is that neither of my OHCI 1.0 Via
      VT6307-based FireWire controllers work particularly well with this code
      for reasons I have yet to figure out.
      Signed-off-by: NJarod Wilson <jwilson@redhat.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      a186b4a6
  3. 01 11月, 2007 1 次提交
  4. 23 10月, 2007 2 次提交
  5. 17 10月, 2007 6 次提交
  6. 08 9月, 2007 1 次提交
  7. 03 8月, 2007 1 次提交
  8. 19 7月, 2007 2 次提交
  9. 10 7月, 2007 1 次提交
  10. 29 6月, 2007 1 次提交
  11. 16 6月, 2007 1 次提交
  12. 01 6月, 2007 1 次提交
  13. 28 5月, 2007 1 次提交
  14. 16 5月, 2007 1 次提交
  15. 11 5月, 2007 5 次提交
  16. 12 4月, 2007 2 次提交
  17. 29 3月, 2007 2 次提交
  18. 16 3月, 2007 2 次提交
  19. 10 3月, 2007 7 次提交