16 Jul, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (102 commits)
    [SCSI] scsi_dh: fix kconfig related build errors
    [SCSI] sym53c8xx: Fix bogus sym_que_entry re-implementation of container_of
    [SCSI] scsi_cmnd.h: remove double inclusion of linux/blkdev.h
    [SCSI] make struct scsi_{host,target}_type static
    [SCSI] fix locking in host use of blk_plug_device()
    [SCSI] zfcp: Cleanup external header file
    [SCSI] zfcp: Cleanup code in zfcp_erp.c
    [SCSI] zfcp: zfcp_fsf cleanup.
    [SCSI] zfcp: consolidate sysfs things into one file.
    [SCSI] zfcp: Cleanup of code in zfcp_aux.c
    [SCSI] zfcp: Cleanup of code in zfcp_scsi.c
    [SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
    [SCSI] zfcp: Small QDIO cleanups
    [SCSI] zfcp: Adapter reopen for large number of unsolicited status
    [SCSI] zfcp: Fix error checking for ELS ADISC requests
    [SCSI] zfcp: wait until adapter is finished with ERP during auto-port
    [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
    [SCSI] sg: Add target reset support
    [SCSI] lib: Add support for the T10 (SCSI) Data Integrity Field CRC
    [SCSI] sd: Move scsi_disk() accessor function to sd.h
    ...

    Linus Torvalds
     

12 Jul, 2008

1 commit

  • Seen:

    kernel BUG at arch/i386/lib/usercopy.c:872

    under a 2.6.18-8.el5 kernel. Traced it to a garbage-in/garbage-out
    ioctl condition in the aacraid driver.

    Adaptec's special ioctl scb passthrough needs to check the validity of
    the individual scatter gather count fields to the maximum the adapter
    supports. Doing so will have the side effect of preventing
    copy_from_user() from bugging out while populating the dma buffers.
    This is a hardening effort, issue was triggered by an errant version
    of the management tools and thus the BUG should not be seen in the
    field.

    [jejb: fixed up compile failure]
    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Mark Salyzyn
     

21 Jun, 2008

1 commit


05 Jun, 2008

1 commit


03 May, 2008

3 commits

  • For firmware that supports the feature(s), add the ability to start or
    stop an array using the associated SCSI commands, to automatically
    manage the spin-up of an array on new I/O reporting back the
    appropriate check conditions and actions in cooperation with the
    normal timeout mechanisms and enable the blackout period management in
    the Firmware associated with the background spin-down of the arrays
    when the Firmware times out and deems the arrays as idle.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Mark Salyzyn
     
  • As JBOD devices (really just Simple Single Drive Volumes exported to
    the SCSI channel) are managed, they fail to update correctly when the
    driver triggers a SCSI scan. In addition, the ability to change
    multiple arrays or JBODs at the same time was resulting in dropped
    scans, set up a mechanism to issue a list of single target scans on a
    single configuration change notification from the Firmware.

    Performed some additional sundry cosmetic code style cleanups.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Mark Salyzyn
     
  • On some compile environments, warnings are produced regarding the
    usage of aac_logical_to_phys macro.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Mark Salyzyn
     

02 May, 2008

1 commit

  • On Apr 21, 2008, at 8:42 PM, Yinghai Lu wrote:
    > bisected to:
    >
    > commit e6990c6448ca9359b6d4ad027c0a6efbf4379e64
    > Author: Mark Salyzyn
    > Date: Mon Apr 14 14:20:16 2008 -0400
    >
    > [SCSI] aacraid: Fix down_interruptible() to check the return value

    The return value for down_interruptible was incorrectly checked!
    updated patch enclosed.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Mark Salyzyn
     

22 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
    SCSI: convert struct class_device to struct device
    DRM: remove unused dev_class
    IB: rename "dev" to "srp_dev" in srp_host structure
    IB: convert struct class_device to struct device
    memstick: convert struct class_device to struct device
    driver core: replace remaining __FUNCTION__ occurrences
    sysfs: refill attribute buffer when reading from offset 0
    PM: Remove destroy_suspended_device()
    Firmware: add iSCSI iBFT Support
    PM: Remove legacy PM (fix)
    Kobject: Replace list_for_each() with list_for_each_entry().
    SYSFS: Explicitly include required header file slab.h.
    Driver core: make device_is_registered() work for class devices
    PM: Convert wakeup flag accessors to inline functions
    PM: Make wakeup flags available whenever CONFIG_PM is set
    PM: Fix misuse of wakeup flag accessors in serial core
    Driver core: Call device_pm_add() after bus_add_device() in device_add()
    PM: Handle device registrations during suspend/resume
    block: send disk "change" event for rescan_partitions()
    sysdev: detect multiple driver registrations
    ...

    Fixed trivial conflict in include/linux/memory.h due to semaphore header
    file change (made irrelevant by the change to mutex).

    Linus Torvalds
     

20 Apr, 2008

1 commit


19 Apr, 2008

2 commits


16 Apr, 2008

2 commits


08 Apr, 2008

3 commits

  • replace all:
    little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
    expression_in_cpu_byteorder);
    with:
    leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
    generated with semantic patch

    Signed-off-by: Marcin Slusarz
    Acked-by: "Salyzyn, Mark"
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Marcin Slusarz
     
  • This replaces aac_internal_transfer with scsi_sg_copy_to/from_buffer.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • When aacraid spoofs READ_CAPACITY_16, it assumes that the data length
    in the sg list is equal to allocation length in cdb. But sg can put
    any value in scb so the driver needs to check both the data length in
    the sg list and allocation length in cdb.

    If allocation length is larger than the response length that the
    driver expects, it clears the data buffer in the sg list to zero but
    it doesn't need to do. Just setting resid is fine.

    Signed-off-by: FUJITA Tomonori
    Acked-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     

12 Feb, 2008

3 commits


08 Feb, 2008

3 commits

  • Luben Tuikov [mailto:ltuikov@yahoo.com] sez:
    > Just as in your case and Tony's case, which I presume
    > uses the same RAID firmware vendor, it would've
    > probably been better if the RAID firmware vendor
    > fixed the firmware to not set the VALID bit if the
    > INFORMATION field is not valid.

    Point taken regarding the aacraid driver. Dropped the VALID bit, and
    then did some cleanup/simplification of the set_sense procedure and
    the associated parameters. Mike did some preliminary tests when the
    VALID bit was dropped before the 'Re: [PATCH] [SCSI] sd: make error
    handling more robust' patches came on the scene. The change in the
    SCSI subsystem does make this enclosed aacraid patch unnecessary, so
    this aacraid patch is merely post battle ground cleanup. If the
    simplification is an issue, repugnant, too much for a back-port to the
    stable trees or clouds the point, this patch could be happily
    distilled down to:

    diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
    --- a/drivers/scsi/aacraid/aachba.c 2008-02-06 16:26:45.834938955 -0500
    +++ b/drivers/scsi/aacraid/aachba.c 2008-02-06 16:32:01.109035329 -0500
    @@ -865,7 +865,7 @@
    u32 residue)
    {
    - sense_buf[0] = 0xF0; /* Sense data valid, err code 70h (current error) */
    + sense_buf[0] = 0x70; /* Sense data invalid, err code 70h (current error) */
    sense_buf[1] = 0; /* Segment number, always zero */

    if (incorrect_length) {

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • This patch ensures that the modern adapters get a maximum sg segment
    size on par with the maximum transfer size. Added some localized
    janitor fixes to the discussion patch I used with Fujita.

    FUJITA Tomonori [mailto:fujita.tomonori@lab.ntt.co.jp] sez:
    > I think that setting the proper maximum segment size for the late
    > model cards (as you did above) makes sense.

    Signed-off-by: Mark Salyzyn
    Cc: FUJITA Tomonori
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • The first patch (a119ee8ee3045bf559d4cf02d72b112f3de2a15b) was a bit
    too aggressive and nested the locks (!) unit testing was in
    error. This patch was reverted by
    203a512f0976e8ba85df36d76b40af6c80239121.

    This new patch should fix the locks correctly.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     

06 Feb, 2008

1 commit


31 Jan, 2008

2 commits


25 Jan, 2008

1 commit

  • Alan noticed the lack of locking surrounding the driver's dealings
    with the fib context managed by the trio of ioctls that are used by
    the RAID management applications to retrieve Adapter Initiated FIBs. I
    merely expanded the fib lock to include the fib context. There have
    been no field reports of any issues generally because the applications
    are relatively static and do not come and go often enough to stress
    this area. I bloated this patch a little with some space junk.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     

24 Jan, 2008

13 commits

  • The cards being added are supported in a limited sense already through
    family matching, but we needed to add some functionality to the driver
    to expose selectively the physical drives. These Physical drives are
    specifically marked to not be part of any array and thus are declared
    JBODs (Just a Bunch Of Drives) for generic SCSI access.

    We report that this is the second patch in a set of two, but merely
    depends on the stand-alone functionality of the first patch which adds
    in that case the ability to report a driver feature flag via sysfs. We
    leverage that functionality by reporting that this driver now supports
    this new JBOD feature for the controller so that the array management
    applications may react accordingly and guide the user as they manage
    the controller.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • Feature enhancement, adding a 'flags' entry that will reside in the
    host controller's tree, with a newline separated list of arbitrary
    ascii named features that indicate whether the combination of driver
    and controller has support for said feature. Breaking from the
    one-line output typical of sysfs entries, newline was added to tailor
    for grep, or simple gets line by line string match within an
    application. I added one for a compiler time check for existence of
    debug print output, one for an optional manifest defined enhanced
    status reporting in the logs, and one for runtime reporting whether
    the controller and driver supports arrays larger than 2TB. Adaptec's
    storage management software uses the last flag to determine whether to
    make available the creation of arrays larger than 2TB, otherwise a
    warning is posted.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • I was amazed at how much embedded space was present in the aacraid
    driver source files. Just selected five files from the set to clean up
    for now and the attached patch swelled to 73K in size!

    - Removed trailing space or tabs
    - Removed spaces embedded within tabs
    - Replaced leading 8 spaces with tabs
    - Removed spaces before )
    - Removed ClusterCommand as it was unused (noticed it as one triggered by above)
    - Replaced scsi_status comparison with 0x02, to compare against SAM_STATUS_CHECK_CONDITION.
    - Replaced a long series of spaces with tabs
    - Replaced some simple if...defined() with ifdef/ifndef

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • Actually there are several but one is trivially fixed

    1. FSACTL_GET_NEXT_ADAPTER_FIB ioctl does not lock dev->fib_list
    but needs to
    2. Ditto for FSACTL_CLOSE_GET_ADAPTER_FIB
    3. It is possible to construct an attack via the SRB ioctls where
    the user obtains assorted elevated privileges. Various approaches are
    possible, the trivial ones being things like writing to the raw media
    via scsi commands and the swap image of other executing programs with
    higher privileges.

    So the ioctls should be CAP_SYS_RAWIO - at least all the FIB manipulating
    ones. This is a bandaid fix for #3 but probably the ioctls should grow
    their own capable checks. The other two bugs need someone competent in that
    driver to fix them.

    Signed-off-by: Alan Cox
    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Alan Cox
     
  • The promised min_t() cleanup. Purely cosmetic.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in
    several LLDs. It's a preparation for the future changes to remove
    sense_buffer array in scsi_cmnd structure.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     
  • Due to an internal limit associated with the AdapterTypeText field,
    SMC required a product ID that overloaded the combined vendor and
    product ID. A decision was made to ship the SMC products without a
    vendor string dropping the defacto space that used to delineate vendor
    and product to boot. To correct this, we needed to adjust the code in
    the driver to parse out the vendor and product strings for the
    adapter. We match of 'AOC' in the AdapterTypeText, if so we set the
    vendor to SMC and place the entire AdapterTypeText into the product
    field.

    This only affects the cosmetic presentation of the Adapter vendor and
    product in the logs and in sysfs.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • Added support to respond to enclosure service events
    (controller AIFs) to add, online or offline physical targets
    reported to sg. Also added online and offlining of arrays.
    Removed an automatic variable definition in a sub block that
    hid an earlier definition, determined to be inert as the
    sub-block use did not interfere. Bumped the driver versioning
    to stamp the addition of this feature.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • Some architectures require a call to flush_kernel_dcache_page for
    processor spoofed DMA operations.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • The adapter queue is divided up equally to all the arrays to prevent
    command starvation to any individual array. On the other hand,
    physical targets are only granted a queue depth of one each. The code
    prior to this patch used to deal with the incremental discovery of
    targets, but the driver knows how many arrays are present prior to the
    scan so this knowledge is used to generate a better estimate for the
    queue depth.

    Remove the capability of 'physical=0' from preventing access to the
    class of adapters that have the RAID/SCSI mode of operation since none
    of the physicals on the SCSI channel are candidates ever for an array.

    As always, the user can override this default queue depth policy by
    making the appropriate adjustments utilizing sysfs.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • In experiments in the lab we managed to trigger an Adapter firmware
    panic (BlinkLED) coincidentally while several pass-through ioctl
    command from the management software were outstanding on a bug only
    present on a class of RAID Adapters that require a hardware reset
    rather than a commanded reset. The net result was an attempt to time
    out the management software command as if it came from the SCSI layer
    resulting in an OS panic.

    Adapters that use commanded reset, management commands are returned
    failed by the Adapter correctly. The adapter firmware panic that
    resulted in this condition was also resolved, and there were no
    adapters in the field with this specific firmware bug so we do not
    expect any field reports. This is a rare or unlikely corner condition,
    and no reports have ever been forwarded from the field.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • The 'entry' automatic variable was defined at the top and within a
    block that uses it, removed the definition from the block that uses
    it. Some cosmetic changes were made while in the same file. This patch
    should be inert.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     
  • Big endian systems issues discovered in the aacraid driver. Somewhat
    reverses a patch from November 7th of last year that removed swap
    operations because they formerly were being assigned to an u8 array
    when they should have been assigned to an le32 array.

    This patch is largely inert for any little endian processor
    architecture. It resolves a bug in delivering the BlinkLED AIF event
    to registered applications when the adapter or associated hardware was
    reset due to ill health. A rare corner case occurrence, also largely
    unnoticed by any as it was a new (untested!) feature.

    Signed-off-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark