1. 15 10月, 2009 2 次提交
    • S
      firewire: core: optimize Topology Map creation · cb7c96da
      Stefan Richter 提交于
      The Topology Map of the local node was created in CPU byte order,
      then a temporary big endian copy was created to compute the CRC,
      and when a read request to the Topology Map arrived it had to be
      converted to big endian byte order again.
      
      We now generate it in big endian byte order in the first place.
      This also rids us of 1000 bytes stack usage in tasklet context.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      cb7c96da
    • 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
  2. 12 9月, 2009 1 次提交
  3. 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
  4. 14 6月, 2009 5 次提交
    • S
      firewire: net: allow for unordered unit discovery · 5a124d38
      Stefan Richter 提交于
      Decouple the creation and destruction of the net_device from the order
      of discovery and removal of nodes with RFC 2734 unit directories since
      there is no reliable order.  The net_device is now created when the
      first RFC 2734 unit on a card is discovered, and destroyed when the last
      RFC 2734 unit on a card went away.  This includes all remote units as
      well as the local unit, which is therefore tracked as a peer now too.
      
      Also, locking around the list of peers is slightly extended to guard
      against peer removal.  As a side effect, fwnet_peer.pdg_lock has become
      superfluous and is deleted.
      
      Peer data (max_rec, speed, node ID, generation) are updated more
      carefully.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      5a124d38
    • S
      firewire: net: style changes · f91e3bd8
      Stefan Richter 提交于
      Change names of types, variables, functions.
      Omit debug code.
      Use get_unaligned*, put_unaligned*.
      Annotate big endian data.
      Handle errors in __init.
      Change whitespace.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      f91e3bd8
    • J
      firewire: add IPv4 support · c76acec6
      Jay Fenlason 提交于
      Implement IPv4 over IEEE 1394 as per RFC 2734 for the newer firewire
      stack.  This feature has only been present in the older ieee1394 stack
      via the eth1394 driver.
      
      Still to do:
        - fix ipv4_priv and ipv4_node lifetime logic
        - fix determination of speeds and max payloads
        - fix bus reset handling
        - fix unaligned memory accesses
        - fix coding style
        - further testing/ improvement of fragment reassembly
        - perhaps multicast support
      Signed-off-by: NJay Fenlason <fenlason@redhat.com>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (rebased, copyright note, changelog)
      c76acec6
    • S
      firewire: core: use more outbound tlabels · 1e626fdc
      Stefan Richter 提交于
      Tlabel is a 6 bits wide datum.  Wrap it after 63 rather than 31 for more
      safety against transaction label exhaustion and potential responders'
      transaction layer bugs.  (As noted by Guus Sliepen, this change requires
      an expansion of tlabel_mask to 64 bits.)
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      1e626fdc
    • S
      firewire: core: don't update Broadcast_Channel if RFC 2734 conditions aren't met · 837ec787
      Stefan Richter 提交于
      This extra check will avoid Broadcast_Channel register related traffic
      to many IIDC, SBP-2, and AV/C devices which aren't IRMC or have a
      max_rec < 8 (i.e. support < 512 bytes async payload).  This avoids a
      little bit of traffic after bus reset and is even more careful with
      devices which don't implement this CSR.
      
      The assumption is that no other protocol than IP over 1394 uses the
      broadcast channel for streams.
      Signed-off-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      837ec787
  5. 07 6月, 2009 1 次提交
  6. 05 6月, 2009 1 次提交
    • 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