1. 20 10月, 2007 1 次提交
  2. 16 10月, 2007 1 次提交
  3. 13 10月, 2007 2 次提交
    • M
      [SCSI] Get rid of scsi_cmnd->done · 6f5391c2
      Matthew Wilcox 提交于
      The ULD ->done callback moves into the scsi_driver.  By moving the call
      to scsi_io_completion() from scsi_blk_pc_done() to scsi_finish_command(),
      we can eliminate the latter entirely.  By returning 'good_bytes' from
      the ->done callback (rather than invoking scsi_io_completion()), we can
      stop exporting scsi_io_completion().
      
      Also move the prototypes from sd.h to sd.c as they're all internal anyway.
      Rename sd_rw_intr to sd_done and rw_intr to sr_done.
      Inspired-by: NChristoph Hellwig <hch@infradead.org>
      Signed-off-by: NMatthew Wilcox <willy@linux.intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6f5391c2
    • J
      [SCSI] move ULD attachment into the prep function · 7f9a6bc4
      James Bottomley 提交于
      One of the intents of the block prep function was to allow ULDs to use
      it for preprocessing.  The original SCSI model was to have a single prep
      function and add a pointer indirect filter to build the necessary
      commands.  This patch reverses that, does away with the init_command
      field of the scsi_driver structure and makes ULDs attach directly to the
      prep function instead.  The value is really that it allows us to begin
      to separate the ULDs from the SCSI mid layer (as long as they don't use
      any core functions---which is hard at the moment---a ULD doesn't even
      need SCSI to bind).
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      7f9a6bc4
  4. 04 8月, 2007 1 次提交
  5. 24 7月, 2007 1 次提交
  6. 16 7月, 2007 1 次提交
  7. 24 5月, 2007 1 次提交
  8. 23 5月, 2007 1 次提交
  9. 18 4月, 2007 1 次提交
    • M
      [SCSI] modalias for scsi devices · d7b8bcb0
      Michael Tokarev 提交于
      The following patch adds support for sysfs/uevent modalias
      attribute for scsi devices (like disks, tapes, cdroms etc),
      based on whatever current sd.c, sr.c, st.c and osst.c drivers
      supports.
      
      The modalias format is like this:
      
       scsi:type-0x04
      
      (for TYPE_WORM, handled by sr.c now).
      
      Several comments.
      
      o This hexadecimal type value is because all TYPE_XXX constants
        in include/scsi/scsi.h are given in hex, but __stringify() will
        not convert them to decimal (so it will NOT be scsi:type-4).
        Since it does not really matter in which format it is, while
        both modalias in module and modalias attribute match each other,
        I descided to go for that 0x%02x format (and added a comment in
        include/scsi/scsi.h to keep them that way), instead of changing
        them all to decimal.
      
      o There was no .uevent routine for SCSI bus.  It might be a good
        idea to add some more ueven environment variables in there.
      
      o osst.c driver handles tapes too, like st.c, but only SOME tapes.
        With this setup, hotplug scripts (or whatever is used by the
        user) will try to load both st and osst modules for all SCSI
        tapes found, because both modules have scsi:type-0x01 alias).
        It is not harmful, but one extra module is no good either.
        It is possible to solve this, by exporting more info in
        modalias attribute, including vendor and device identification
        strings, so that modalias becomes something like
          scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive
        and having that, match for all 3 attributes, not only device
        type.  But oh well, vendor and device strings may be large,
        and they do contain spaces and whatnot.
        So I left them for now, awaiting for comments first.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d7b8bcb0
  10. 21 3月, 2007 3 次提交
  11. 12 3月, 2007 3 次提交
  12. 17 2月, 2007 1 次提交
  13. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  14. 03 2月, 2007 1 次提交
    • N
      [SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash · 017f2e37
      Nagendra Singh Tomar 提交于
      	sd_probe() calls class_device_add() even before initializing the
      sdkp->device variable. class_device_add() eventually results in the user mode
      udev program to be called. udev program can read the the allow_restart
      attribute of the newly created scsi device. This is resulting in a crash as
      the show function for allow_restart (i.e sd_show_allow_restart) returns the
      attribute value by reading the sdkp->device->allow_restart variable. As the
      sdkp->device is not initialized before calling the user mode hotplug helper,
      this results in a crash.
      	The patch below solves it by calling class_device_add() only after the
      necessary fields in the scsi_disk structure are initialized properly.
      Signed-off-by: NNagendra Singh Tomar <nagendra_tomar@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      017f2e37
  15. 09 12月, 2006 1 次提交
  16. 16 11月, 2006 2 次提交
  17. 05 10月, 2006 1 次提交
  18. 01 10月, 2006 1 次提交
    • J
      [PATCH] Split struct request ->flags into two parts · 4aff5e23
      Jens Axboe 提交于
      Right now ->flags is a bit of a mess: some are request types, and
      others are just modifiers. Clean this up by splitting it into
      ->cmd_type and ->cmd_flags. This allows introduction of generic
      Linux block message types, useful for sending generic Linux commands
      to block devices.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      4aff5e23
  19. 03 9月, 2006 1 次提交
  20. 10 7月, 2006 1 次提交
    • C
      [SCSI] hide EH backup data outside the scsi_cmnd · 631c228c
      Christoph Hellwig 提交于
      Currently struct scsi_cmnd has various fields that are used to backup
      original data after the corresponding fields have been overridden for
      EH commands.  This means drivers can easily get at it and misuse it.
      Due to the old_ naming this doesn't happen for most of them, but two
      that have different names have been used wrong a lot (see previous
      patch).  Another downside is that they unessecarily bloat the scsi_cmnd
      size.
      
      This patch moves them onstack in scsi_send_eh_cmnd to fix those two
      issues aswell as allowing future EH fixes like moving the EH command
      submissions to use SG lists like everything else.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      631c228c
  21. 01 7月, 2006 1 次提交
  22. 29 6月, 2006 1 次提交
    • B
      [SCSI] scsi: Add allow_restart sysfs class attribute · a144c5ae
      Brian King 提交于
      This is a resend of a patch I generated in response to an email sent
      by Ruben Faelens <parasietje@gmail.com>. His original email to
      linux-scsi requested a method in which he could spin down a scsi disk
      when not in use and have the kernel automatically spin it back up when
      an I/O was generated to the disk. The infrastructure to automatically
      spin a disk up has been in the scsi error handler for some time now,
      but it is not enabled by default. This patch adds an sd sysfs attribute
      which allows userspace to enable this behavior.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a144c5ae
  23. 26 6月, 2006 1 次提交
    • L
      [SCSI] sd/scsi_lib simplify sd_rw_intr and scsi_io_completion · 03aba2f7
      Luben Tuikov 提交于
      This patch simplifies "good_bytes" computation in sd_rw_intr().
      sd: "good_bytes" computation is always done in terms of the resolution
      of the device's medium, since after that it is the number of good bytes
      we pass around and other layers/contexts (as opposed ot sd) can translate
      that to their own resolution (block layer:512).  It also makes
      scsi_io_completion() processing more straightforward, eliminating the
      3rd argument to the function.
      
      It also fixes a couple of bugs like not checking return value,
      using "break" instead of "return;", etc.
      
      I've been running with this patch for some time now on a
      test (do-it-all) system.
      Signed-off-by: NLuben Tuikov <ltuikov@yahoo.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      03aba2f7
  24. 10 6月, 2006 1 次提交
  25. 06 6月, 2006 1 次提交
  26. 26 3月, 2006 1 次提交
  27. 20 3月, 2006 1 次提交
  28. 12 3月, 2006 1 次提交
  29. 28 2月, 2006 3 次提交
  30. 27 2月, 2006 1 次提交
  31. 15 1月, 2006 1 次提交
  32. 13 1月, 2006 1 次提交