1. 15 10月, 2009 5 次提交
    • S
      firewire: optimize config ROM creation · 8e85973e
      Stefan Richter 提交于
      The config ROM image of the local node was created in CPU byte order,
      then a temporary big endian copy was created to compute the CRC, and
      finally the card driver created its own big endian copy.
      
      We now generate it in big endian byte order in the first place to avoid
      one byte order conversion and the temporary on-stack copy of the ROM
      image (1000 bytes stack usage in process context).  Furthermore, two
      1000 bytes memset()s are replaced by one 1000 bytes - ROM length sized
      memset.
      
      The trivial fw_memcpy_{from,to}_be32() helpers are now superfluous and
      removed.  The newly added __compute_block_crc() function will be folded
      into fw_compute_block_crc() in a subsequent change.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      8e85973e
    • S
      firewire: cdev: normalize variable names · e21fcf79
      Stefan Richter 提交于
      Unify some names:
        - "e" for pointers to subtypes of struct event,
        - "event" for struct members and pointers to struct event,
        - "r" for pointers to subtypes of struct client_resource,
        - "resource" for struct members and pointers to struct client_resource,
        - other names for struct members and pointers to other types.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e21fcf79
    • S
      firewire: normalize style of queue_work wrappers · 9fb551bf
      Stefan Richter 提交于
      A few stylistic changes to unify some code patterns in the subsystem:
      
        - The similar queue_delayed_work helpers fw_schedule_bm_work,
          schedule_iso_resource, and sbp2_queue_work now have the same call
          convention.
        - Two conditional calls of schedule_iso_resource are factored into
          another small helper.
        - An sbp2_target_get helper is added as counterpart to
          sbp2_target_put.
      
      Object size of firewire-core is decreased a little bit, object size of
      firewire-sbp2 remains unchanged.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      9fb551bf
    • S
      firewire: cdev: fix memory leak in an error path · 7e44c0b5
      Stefan Richter 提交于
      If copy_from_user in an FW_CDEV_IOC_SEND_RESPONSE ioctl failed, an
      inbound_transaction_resource instance is no longer referenced and needs
      to be freed.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      7e44c0b5
    • S
      firewire: sbp2: provide fallback if mgt_ORB_timeout is missing · eaf76e0d
      Stefan Richter 提交于
      The Unit_Characteristics entry of an SBP-2 unit directory is not
      mandatory as far as I can tell.  If it is missing, we would probably
      fail to log in into the target because firewire-sbp2 would not wait for
      status after it sent the login request.
      
      The fix moves the cleanup of tgt->mgt_orb_timeout into a place where it
      is executed exactly once before login, rather than 0..n times depending
      on the target's config ROM.  With targets with one or more
      Unit_Characteristics entries, the result is the same as before.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      eaf76e0d
  2. 12 9月, 2009 6 次提交
  3. 05 9月, 2009 4 次提交
  4. 03 7月, 2009 1 次提交
  5. 26 6月, 2009 1 次提交
    • S
      firewire: core: do not DMA-map stack addresses · 6fdc0370
      Stefan Richter 提交于
      The DMA mapping API cannot map on-stack addresses, as explained in
      Documentation/DMA-mapping.txt.  Convert the two cases of on-stack packet
      payload buffers in firewire-core (payload of lock requests in the bus
      manager work and in iso resource management) to slab-allocated memory.
      
      There are a number on-stack buffers for quadlet write or quadlet read
      requests in firewire-core and firewire-sbp2.  These are harmless; they
      are copied to/ from card driver internal DMA buffers since quadlet
      payloads are inlined with packet headers.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      6fdc0370
  6. 21 6月, 2009 1 次提交
    • S
      firewire: new stack is no longer experimental · 0c53decd
      Stefan Richter 提交于
      The new stack is now recommended over the old one if used for industrial
      video (IIDC/DCAM) or for storage devices (SBP-2) due to better
      performance, improved compatibility, added features, and security.  It
      should also be functionally on par with and is more secure than the old
      ieee1394 stack in the use case of consumer video devices.
      
      IP-over-1394 support for the new stack is currently emerging, and a
      backend of the firedtv DVB driver to the new stack should be available
      soon.
      
      The one remaining area where the old stack is still required are audio
      devices, as the new stack is not yet able to support the FFADO FireWire
      audio framework.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      0c53decd
  7. 17 6月, 2009 4 次提交
  8. 16 6月, 2009 1 次提交
  9. 14 6月, 2009 8 次提交
  10. 07 6月, 2009 3 次提交
  11. 05 6月, 2009 6 次提交
    • S
      firewire: rename source files · e71d31da
      Stefan Richter 提交于
      The source files of firewire-core, firewire-ohci, firewire-sbp2, i.e.
       "drivers/firewire/fw-*.c"
      are renamed to
       "drivers/firewire/core-*.c",
       "drivers/firewire/ohci.c",
       "drivers/firewire/sbp2.c".
      
      The old fw- prefix was redundant to the directory name.  The new core-
      prefix distinguishes the files according to which driver they belong to.
      
      This change comes a little late, but still before further firewire
      drivers are added as anticipated RSN.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e71d31da
    • S
      firewire: reorganize header files · 77c9a5da
      Stefan Richter 提交于
      The three header files of firewire-core, i.e.
       "drivers/firewire/fw-device.h",
       "drivers/firewire/fw-topology.h",
       "drivers/firewire/fw-transaction.h",
      are replaced by
       "drivers/firewire/core.h",
       "include/linux/firewire.h".
      
      The latter includes everything which a firewire high-level driver (like
      firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
      contains the rest which is needed by firewire-core itself and by low-
      level drivers (card drivers) like firewire-ohci.
      
      High-level drivers can now also reside outside of drivers/firewire
      without having to add drivers/firewire to the header file search path in
      makefiles.  At least the firedtv driver will be such a driver.
      
      I also considered to spread the contents of core.h over several files,
      one for each .c file where the respective implementation resides.  But
      it turned out that most core .c files will end up including most of the
      core .h files.  Also, the combined core.h isn't unreasonably big, and it
      will lose more of its contents to linux/firewire.h anyway soon when more
      firewire drivers are added.  (IP-over-1394, firedtv, and there are plans
      for one or two more.)
      
      Furthermore, fw-ohci.h is renamed to ohci.h.  The name of core.h and
      ohci.h is chosen with regard to name changes of the .c files in a
      follow-up change.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      77c9a5da
    • S
      firewire: clean up includes · e8ca9702
      Stefan Richter 提交于
      Include required headers which were only indirectly included.
      Remove unused includes and an unused constant.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e8ca9702
    • S
      firewire: ohci: access bus_seconds atomically · 3dcdc500
      Stefan Richter 提交于
      In the unlikely event that card->driver->get_bus_time() is called during
      a cycle64Seconds interrupt, we could read garbage unless atomic accesses
      are used.
      
      The switch to atomic ops requires to change the 64 seconds counter from
      unsigned to signed, but this shouldn't matter to the end result.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      3dcdc500
    • S
      firewire: also use vendor ID in root directory for driver matches · e41f8d70
      Stefan Richter 提交于
      Due to AV/C protocol extensions, FireDTV devices need a vendor-specific
      driver.  But their configuration ROM features a vendor ID only in the
      root directory, not in the unit directory.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      e41f8d70
    • S
      firewire: share device ID table type with ieee1394 · b3b29888
      Stefan Richter 提交于
      That way, the new firedtv driver will be able to use a single ID table
      in builds against ieee1394 core and/or against firewire core.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      b3b29888