30 Dec, 2009

4 commits

  • Several config ROM related functions only peek at the ROM cache; mark
    their arguments as const pointers. Ditto fw_device.config_rom and
    fw_unit.directory, as the memory behind them is meant to be write-once.

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • Witespace and comment changes, and a different way to say i + 1 < end.

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • The core (sysfs attributes), the firedtv driver, and possible future
    drivers all read strings from some configuration ROM directory. Factor
    out the generic code from show_text_leaf() into a new helper function,
    modified slightly to handle arbitrary buffer sizes.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Stefan Richter

    Clemens Ladisch
     
  • Control of more than one AV/C device at once --- e.g. camcorders, tape
    decks, audio devices, TV tuners --- failed or worked only unreliably,
    depending on driver implementation. This affected kernelspace and
    userspace drivers alike and was caused by firewire-core's inability to
    accept multiple registrations of FCP listeners.

    The fix allows multiple address handlers to be registered for the FCP
    command and response registers. When a request for these registers is
    received, all handlers are invoked, and the Firewire response is
    generated by the core and not by any handler.

    The cdev API does not change, i.e., userspace is still expected to send
    a response for FCP requests; this response is silently ignored.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Stefan Richter (changelog, rebased, whitespace)

    Clemens Ladisch
     

31 Oct, 2009

1 commit

  • I was told that there are obscure architectures with non-coherent DMA
    which may DMA-map to bus address 0. We shall not use 0 as a magic
    number of uninitialized bus address variables.

    The packet->payload_length > 0 test cannot be used either (except in
    at_context_queue_packet) because local requests are not DMA-mapped
    regardless of payload_length. Hence add a state flag to struct
    fw_packet.

    Signed-off-by: Stefan Richter

    Stefan Richter
     

15 Oct, 2009

2 commits

  • 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: Stefan Richter

    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: Stefan Richter

    Stefan Richter
     

12 Sep, 2009

1 commit


26 Jun, 2009

1 commit

  • 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: Stefan Richter

    Stefan Richter
     

14 Jun, 2009

5 commits

  • 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: Stefan Richter

    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: Stefan Richter

    Stefan Richter
     
  • 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: Jay Fenlason
    Signed-off-by: Stefan Richter (rebased, copyright note, changelog)

    Jay Fenlason
     
  • 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: Stefan Richter

    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: Stefan Richter

    Stefan Richter
     

07 Jun, 2009

1 commit


05 Jun, 2009

1 commit

  • 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: Stefan Richter

    Stefan Richter