1. 07 2月, 2013 1 次提交
  2. 20 7月, 2012 2 次提交
  3. 10 5月, 2012 1 次提交
  4. 30 10月, 2011 1 次提交
  5. 23 10月, 2010 1 次提交
    • K
      driver core: remove CONFIG_SYSFS_DEPRECATED_V2 but keep it for block devices · 39aba963
      Kay Sievers 提交于
      This patch removes the old CONFIG_SYSFS_DEPRECATED_V2 config option,
      but it keeps the logic around to handle block devices in the old manner
      as some people like to run new kernel versions on old (pre 2007/2008)
      distros.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Stephen Hemminger <shemminger@vyatta.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: David Howells <dhowells@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      39aba963
  6. 11 9月, 2010 1 次提交
  7. 28 7月, 2010 2 次提交
    • A
      [SCSI] implement runtime Power Management · bc4f2401
      Alan Stern 提交于
      This patch (as1398b) adds runtime PM support to the SCSI layer.  Only
      the machanism is provided; use of it is up to the various high-level
      drivers, and the patch doesn't change any of them.  Except for sg --
      the patch expicitly prevents a device from being runtime-suspended
      while its sg device file is open.
      
      The implementation is simplistic.  In general, hosts and targets are
      automatically suspended when all their children are asleep, but for
      them the runtime-suspend code doesn't actually do anything.  (A host's
      runtime PM status is propagated up the device tree, though, so a
      runtime-PM-aware lower-level driver could power down the host adapter
      hardware at the appropriate times.)  There are comments indicating
      where a transport class might be notified or some other hooks added.
      
      LUNs are runtime-suspended by calling the drivers' existing suspend
      handlers (and likewise for runtime-resume).  Somewhat arbitrarily, the
      implementation delays for 100 ms before suspending an eligible LUN.
      This is because there typically are occasions during bootup when the
      same device file is opened and closed several times in quick
      succession.
      
      The way this all works is that the SCSI core increments a device's
      PM-usage count when it is registered.  If a high-level driver does
      nothing then the device will not be eligible for runtime-suspend
      because of the elevated usage count.  If a high-level driver wants to
      use runtime PM then it can call scsi_autopm_put_device() in its probe
      routine to decrement the usage count and scsi_autopm_get_device() in
      its remove routine to restore the original count.
      
      Hosts, targets, and LUNs are not suspended while they are being probed
      or removed, or while the error handler is running.  In fact, a fairly
      large part of the patch consists of code to make sure that things
      aren't suspended at such times.
      
      [jejb: fix up compile issues in PM config variations]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      bc4f2401
    • J
      [SCSI] scsi:hosts.c Fix warning: variable 'rval' set but not used · e4bf25fb
      Justin P. Mattock 提交于
      The below patch fixes a warning message generated by gcc 4.6.0
        CC      drivers/scsi/hosts.o
      drivers/scsi/hosts.c: In function 'scsi_host_alloc':
      drivers/scsi/hosts.c:328:6: warning: variable 'rval' set but not used
      
      Fix this by removing the rval but placing a printk warning where it
      would have been set.
      Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e4bf25fb
  8. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      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: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  9. 27 2月, 2010 1 次提交
    • R
      PM: Allow SCSI devices to suspend/resume asynchronously · 4cb077d9
      Rafael J. Wysocki 提交于
      Set power.async_suspend for all SCSI devices, targets and hosts, so
      that they can be suspended and resumed in parallel with the main
      suspend/resume thread and possibly with other devices they don't
      depend on in a known way (i.e. devices which are not their parents or
      children).
      
      The power.async_suspend flag is also set for devices that don't have
      suspend or resume callbacks, because otherwise they would make the
      main suspend/resume thread wait for their "asynchronous" children
      (during suspend) or parents (during resume), effectively negating the
      possible gains from executing these devices' suspend and resume
      callbacks asynchronously.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      4cb077d9
  10. 05 12月, 2009 1 次提交
  11. 27 11月, 2009 1 次提交
  12. 21 6月, 2009 1 次提交
  13. 13 3月, 2009 1 次提交
  14. 03 1月, 2009 1 次提交
  15. 04 10月, 2008 1 次提交
    • J
      [SCSI] scsi_host_lookup: error returns and NULL pointers · 315cb0ad
      James Smart 提交于
      This patch cleans up the behavior of scsi_host_lookup().
      
      The original implementation attempted to use the dual role of
      either returning a pointer value, or a negative error code.
      User's needed to use IS_ERR() to check the result. Additionally,
      the IS_ERR() macro never checks for when a NULL pointer was
      returned, so a NULL pointer actually passes with a success case.
      Note: scsi_host_get(), used by scsi_host_lookup(), can return
      a NULL pointer.
      
      Talk about a mudhole for the unitiated to step into....
      
      This patch converts scsi_host_lookup() to return either NULL
      or a valid pointer. The consumers were updated for the change.
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      315cb0ad
  16. 22 7月, 2008 2 次提交
  17. 12 7月, 2008 1 次提交
  18. 16 6月, 2008 1 次提交
    • M
      [SCSI] scsi_host regression: fix scsi host leak · 3ed78972
      Mike Christie 提交于
      commit 9c770108
      Author: Dave Young <hidave.darkstar@gmail.com>
      Date:   Tue Jan 22 14:01:34 2008 +0800
      
          scsi: use class iteration api
      
      Isn't a correct replacement for the original hand rolled host
      lookup. The problem is that class_find_child would get a reference to
      the host's class device which is never released.  Since the host class
      device holds a reference to the host gendev, the host can never be
      freed.
      
      In 2.6.26 we started using class_find_device, and this function also
      gets a reference to the device, so we end up with an extra ref
      and the host will not get released.
      
      This patch adds a put_device to balance the class_find_device() get. I
      kept the scsi_host_get in scsi_host_lookup, because the target layer
      is using scsi_host_lookup and it looks like it needs the SHOST_DEL
      check.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      3ed78972
  19. 28 4月, 2008 1 次提交
    • J
      [SCSI] fix SLUB WARN_ON · 542bd137
      James Bottomley 提交于
      We're getting a WARN_ON from SLUB indicating that we're trying to free
      caches with in-use objects.  The root cause is a new dependency in the
      command/sense free on unchecked_isa_dma.  The WARN_ON is caused by
      drivers which change this in their setup after the command/sense cache
      is allocated.
      
      The fix is to move the allocation of this cache into scsi_add_host()
      so things like gdth have an opportunity to modify it between alloc and
      add (but *not* after).
      
      The true fix would be to move unchecked_isa_dma into the template and
      out of the host, so it because a truly read only variable.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      542bd137
  20. 23 4月, 2008 2 次提交
  21. 20 4月, 2008 1 次提交
  22. 08 4月, 2008 1 次提交
  23. 28 3月, 2008 1 次提交
  24. 31 1月, 2008 1 次提交
    • J
      [SCSI] remove use_sg_chaining · d3f46f39
      James Bottomley 提交于
      With the sg table code, every SCSI driver is now either chain capable
      or broken (or has sg_tablesize set so chaining is never activated), so
      there's no need to have a check in the host template.
      
      Also tidy up the code by moving the scatterlist size defines into the
      SCSI includes and permit the last entry of the scatterlist pools not
      to be a power of two.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      d3f46f39
  25. 25 1月, 2008 1 次提交
  26. 24 1月, 2008 2 次提交
  27. 12 1月, 2008 1 次提交
  28. 18 10月, 2007 1 次提交
  29. 16 10月, 2007 1 次提交
  30. 13 10月, 2007 1 次提交
    • F
      [SCSI] add supported_mode and active_mode attributes to the host · 5dc2b89e
      FUJITA Tomonori 提交于
      This adds supported_mode and active_mode attributes to
      /sys/class/sys_host/hostX/ for specifying the mode that a lld supports
      and the currently activated mode. The output format is similar to fc
      rport roles:
      
      luce:/sys/class/scsi_host/host0$ cat supported_mode
      Initiator
      luce:/sys/class/scsi_host/host0$ cat active_mode
      Initiator
      
      The mode values uses bitmap since we would support dual-mode llds in
      the future like this:
      
      luce:/sys/class/scsi_host/host0$ cat supported_mode
      Initiator, Target
      
      The supported_mode attribute looks at a scsi_host_template and the
      active_mode attribute looks at a scsi_host. We would add a hook to a
      scsi_host_template to change the active_mode attribute
      dynamically. But now there is no hook since no lld supports that
      feature.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      5dc2b89e
  31. 01 8月, 2007 1 次提交
  32. 28 4月, 2007 1 次提交
  33. 26 11月, 2006 1 次提交
    • F
      [SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs · b58d9154
      FUJITA Tomonori 提交于
      This patch contains the needed changes to the scsi-ml for the target
      mode support.
      
      Note, per the last review we moved almost all the fields we added
      to the scsi_cmnd to our internal data structure which we are going
      to try and kill off when we can replace it with support from other
      parts of the kernel.
      
      The one field we left on was the offset variable. This is needed to handle
      the case where the target gets request that is so large that it cannot
      execute it in one dma operation. So max_secotors or a segment limit may
      limit the size of the transfer. In this case our tgt core code will
      break up the command into managable transfers and send them to the
      LLD one at a time. The offset is then used to tell the LLD where in
      the command we are at. Is there another field on the scsi_cmd for
      that?
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      b58d9154
  34. 16 11月, 2006 1 次提交
  35. 31 8月, 2006 1 次提交