1. 25 3月, 2009 2 次提交
    • J
      firewire: add a client_list_lock · cf417e54
      Jay Fenlason 提交于
      This adds a client_list_lock, which only protects the device's
      client_list, so that future versions of the driver can call code that
      takes the card->lock while holding the client_list_lock.  Adding this
      lock is much simpler than adding __ versions of all the functions that
      the future version may need.  The one ordering issue is to make sure
      code never takes the client_list_lock with card->lock held.  Since
      client_list_lock is only used in three places, that isn't hard.
      Signed-off-by: NJay Fenlason <fenlason@redhat.com>
      
      Update fill_bus_reset_event() accordingly.  Include linux/spinlock.h.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      cf417e54
    • D
      firewire: Include iso timestamp in headers when header_size > 4 · 1aa292bb
      David Moore 提交于
      Previously, when an iso context had header_size > 4, the iso header
      (len/tag/channel/tcode/sy) was passed to userspace followed by quadlets
      stripped from the payload.  This patch changes the behavior:
      header_size = 8 now passes the header quadlet followed by the timestamp
      quadlet.  When header_size > 8, quadlets are stripped from the payload.
      The header_size = 4 case remains identical.
      
      Since this alters the semantics of the API, the firewire API version
      needs to be bumped concurrently with this change.
      
      This change also refactors the header copying code slightly to be much
      easier to read.
      Signed-off-by: NDavid Moore <dcm@acm.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      1aa292bb
  2. 01 2月, 2009 1 次提交
  3. 30 1月, 2009 1 次提交
  4. 29 1月, 2009 3 次提交
  5. 25 1月, 2009 1 次提交
    • S
      firewire: core: optimize card shutdown · e747a5c0
      Stefan Richter 提交于
      This fixes a regression by "firewire: keep highlevel drivers attached
      during brief connection loss":  There were 2 seconds unnecessary waiting
      added to the shutdown procedure of each controller.
      
      We use card->link as status flag to signal the device handler that there
      is no use to wait for a come-back.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e747a5c0
  6. 24 1月, 2009 2 次提交
  7. 21 1月, 2009 3 次提交
    • S
      firewire: keep highlevel drivers attached during brief connection loss · 3d36a0df
      Stefan Richter 提交于
      There are situations when nodes vanish from the bus and come back
      quickly thereafter:
        - When certain bus-powered hubs are plugged in,
        - when certain devices are plugged into 6-port hubs,
        - when certain disk enclosures are switched from self-power to bus
          power or vice versa and break the daisy chain during the transition,
        - when the user plugs a cable out and quickly plugs it back in, e.g.
          to reorder a daisy chain (works on Mac OS X if done quickly enough),
        - when certain hubs temporarily malfunction during high bus traffic.
      
      Until now, firewire-core reported affected nodes as lost to the
      highlevel drivers (firewire-sbp2 and userspace drivers).  We now delay
      the destruction of device representations until after at least two
      seconds after the last bus reset.  If a "new" device is detected in this
      period whose bus information block and root directory header match that
      of a device which is pending for deletion, we resurrect that device and
      send update calls to highlevel drivers.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3d36a0df
    • S
      firewire: unnecessary BM delay after generation rollover · 8cd0bbbd
      Stefan Richter 提交于
      Noticed by Jarod Wilson:  The bus manager work was unnecessarily delayed
      each time the bus generation counter rolled over.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NJarod Wilson <jwilson@redhat.com>
      8cd0bbbd
    • S
      firewire: insist on successive self ID complete events · a5c7f471
      Stefan Richter 提交于
      The whole topology code only works if the old and new topologies which
      are compared come from immediately successive self ID complete events.
      
      If there happened bus resets without self ID complete events in the
      meantime, or self ID complete events with invalid selfIDs, the topology
      comparison could identify nodes wrongly, or more likely just corrupt
      kernel memory or panic right away.
      
      We now discard all nodes of the old topology and treat all current nodes
      as new ones if the current self ID generation is not the previous one
      plus 1.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: NJarod Wilson <jwilson@redhat.com>
      a5c7f471
  8. 10 1月, 2009 1 次提交
  9. 05 1月, 2009 6 次提交
  10. 10 12月, 2008 1 次提交
  11. 26 11月, 2008 1 次提交
  12. 31 10月, 2008 1 次提交
  13. 26 10月, 2008 6 次提交
  14. 16 10月, 2008 5 次提交
  15. 20 8月, 2008 1 次提交
  16. 03 8月, 2008 1 次提交
    • D
      firewire: Preserve response data alignment bug when it is harmless · 8401d92b
      David Moore 提交于
      Recently, a bug having to do with the alignment of transaction response
      data was fixed.  However, some apps such as libdc1394 relied on the
      presence of that bug in order to function correctly.  In order to stay
      compatible with old versions of those apps, this patch preserves the bug
      in cases where it is harmless to normal operation (such as the single
      quadlet read) due to a simple duplication of data.  This guarantees
      maximum compatability for those users who are using the old app with the
      fixed kernel.
      Signed-off-by: NDavid Moore <dcm@acm.org>
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      8401d92b
  17. 27 7月, 2008 1 次提交
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  18. 26 7月, 2008 2 次提交
  19. 25 7月, 2008 1 次提交