Skip to content
Snippets Groups Projects
  1. May 18, 2010
  2. Apr 19, 2010
  3. Feb 20, 2010
    • Stefan Richter's avatar
      firewire: remove incomplete Bus_Time CSR support · 168cf9af
      Stefan Richter authored
      
      The current implementation of Bus_Time read access was buggy since it
      did not ensure that Bus_Time.second_count_hi and second_count_lo came
      from the same 128 seconds period.
      
      Reported-by: default avatarHåkan Johansson <f96hajo@chalmers.se>
      
      Instead of a fix, remove Bus_Time register support altogether.  The spec
      requires all cycle master capable nodes to implement this (all Linux
      nodes are cycle master capable) while it also says that it "may" be
      initialized by the bus manager or by the IRM standing in for a bus
      manager.  (Neither Linux' firewire-core nor ieee1394 nodemgr implement
      this.)
      
      Since we cannot rely on Bus_Time having been initialized by a bus
      manager, it is better to return an error instead of a nonsensical value
      on a read request to Bus_Time.
      
      Alternatively, we could fix the Bus_Time read integrity bug _and_
      implement (a) cycle master's write support of the register as well as
      (b) bus manager's Bus_Time initialization service, i.e. preservation of
      the Bus_Time when the cycle master node of a bus changes.  However, that
      would be quite some code for a feature that is unreliable to begin with
      and very likely unused in practice.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      168cf9af
  4. Dec 29, 2009
    • Clemens Ladisch's avatar
      firewire: fix use of multiple AV/C devices, allow multiple FCP listeners · db5d247a
      Clemens Ladisch authored
      
      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: default avatarClemens Ladisch <clemens@ladisch.de>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (changelog, rebased, whitespace)
      db5d247a
  5. Oct 31, 2009
  6. Oct 14, 2009
    • Stefan Richter's avatar
      firewire: core: optimize Topology Map creation · cb7c96da
      Stefan Richter authored
      
      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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      cb7c96da
  7. Sep 12, 2009
  8. Jun 14, 2009
  9. Jun 05, 2009
    • Stefan Richter's avatar
      firewire: rename source files · e71d31da
      Stefan Richter authored
      
      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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      e71d31da
    • Stefan Richter's avatar
      firewire: reorganize header files · 77c9a5da
      Stefan Richter authored
      
      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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      77c9a5da
    • Stefan Richter's avatar
      firewire: clean up includes · e8ca9702
      Stefan Richter authored
      
      Include required headers which were only indirectly included.
      Remove unused includes and an unused constant.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      e8ca9702
  10. Mar 24, 2009
  11. Jan 04, 2009
  12. Dec 10, 2008
  13. Oct 15, 2008
  14. Jul 25, 2008
    • Stefan Richter's avatar
      firewire: avoid memleak after phy config transmit failure · c0220d68
      Stefan Richter authored
      
      Use only statically allocated data for PHY config packet transmission.
      With the previous incarnation, some data wouldn't be freed if the packet
      transmit callback was never called.
      
      A theoretical drawback now is that, in PCs with more than one card,
      card A may complete() for a waiter on card B.  But this is highly
      unlikely and its impact not serious.  Bus manager B may reset bus B
      before the PHY config went out, but the next phy config on B should be
      fine.  However, with a timeout of 100ms, this situation is close to
      impossible.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      c0220d68
  15. Jul 14, 2008
  16. Jun 18, 2008
    • Stefan Richter's avatar
      firewire: deadline for PHY config transmission · ae1e5355
      Stefan Richter authored
      If the low-level driver failed to initialize a card properly without
      noticing it, fw-core was blocked indefinitely when trying to send a
      PHY config packet.  This hung up the events kernel thread, e.g. locked
      up keyboard input.
      https://bugzilla.redhat.com/show_bug.cgi?id=444694
      https://bugzilla.redhat.com/show_bug.cgi?id=446763
      
      
      
      This problem was introduced between 2.6.25 and 2.6.26-rc1 by commit
      2a0a2590 "firewire: wait until PHY
      configuration packet was transmitted (fix bus reset loop)".
      
      The solution is to wait with timeout.  I tested it with 7 different
      working controllers and 1 non-working controller.  On the working ones,
      the packet callback complete()s usually --- but not always --- before a
      timeout of 10ms.  Hence I chose a safer timeout of 100ms.
      
      On the few tests with the non-working controller ALi M5271, PHY config
      packet transmission always timed out so far.  (Fw-ohci needs to be fixed
      for this controller independently of this deadline fix.  Often the core
      doesn't even attempt to send a phy config because not even self ID
      reception works.)
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      ae1e5355
    • Stefan Richter's avatar
      firewire: don't panic on invalid AR request buffer · 0bf607c5
      Stefan Richter authored
      
      BUG() at this place is wrong.  (Unless if the low level driver would
      already do higher-level input validation of incoming request headers.)
      
      Invalid incoming requests or bugs in the controller which corrupt the
      AR-req buffer needlessly crashed the box because this is run in tasklet
      context.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      0bf607c5
  17. Apr 18, 2008
  18. Mar 20, 2008
  19. Mar 13, 2008
    • Stefan Richter's avatar
      firewire: endianess annotations · efbf390a
      Stefan Richter authored
      
      Kills warnings from 'make C=1 CHECKFLAGS="-D__CHECK_ENDIAN__" modules':
      
      drivers/firewire/fw-transaction.c:771:10: warning: incorrect type in assignment (different base types)
      drivers/firewire/fw-transaction.c:771:10:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/firewire/fw-transaction.c:771:10:    got restricted unsigned int [usertype] <noident>
      drivers/firewire/fw-transaction.h:93:10: warning: incorrect type in assignment (different base types)
      drivers/firewire/fw-transaction.h:93:10:    expected unsigned int [unsigned] [usertype] <noident>
      drivers/firewire/fw-transaction.h:93:10:    got restricted unsigned int [usertype] <noident>
      drivers/firewire/fw-ohci.c:1490:8: warning: restricted degrades to integer
      drivers/firewire/fw-ohci.c:1490:35: warning: restricted degrades to integer
      drivers/firewire/fw-ohci.c:1516:5: warning: cast to restricted type
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      Signed-off-by: default avatarJarod Wilson <jwilson@redhat.com>
      efbf390a
  20. Jan 30, 2008
Loading