1. 31 1月, 2008 19 次提交
    • S
      firewire: fw-sbp2: try to increase reconnect_hold (speed up reconnection) · 14dc992a
      Stefan Richter 提交于
      Ask the target to grant 4 seconds instead of the standard and minimum of
      1 second window after bus reset for reconnection.  This accelerates
      reconnection if there are more than one targets on the bus:  If a login
      and inquiry to one target blocks the fw-sbp2 workqueue for more than 1s
      after bus reset, we now still can reconnect to the other target.
      
      Before that, fw-sbp2's reconnect attempts would be rejected with "error
      status: 0:9" (function rejected), and fw-sbp2 would finally re-login.
      All those futile reconnect attemps cost extra time until the target
      which needs re-login is ready for I/O again.
      
      The reconnect timeout field in the login ORB doesn't have to be honored
      by the target though.  I found that we could get up to
        - allegedly 32768s from an old OXFW911 firmware
        - 256s from LSI bridges
        - 4s from OXUF922 and OXFW912 bridges,
        - 2s from TI bridges,
        - only the standard 1s from Initio and Prolific bridges and from
          Apple OpenFirmware in target mode.
      
      We just try to get 4 seconds which already covers the case of a few
      HDDs on the same bus quite nicely.
      
      A minor drawback occurs in the following (rare and impractical) border
      case:
        - two initiators are there, initiator 1 holds an exclusive login to
          a target,
        - initiator 1 goes off the bus,
        - target refuses login attempts from initiator 2 until reconnect_hold
          seconds after bus reset.
      
      An alternative approach to the issue at hand would be to parallelize
      fw-sbp2's reconnect and login work.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Acked-by: NJarod Wilson <jwilson@redhat.com>
      14dc992a
    • S
      firewire: fw-sbp2: skip unnecessary logout · 4dccd020
      Stefan Richter 提交于
      Don't attempt to send a logout ORB if the target was already unplugged
      or had its link switched off.  If two targets are attached, this
      enhances the chance to quickly reconnect to the remaining target when
      one target is plugged out.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Acked-by: NJarod Wilson <jwilson@redhat.com>
      4dccd020
    • S
      firewire vs. ieee1394: clarify MAINTAINERS · f148e20c
      Stefan Richter 提交于
      Maintainers like to receive less mail, and submitters like to have to Cc
      less recipients.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      f148e20c
    • D
      firewire: fw-ohci: Dynamically allocate buffers for DMA descriptors · fe5ca634
      David Moore 提交于
      Previously, the fw-ohci driver used fixed-length buffers for storing
      descriptors for isochronous receive DMA programs.  If an application
      (such as libdc1394) generated a DMA program that was too large, fw-ohci
      would reach the limit of its fixed-sized buffer and return an error to
      userspace.
      
      This patch replaces the fixed-length ring-buffer with a linked-list of
      page-sized buffers.  Additional buffers can be dynamically allocated and
      appended to the list when necessary.  For a particular context, buffers
      are kept around after use and reused as necessary, so there is no
      allocation taking place after the DMA program is generated for the first
      time.
      
      In addition, the buffers it uses are coherent for DMA so there is no
      syncing required before and after writes.  This syncing wasn't properly
      done in the previous version of the code.
      
      -
      
      This is the fourth version of my patch that replaces a fixed-length
      buffer for DMA descriptors with a dynamically allocated linked-list of
      buffers.
      
      As we discovered with the last attempt, new context programs are
      sometimes queued from interrupt context, making it unacceptable to call
      tasklet_disable() from context_get_descriptors().
      
      This version of the patch uses ohci->lock for all locking needs instead
      of tasklet_disable/enable.  There is a new requirement that
      context_get_descriptors() be called while holding ohci->lock.  It was
      already held for the AT context, so adding the requirement for the iso
      context did not seem particularly onerous.  In addition, this has the
      side benefit of allowing iso queue to be safely called from concurrent
      user-space threads, which previously was not safe.
      Signed-off-by: NDavid Moore <dcm@acm.org>
      Signed-off-by: NKristian Høgsberg <krh@redhat.com>
      Signed-off-by: NJarod Wilson <jwilson@redhat.com>
      
      -
      
      Fixes the following issues:
        - Isochronous reception stopped prematurely if an application used a
          larger buffer.  (Reproduced with coriander.)
        - Isochronous reception stopped after one or a few frames on VT630x
          in OHCI 1.0 mode.  (Fixes reception in coriander, but dvgrab still
          doesn't work with these chips.)
      
      Patch update: struct member alignment, whitespace nits
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      fe5ca634
    • S
      firewire: fw-ohci: CycleTooLong interrupt management · bb9f2206
      Stefan Richter 提交于
      The firewire-ohci driver so far lacked the ability to resume cycle
      master duty after that condition happened, as added to ohci1394 in Linux
      2.6.18 by commit 57fdb58f.  This ports
      this patch to fw-ohci.
      
      The "cycle too long" condition has been seen in practice
        - with IIDC cameras if a mode with packets too large for a speed is
          chosen,
        - sporadically when capturing DV on a VIA VT6306 card with ohci1394/
          ieee1394/ raw1394/ dvgrab 2.
          https://bugzilla.redhat.com/show_bug.cgi?id=415841#c7
      (This does not fix Fedora bug 415841.)
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      bb9f2206
    • R
      firewire: Fix extraction of source node id · 478b233e
      Rabin Vincent 提交于
      Fix extraction of the source node id from the packet header.
      Signed-off-by: NRabin Vincent <rabin@rab.in>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      478b233e
    • 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
    • S
      firewire: fw-sbp2: remove unused misleading macro · 4b11ea96
      Stefan Richter 提交于
      SBP2_MAX_SECTORS is nowhere used in fw-sbp2.
      It merely got copied over from sbp2 where it played a role in the past.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      4b11ea96
    • S
      b7811da2
    • S
      firewire: fw-sbp2: refactor workq and kref handling · 285838eb
      Stefan Richter 提交于
      This somewhat reduces the size of firewire-sbp2.ko.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      285838eb
    • S
      ieee1394: ohci1394: don't schedule IT tasklets on IR events · 85c5798b
      Stefan Richter 提交于
      Bug noted by Pieter Palmers:  Isochronous transmit tasklets were
      scheduled on isochronous receive events, in addition to the proper
      isochronous receive tasklets.
      
      http://marc.info/?l=linux1394-devel&m=119783196222802Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      85c5798b
    • S
      ieee1394: sbp2: raise default transfer size limit · 4e6343a1
      Stefan Richter 提交于
      This patch speeds up sbp2 a little bit --- but more importantly, it
      brings the behavior of sbp2 and fw-sbp2 closer to each other.  Like
      fw-sbp2, sbp2 now does not limit the size of single transfers to 255
      sectors anymore, unless told so by a blacklist flag or by module load
      parameters.
      
      Only very old bridge chips have been known to need the 255 sectors
      limit, and we have got one such chip in our hardwired blacklist.  There
      certainly is a danger that more bridges need that limit; but I prefer to
      have this issue present in both fw-sbp2 and sbp2 rather than just one of
      them.
      
      An OXUF922 with 400GB 7200RPM disk on an S400 controller is sped up by
      this patch from 22.9 to 23.5 MB/s according to hdparm.  The same effect
      could be achieved before by setting a higher max_sectors module
      parameter.  On buses which use 1394b beta mode, sbp2 and fw-sbp2 will
      now achieve virtually the same bandwidth.  Fw-sbp2 only remains faster
      on 1394a buses due to fw-core's gap count optimization.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      4e6343a1
    • S
      ieee1394: remove unused code · 3e75b493
      Stefan Richter 提交于
      The code has been in "#if 0 - #endif" since Linux 2.6.12.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3e75b493
    • S
      ieee1394: small cleanup after "nopage" · c7ea990f
      Stefan Richter 提交于
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      c7ea990f
    • N
      ieee1394: nopage · 61db8121
      Nick Piggin 提交于
      Convert ieee1394 from nopage to fault.
      Remove redundant vma range checks (correct resource range check is retained).
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      61db8121
    • J
      ieee1394: Add missing "space" · a5c52df8
      Joe Perches 提交于
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      a5c52df8
    • S
      ieee1394: sbp2: s/g list access cosmetics · 825f1df5
      Stefan Richter 提交于
      Replace sg->length by sg_dma_len(sg).  Rename a variable for shorter
      line lengths and eliminate some superfluous local variables.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      825f1df5
    • S
      8c4ac094
  2. 30 1月, 2008 21 次提交