Skip to content
Snippets Groups Projects
  1. Aug 05, 2010
  2. Jul 13, 2010
  3. Jun 19, 2010
    • Stefan Richter's avatar
      ieee1394: remove unused variables · 5030c807
      Stefan Richter authored
      
      which caused gcc 4.6 to warn about
          variable 'XYZ' set but not used.
      
      sbp2.c, unit_characteristics:
      
      The underlying problem which was spotted here --- an incomplete
      implementation --- is already 50% fixed in drivers/firewire/sbp2.c which
      observes mgt_ORB_timeout but not yet ORB_size.
      
      raw1394.c, length_conflict; dv1394.c, ts_off:
      
      Impossible to tell why these variables are there.  We can safely remove
      them though because we don't need a compiler warning to realize that we
      are dealing with (at least stylistically) flawed code here.
      
      dv1394.c, packet_time:
      
      This was used in debug macro that is only compiled in with
      DV1394_DEBUG_LEVEL >= 2 defined at compile-time.  Just drop it since
      nobody debugs dv1394 anymore.  Avoids noise in regular kernel builds.
      
      dv1394.c, ohci; eth1394.c, priv:
      
      These variables clearly can go away.  Somebody wanted to use them but
      then didn't (or not anymore).
      
      Note, all of this code is considered to be at its end of life and is
      thus not really meant to receive janitorial updates anymore.  But if we
      can easily remove noisy warnings from kernel builds, we should.
      
      Reported-by: default avatarJustin P. Mattock <justinmattock@gmail.com>
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      5030c807
  4. May 31, 2010
  5. Apr 10, 2010
    • Stefan Richter's avatar
      ieee1394: mark char device files as not seekable · 7cfe21aa
      Stefan Richter authored
      
      The
        - raw1394   (/dev/raw1394),
        - video1394 (/dev/video1394/*),
        - dv1394    (/dev/dv1394/*)
      character device file ABIs do not make any use of lseek(), pread(), or
      pwrite().  Therefore use nonseekable_open() and, redundantly, set
      file_operations.llseek to no_llseek to remove any doubt whether the BKL-
      grabbing default_llseek handler is used.
      
      Although all this is legacy code which should be left in peace until it
      is eventually removed (as it is superseded by firewire-core's
      <linux/firewire-cdev.h> ABI), this change seems still worth doing to
      further minimize the presence of BKL usage in the kernel.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      7cfe21aa
  6. Mar 30, 2010
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  7. Mar 07, 2010
    • Greg Kroah-Hartman's avatar
      Driver core: create lock/unlock functions for struct device · 8e9394ce
      Greg Kroah-Hartman authored
      
      In the future, we are going to be changing the lock type for struct
      device (once we get the lockdep infrastructure properly worked out)  To
      make that changeover easier, and to possibly burry the lock in a
      different part of struct device, let's create some functions to lock and
      unlock a device so that no out-of-core code needs to be changed in the
      future.
      
      This patch creates the device_lock/unlock/trylock() functions, and
      converts all in-tree users to them.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean Delvare <khali@linux-fr.org>
      Cc: Dave Young <hidave.darkstar@gmail.com>
      Cc: Ming Lei <tom.leiming@gmail.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Len Brown <len.brown@intel.com>
      Cc: Magnus Damm <damm@igel.co.jp>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Cc: Vegard Nossum <vegard.nossum@gmail.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Alex Chiang <achiang@hp.com>
      Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andrew Patterson <andrew.patterson@hp.com>
      Cc: Yu Zhao <yu.zhao@intel.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Samuel Ortiz <sameo@linux.intel.com>
      Cc: Wolfram Sang <w.sang@pengutronix.de>
      Cc: CHENG Renquan <rqcheng@smu.edu.sg>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: David Vrabel <david.vrabel@csr.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      8e9394ce
  8. Feb 26, 2010
  9. Feb 05, 2010
  10. Dec 29, 2009
    • Stefan Richter's avatar
      firewire, ieee1394: update Kconfig help · 5d7db049
      Stefan Richter authored
      
      Update the Kconfig help texts of both stacks to encourage a general move
      from the older to the newer drivers.  However, do not label ieee1394 as
      "Obsolete" yet, as the newer drivers have not been deployed as default
      stack in the majority of Linux distributions yet, and those who start
      doing so now may still want to install the old drivers as fallback for
      unforeseen issues.
      
      Since Linux 2.6.32, FireWire audio devices can be driven by the newer
      firewire driver stack too, hence remove an outdated comment about audio
      devices.  Also remove comments about library versions since the 2nd
      generation of libraw1394 and libdc1394 is now in common use; details on
      library versions can be read at the wiki link from the help texts.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      5d7db049
  11. Dec 04, 2009
  12. Nov 18, 2009
  13. Oct 11, 2009
  14. Sep 27, 2009
  15. Sep 12, 2009
  16. Sep 03, 2009
  17. Sep 02, 2009
  18. Sep 01, 2009
  19. Jul 02, 2009
  20. Jun 21, 2009
    • Stefan Richter's avatar
      firewire: new stack is no longer experimental · 0c53decd
      Stefan Richter authored
      
      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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      0c53decd
  21. Jun 15, 2009
  22. Jun 14, 2009
  23. Jun 11, 2009
    • Theodore Ts'o's avatar
      fs: Remove i_cindex from struct inode · 9fd5746f
      Theodore Ts'o authored
      
      The only user of the i_cindex element in the inode structure is used
      is by the firewire drivers.  As part of an attempt to slim down the
      inode structure to save memory --- since a typical Linux system will
      have hundreds of thousands if not millions of inodes cached, a
      reduction in the size inode has high leverage.
      
      The firewire driver does not need i_cindex in any fast path, so it's
      simple enough to calculate when it is needed, instead of wasting space
      in the inode structure.
      
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: krh@redhat.com
      Cc: stefanr@s5r6.in-berlin.de
      Cc: linux-fsdevel@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      9fd5746f
  24. Apr 07, 2009
  25. Mar 24, 2009
  26. Mar 16, 2009
    • Jonathan Corbet's avatar
      Rationalize fasync return values · 60aa4924
      Jonathan Corbet authored
      
      Most fasync implementations do something like:
      
           return fasync_helper(...);
      
      But fasync_helper() will return a positive value at times - a feature used
      in at least one place.  Thus, a number of other drivers do:
      
           err = fasync_helper(...);
           if (err < 0)
                   return err;
           return 0;
      
      In the interests of consistency and more concise code, it makes sense to
      map positive return values onto zero where ->fasync() is called.
      
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      60aa4924
  27. Feb 26, 2009
    • Linus Torvalds's avatar
      Make ieee1394_init a fs-initcall · 86883c27
      Linus Torvalds authored
      
      It needs to happen before any firewire driver actually registers itself,
      and that was previously handled by having the Makefile list the core
      ieee1394 files before the drivers.
      
      But now there are firewire drivers in drivers/media, and the Makefile
      games aren't enough.  So just make ieee1394_init happen earlier in the
      init sequence, the way all other bus layers already do.
      
      Reported-and-tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Henrik Kurelid <henrik@kurelid.se>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Ben Backx <ben@bbackx.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      86883c27
  28. Feb 24, 2009
    • Stefan Richter's avatar
      ieee1394: remove superfluous assertions · 00fc3072
      Stefan Richter authored
      
      hpsb_read, hpsb_write, hpsb_lock are sleeping functions which nobody is
      in danger to use in atomic context.  Besides, in_interrupt does not
      cover all types of atomic context.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      00fc3072
    • Stefan Richter's avatar
      ieee1394: inherit ud vendor_id from node vendor_id · 9c939e4d
      Stefan Richter authored
      
      While Module_Vendor_ID in the configuration ROM's root directory is
      mandatory, there often aren't vendor IDs in unit directories.  This
      affects the new firedtv driver which is meant to be auto-loaded and
      matched only for vendor-specific devices.
      
      We now always copy ne->vendor_id into ud->vendor_id before we scan a
      unit directory (and fill in a possibly present vendor ID from there).
      This way, the root directory's vendor ID is used as fallback in the
      "uevent" environment for modprobe'ing per module alias when a node was
      plugged in, and in the driver match routine when protocol drivers are
      bound to unit directories.  It will however not be used as sysfs
      attribute of a unit directory device.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      9c939e4d
    • Stefan Richter's avatar
      ieee1394: add hpsb_node_read() and hpsb_node_lock() · b33fdd6c
      Stefan Richter authored
      
      These will be used by the firedtv driver.  Like hpsb_node_write() they
      are much better APIs for high-level drivers than hpsb_write() and its
      siblings --- easier to use correctly and also terser.
      
      Unlike hspb_node_write(), the two new functions will only be used by
      one call site.  Hence make them static inline instead of exported
      symbols.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      b33fdd6c
    • Stefan Richter's avatar
      ieee1394: use correct barrier types between accesses of nodeid and generation · 29f8ea8a
      Stefan Richter authored
      
      A compiler barrier (explicit on the read side, implicit on the write
      side) is not quite enough for what has to be accomplished here.  Use
      hardware memory barriers on systems which need them.
      
      (Of course a full fix of generation handling would require much more
      than this.  The ieee1394 core's bus generation counter had to be tied to
      the controller's bus generation counter; cf. Kristian's stack.  It's
      just that I have other current business with the code around these
      barrier()s, so why not do at least this small fix.)
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      29f8ea8a
    • Stefan Richter's avatar
      firesat: copyrights, rename to firedtv, API conversions, fix remote control input · 612262a5
      Stefan Richter authored
      
      Combination of the following changes:
      
      Tue, 26 Aug 2008 00:17:30 +0200 (CEST)
      firedtv: fix remote control input
      
          and update the scancode-to-keycode mapping to a current model.  Per
          default, various media key keycodes are emitted which closely match what
          is printed on the remote.  Userland can modify the mapping by means of
          evdev ioctls.  (Not tested.)
      
          The old scancode-to-keycode mapping is left in the driver but cannot be
          modified by ioctls.  This preserves status quo for old remotes.
      
      Tue, 26 Aug 2008 00:11:28 +0200 (CEST)
      firedtv: replace tasklet by workqueue job
      
          Non-atomic context is a lot nicer to work with.
      
      Sun, 24 Aug 2008 23:30:00 +0200 (CEST)
      firedtv: move some code back to ieee1394 core
      
          Partially reverts "ieee1394: remove unused code" of Linux 2.6.25.
      
      Sun, 24 Aug 2008 23:29:30 +0200 (CEST)
      firedtv: replace semaphore by mutex
      
          firesat->avc_sem and ->demux_sem have been used exactly like a mutex.
          The only exception is the schedule_remotecontrol tasklet which did a
          down_trylock in atomic context.  This is not possible with
          mutex_trylock; however the whole remote control related code is
          non-functional anyway at the moment.  This should be fixed eventually,
          probably by turning the tasklet into a worqueue job.
      
          Convert everything else from semaphore to mutex.
      
          Also rewrite a few of the affected functions to unlock the mutex at a
          single exit point, instead of in several branches.
      
      Sun, 24 Aug 2008 23:28:45 +0200 (CEST)
      firedtv: some header cleanups
      
          Unify #ifndef/#define/#endif guards against multiple inclusion.
          Drop extern keyword from function declarations.
          Remove #include's into header files where struct declarations suffice.
      
          Remove unused ohci1394 interface and related unused ieee1394 interfaces.
      
          Add a few missing #include's and remove a few apparently obsolete ones.
          Sort them alphabetically.
      
      Sun, 24 Aug 2008 23:27:45 +0200 (CEST)
      firedtv: nicer registration message and some initialization fixes
      
          Print the correct name in dvb_register_adapter().
      
          While we are at it, replace two switch cascades by one for loop, remove
          a superfluous member of struct firesat and of two unused arguments of
          AVCIdentifySubunit(), and fix bogus kfree's in firesat_dvbdev_init().
      
      Tue, 26 Aug 2008 14:24:17 +0200 (CEST)
      firesat: rename to firedtv
      
          Suggested by Andreas Monitzer.  Besides DVB-S/-S2 receivers, the driver
          also supports DVB-C and DVB-T receivers, hence the previous project name
          is too narrow now.
      
          Not yet done:  Rename source directory, files, types, variables...
      
      Sun, 24 Aug 2008 23:26:23 +0200 (CEST)
      firesat: add missing copyright notes
      
          Reported by Andreas Monitzer and Christian Dolzer.
      
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      612262a5
  29. Feb 06, 2009
  30. Jan 29, 2009
Loading