1. 03 1月, 2008 1 次提交
  2. 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
  3. 24 7月, 2007 1 次提交
  4. 19 7月, 2007 1 次提交
  5. 15 7月, 2007 1 次提交
  6. 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
  7. 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
  8. 06 1月, 2007 1 次提交
  9. 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
  10. 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
  11. 06 6月, 2006 1 次提交
  12. 23 3月, 2006 1 次提交
  13. 12 3月, 2006 1 次提交
  14. 28 2月, 2006 2 次提交
  15. 15 1月, 2006 2 次提交
  16. 13 1月, 2006 2 次提交
  17. 16 12月, 2005 1 次提交
  18. 14 12月, 2005 2 次提交
  19. 29 10月, 2005 3 次提交
  20. 15 9月, 2005 1 次提交
  21. 29 8月, 2005 3 次提交
    • J
      [SCSI] convert sr to scsi_execute_req · 820732b5
      James Bottomley 提交于
      This follows almost the identical model to sd, except that there's one
      ioctl which returns raw sense data, so it had to use scsi_execute()
      instead.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      820732b5
    • J
      [SCSI] convert the remaining mid-layer pieces to scsi_execute_req · 1cf72699
      James Bottomley 提交于
      After this, we just have some drivers, all the ULDs and the SPI
      transport class using scsi_wait_req().
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      1cf72699
    • P
      [SCSI] sr.c: Fix getting wrong size · 51490c89
      Pete Zaitcev 提交于
      Here's the problem. Try to do this on 2.6.12:
      - Kill udev and HAL
      - Insert a CD-ROM into a SCSI or USB CD-ROM drive
      - Run dd if=/dev/scd0
      - cat /sys/block/sr0/size
      - Eject the CD, insert a different one
      - Run dd if=/dev/scd0
      This is likely to do "access beyond the end of device", if you let it
      - cat /sys/block/sr0/size
      This shows the size of a previous CD, even though dd was supposed
      to revalidate the device.
      - Run dd if=/dev/scd0
      The second run of dd works correctly!
      
      The bug was introduced in 2.5.31, when Al fixes the recursive opens
      in partitioning. Before, the code worked like this:
      - Block layer called cdrom_open directly
      - cdrom_open called sr_open
      - sr_open called check_disk_change
      - check_disk_change called sr_media_change
      - sr_media_change did cd->needs_disk_change=1
      - before returning sr_open tested cd->needs_disk_change
        and called get_sector_size.
      
      In 2.6.12, the check_disk_change is called from cdrom_open only. Thus:
      - Block layer calls sr_bd_open
      - sr_bd_open calls cdrom_open
      - cdrom_open calls sr_open
      - sr_open tests cd->needs_disk_change, which wasn't set yet; returns
      - cdrom_open calls check_disk_change
      - check_disk_change calls sr_media_change
      - sr_media_change does cd->needs_disk_change=1, but nobody cares
      
      Acked by: Alexander Viro <aviro@redhat.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      51490c89
  22. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4