1. 30 Apr, 2007 1 commit
  2. 17 Apr, 2007 7 commits
    • Michael Tokarev's avatar
      [SCSI] modalias for scsi devices · d7b8bcb0
      Michael Tokarev authored
      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: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      d7b8bcb0
    • Alan Stern's avatar
      [SCSI] sg: cap reserved_size values at max_sectors · 44ec9542
      Alan Stern authored
      This patch (as857) modifies the SG_GET_RESERVED_SIZE and
      SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
      the device's request_queue's max_sectors value.  This will permit
      cdrecord to obtain a legal value for the maximum transfer length,
      fixing Bugzilla #7026.
      
      The patch also caps the initial reserved_size value.  There's no
      reason to have a reserved buffer larger than max_sectors, since it
      would be impossible to use the extra space.
      
      The corresponding ioctls in the block layer are modified similarly,
      and the initial value for the reserved_size is set as large as
      possible.  This will effectively make it default to max_sectors.
      Note that the actual value is meaningless anyway, since block devices
      don't have a reserved buffer.
      
      Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
      uniform way for users to determine the actual max_sectors value for
      any raw SCSI transport.
      Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Acked-by: default avatarJens Axboe <jens.axboe@oracle.com>
      Acked-by: default avatarDouglas Gilbert <dougg@torque.net>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      44ec9542
    • Zachary Amsden's avatar
      [SCSI] BusLogic: stop using check_region · 1079a2d2
      Zachary Amsden authored
      I got so sick of seing the check_region warnings from BusLogic.c I actually
      fixed it properly.  Never use check region, reserve it before the probe
      with request region instead and check the error result; free region if
      setup fails.  Should be functionally identical to the original except for
      fixing the potential race.
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      1079a2d2
    • Bastian Blank's avatar
      [SCSI] tgt: fix rdma transfer bugs · ad1331a7
      Bastian Blank authored
      - ibmstgt hits the max rdma transfer size (128k).
      - libsrp returns a rdma transfer error properly.
      Signed-off-by: default avatarBastian Blank <bastian@waldi.eu.org>
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      ad1331a7
    • Salyzyn, Mark's avatar
      [SCSI] aacraid: fix aacraid not finding device · 4def7fa1
      Salyzyn, Mark authored
      Thanks for the help from Steve Fox and Duane Cox investigating this
      issue, I'd like to report that we found the problem. The issue is with
      the patch Steve Fox isolated below, by not accommodating older adapters
      properly and issuing a command they do not support when retrieving
      storage parameters about the arrays. This simple patch resolves the
      problem (and more accurately mimics the logic of the original code
      before the patch).
      Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      4def7fa1
    • Salyzyn, Mark's avatar
      [SCSI] aacraid: Correct SMC products in aacraid.txt · 144ff8bf
      Salyzyn, Mark authored
      Correct a spelling mistake for the SMC product names (replace 'B' with
      'R') in the Documentation/scsi/aacraid.txt file. This is a follow-up to
      a documentation patch '[PATCH] aacraid: Add SMC and SUN products to
      README' submitted and accepted to scsi-misc-2.6 on March 27 2007.
      Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      144ff8bf
    • Brian King's avatar
      [SCSI] scsi_error.c: Add EH Start Unit retry · ed773e66
      Brian King authored
      Currently, the scsi error handler will issue a START_UNIT
      command if the drive indicates it needs its motor started
      and the allow_restart flag is set in the scsi_device. If,
      after the scsi error handler invokes a host adapter reset
      due to error recovery, a device is in a unit attention
      state AND also needs a START_UNIT, that device will be placed
      offline. The disk array devices on an ipr RAID adapter
      will do exactly this when in a dual initiator configuration.
      This patch adds a single retry to the EH initiated
      START_UNIT.
      Signed-off-by: default avatarBrian King <brking@linux.vnet.ibm.com>
      
      Patch modified and
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      ed773e66
  3. 01 Apr, 2007 31 commits
  4. 21 Mar, 2007 1 commit
    • Salyzyn, Mark's avatar
      [SCSI] aacraid: cleanup and version stamp driver · 802ae2f0
      Salyzyn, Mark authored
      There is some residual cleanup of the last series of patches and the
      need to bump the revision number to draw the line in the sand.
      
      The cmd->SCp.phase is set in the aac_valid_context routine, then set
      again to the same value following it's return. The cmd->scsi_done is set
      twice in the aac_queuecommand routine. Free up the scsidev FILO in
      aac_probe_container as it is not needed further down the function in any
      case. Improve the efficiency of the abort handler kernel print
      parameters. Bump revision number of driver to approximate the equivalent
      in the Adaptec supplied version.
      Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
      802ae2f0