03 May, 2008

1 commit

  • 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
     

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

1 commit


16 Apr, 2008

1 commit


08 Apr, 2008

2 commits


12 Feb, 2008

2 commits


08 Feb, 2008

1 commit

  • 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
     

24 Jan, 2008

10 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
     
  • 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
     
  • 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
     
  • 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
     
  • 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
     
  • The parameter 'info' is reused, renamed the second to sinfo to
    represent supplemental adapter info, to suppress compile warning
    message.

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

    Salyzyn, Mark
     
  • Report the RAID level string for the SCSI device representing the
    array. Report is in /sys/class/scsi_device/#:#:#:#/device/level.

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

    Salyzyn, Mark
     
  • aacraid.cache parameter, Disable Queue Flush commands:
    bit 0 - Disable FUA in WRITE SCSI commands
    bit 1 - Disable SYNCHRONIZE_CACHE SCSI command
    bit 2 - Disable only if Battery not protecting adapter supplied Cache

    e.g.: aacraid.cache=7 will disable the FUA and SYNCHRONIZE_CACHE
    commands if the adapter has reported that it's cache is battery backed
    up.

    This parameter permits experimentation with tradeoffs between
    performance and caching policy.

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

    Salyzyn, Mark
     

12 Jan, 2008

3 commits

  • As reported in http://bugzilla.kernel.org/show_bug.cgi?id=3D9133 it was
    discovered that the PERC line of controllers lacked a key 64 bit
    ScatterGather capable SCSI pass-through function. The adapters are still
    capable of 64 bit ScatterGather I/O commands, but these two can not be
    mixed. This problem was exacerbated by the introduction of the SCSI
    Generic access to the DASD physical devices.

    The fix for users before this patch is applied is aacraid.dacmode=3D0 on
    the kernel command line to disable 64 bit I/O.

    The enclosed patch introduces a new adapter quirk and tries to limp
    along by enabling pass-through in situations where memory is 32 bit
    addressable on 64 bit machines, or disable the pass-through functions
    altogether. I expect that the check for 32 bit addressable memory to be
    controversial in that it can be incorrect in non-Dell non-Intel systems
    that PERC would never be installed under, the alternative is to disable
    pass-through in all cases which could be reported as another regression.

    Pass-through is used for SCSI Generic access to the physical devices, or
    for the management applications to properly function.

    In systems where this patch has disabled pass-through because it is
    unsupportable in combination with I/O performance, the user can choose
    to enable pass-through by turning off dacmode (aacraid.dacmode=3D0) or
    limiting the discovered kernel memory (mem=3D4G) with an associated loss
    in runtime performance. If we chose instead to turn off 64 bit dacmode
    for the adapters with this quirk, then this would be reported as another
    regression.

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

    Salyzyn, Mark
     
  • On Wed, Nov 07, 2007 at 01:51:44PM -0500, Salyzyn, Mark wrote:
    > Christoph Hellwig [mailto:hch@infradead.org] sez:
    > > Did anyone run the driver through sparse to see if we have
    > > more issues like this?
    >
    > There are some warnings from sparse, none like this one. I will deal
    > with the warnings ...

    Actually there are a lot of endianess warnings, fortunately most of them
    harmless. The patch below fixes all of them up (including the ones in
    the patch I replied to), except for aac_init_adapter which is really odd
    and I don't know what to do.

    [jejb fixed up rejections and checkpatch issues]

    Signed-off-by: Christoph Hellwig
    Acked-by: Mark Salyzyn
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • Some of our vendors have requested that our adapters ignore the hardware
    reset attempts during recovery and have enforced this with changes in
    Adapter Firmware. Some of our customers have requested the option to be
    able to reset the adapter under adverse adapter failure, we even had a
    few defects reported here considering it a regression that the Adapter
    could not be reset. This patch addresses this dichotomy. The user can
    force the adapter to be reset if it supports the IOP_RESET_ALWAYS
    command, in cases where the adapter has been programmed to ignore the
    reset, by setting the aacraid.check_reset parameter to a value of -1.

    The driver will not reset an Adapter that does not support the reset
    command(s).

    This patch also fixes and cleans up some of the logic associated with
    resetting the adapter.

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

    Salyzyn, Mark
     

23 Oct, 2007

1 commit


13 Oct, 2007

1 commit


28 Jul, 2007

1 commit

  • Customer running an application that issues SYNCHRONIZE_CACHE calls
    directly noticed the broad stroke of the current implementation in the
    aacraid driver resulting in multiple applications feeding I/O to the
    storage causing the issuing application to stall for long periods of
    time. By only waiting for the current WRITE commands, rather than all
    commands, to complete; and those that are in range of the
    SYNCHRONIZE_CACHE call that would associate more tightly with the
    issuing application before telling the Firmware to flush it's dirty
    cache, we managed to reduce the stalling. The Firmware itself still
    flushes all the dirty cache associated with the array ignoring the
    range, it just does so in a more timely manner.

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

    Salyzyn, Mark
     

27 Jul, 2007

1 commit


19 Jul, 2007

2 commits

  • Report VPD inquiry page 0x80 with an unique array creation serial
    number (CUID). When an array is created, the metadata stored on the
    physical drives gets an unique serial number. This serial number
    remains constant through array morphing or migration to other
    controllers. This patch is a forward port and modification to survive
    morphing and migration operations, of a similar piece of
    (un-attributed author) code added to the SLES10 SP1 aacraid driver.

    To test the results of the patch, observe that /dev/disk/by-id/
    entries will show up for the arrays resulting from the udev rules.
    Also, as per the udev rules, 'scsi_id -g -x -a -s /block/sd? -d
    /dev/sd?' will report the ID_SERIAL as constructed from the inquiry
    data.

    It was reported to me that the 'ADPT' leading the serial number was bad
    form, that the inquiry vendor field was enough to differentiate the
    storage uniquely. Subsequent search found that another Adaptec AAC based
    driver reported the 8 hex serial number only without such adornments, so
    dropped ADPT to match. Resubmitting the patch with this alteration.

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

    Salyzyn, Mark
     
  • During an Adapter Initiated scan request, the query disk ioctl reports a
    value of 2 rather than 1 for the valid field. This presents a problem
    for some legacy management applications.

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

    Salyzyn, Mark
     

20 Jun, 2007

2 commits


18 Jun, 2007

3 commits

  • Add the ability for an application to issue a hardware reset to the
    adapter via sysfs. Typical uses include restarting the adapter after it
    has been flashed. Bumped revision number for the driver and added a
    feature to periodically check the adapter's health (check_interval),
    update the adapter's concept of time (update_interval) and block
    checking/resetting of the adapter (check_reset).

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

    Salyzyn, Mark
     
  • Sundry cleanups:
    1) Use kzalloc instead of kmalloc.
    2) Make sure probe worked before recalling the SCSI command to finalize
    processing.
    3) _aac_probe_container2 and _aac_probe_container1 return value goes
    unused, change return to void.
    4) Use a lower depth pointer reference to pick up the driver instance
    variable.
    5) Although effectively unused except to fake for scsicmd validity, set
    the scsi_done in probe code to aac_probe_container_callback1 instead of
    the less valid dummy reference to _aac_probe_container1.
    6) SCp.phase is set in aac_valid_context, drop setting up this value in
    caller when unnecessary.
    7) take container target id at the beginning, rather than referencing
    scmd_id() to pick it up.

    There should be no side effects or functionality changes.

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

    Salyzyn, Mark
     
  • - remove the unnecessary map_single path.

    - convert to use the new accessors for the sg lists and the
    parameters.

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

    FUJITA Tomonori
     

31 May, 2007

1 commit


23 May, 2007

1 commit

  • Under some conditions associated with the unclean transition to kdump,
    the aacraid adapters will view the array as foreign and not export it to
    prevent access and data manipulation. The solution is to submit a commit
    configuration to export the devices since this is a expected behavior
    when transitioning to a kdump kernel.

    This patch adds the aacraid.reset_devices flag and when either this or
    the global reset_devices flag is set, ensures that a commit config is
    issued and extends the startup_timeout if it is set less than 5 minutes.

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

    Salyzyn, Mark
     

22 May, 2007

1 commit

  • Back in the beginning of last year we disabled mode page 8 and mode page
    3f requests through device quirk bits instead of enhancing the driver to
    respond to these mode pages because there was no apparent added value.

    The Firmware that supports the new communication commands supports the
    ability to force a write around of the adapter cache on a command by
    command basis. In the attached patch we enable mode page 8 and 3f and
    spoof the results as needed in order to *convince* the layers above to
    submit writes with the FUA (Force Unit Attention) bit set if the file
    system or application requires it, if the Firmware supports the write
    through, or instead to submit a SYNCHRONIZE_CACHE if the Firmware does
    not. The added value here is for file systems that benefit from this
    functionality and for clustering or redundancy scenarios.

    Caveats: By convince, we are responding with a minimal short 3 byte
    content mode page 8, with only the data the SCSI layer needs and that we
    can fill confidently. Applications that require the customarily larger
    mode page 8 results may be confused by this(?). The FUA, or the
    SYNCHRONIZE_CACHE only affect the cache on the controller. Our firmware
    by default ensure that the underlying physical drives of the array have
    their cache turned off so normally this is not a problem.

    This attached patch is against current scsi-misc-2.6 and was unit tested
    on RHEL5. Since this is a feature enhancement, it should not be
    considered for any current stabilization efforts.

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

    Salyzyn, Mark
     

17 May, 2007

1 commit

  • Unable to handle kernel paging request at ffff8101c0000000 RIP:
    [] :aacraid:aac_internal_transfer+0xd6/0xe3
    PGD 8063 PUD 0
    Oops: 0000 [1] SMP
    last sysfs file: /block/sdb/removable
    CPU 2
    Modules linked in: autofs4(U) hidp(U) nfs(U) lockd(U)
    fscache(U) nfs_acl(U) rfcomm(U) l2cap(U) bluetooth(U)
    sunrpc(U) ipv6(U) cpufreq_ondemand(U) dm_mirror(U) dm_mod(U)
    video(U) sbs(U) i2c_ec(U) button(U) battery(U) asus_acpi(U)
    acpi_memhotplug(U) ac(U) parport_pc(U) lp(U) parport(U)
    joydev(U) ide_cd(U) i2c_i801(U) i2c_core(U) shpchp(U)
    cdrom(U) bnx2(U) sg(U) pcspkr(U) ata_piix(U) libata(U)
    aacraid(U) sd_mod(U) scsi_mod(U) ext3(U) jbd(U) ehci_hcd(U)
    ohci_hcd(U) uhci_hcd(U)
    Pid: 2352, comm: syslogd Not tainted 2.6.18-prep #1
    RIP: 0010:[] [] :aacraid:aac_internal_transfer+0xd6/0xe3
    RSP: 0000:ffff8101bfd1fe68 EFLAGS: 00010083
    RAX: 0000000000000063 RBX: 0000000000000008 RCX: 00000000ffd1fea0
    RDX: ffffffff802da628 RSI: ffff8101c0000000 RDI: ffff8101b2a08168
    RBP: ffff8101b2728010 R08: ffffffff802da628 R09: 0000000000000046
    R10: 0000000000000000 R11: 0000000000000080 R12: 0000000000000010
    R13: ffff8101bfd1fea8 R14: ffff8101bc74df58 R15: ffff8101bc74df58
    FS: 00002aaaab0146f0(0000) GS:ffff8101bfcd2e40(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffff8101c0000000 CR3: 00000001bdecd000 CR4: 00000000000006e0
    Process syslogd (pid: 2352, threadinfo ffff8101bc74c000, task ffff8101bd979040)
    Stack: 0000000000000012 0000000000000036 0000000000000000 ffff8101bee9a800
    ffff8101be9d3a00 ffff8101be9d3a00 ffff8101be8014f8 ffffffff880b26cc
    40212227607e3141 2029282a26252423 0000000000000003 ffff810037e3a000
    Call Trace:
    ] :aacraid:get_container_name_callback+0x8b/0xb5
    [] :aacraid:aac_intr_normal+0x1b3/0x1f9
    [] :aacraid:aac_rkt_intr+0x37/0x115
    [] __rcu_process_callbacks+0xf8/0x1a8
    [] handle_IRQ_event+0x29/0x58
    [] __do_IRQ+0xa4/0x105
    [] __do_softirq+0x5e/0xd5
    [] do_IRQ+0xe7/0xf5
    [] ret_from_intr+0x0/0xa

    On digging into it, it turned out that the customer was probing an
    aacraid device with an INQUIRY of 8 bytes. The way aacraid works, it
    was blindly trying to use aac_internal_transfer to copy the container
    name to byte 16 of the inquiry data, resulting in a negative transfer
    length. It then copies over the whole of kernel memory before
    dropping off the end.

    Fix updated and corrected by Mark Salyzyn

    Signed-off-by: James Bottomley

    James Bottomley
     

18 Apr, 2007

1 commit

  • 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: Mark Salyzyn
    Signed-off-by: James Bottomley

    Salyzyn, Mark
     

01 Apr, 2007

1 commit

  • The Adapter build date that is to be printed on instantiation was not
    displayed as a result of the supplemental adapter information structure
    not being in sync with the Firmware; the driver took an early test cycle
    version that had a miss-sized padded region at the head and the
    structure was not re-checked at the end of qualification. The Build Date
    was not a priority and is merely a cosmetic enhancement, and the wrong
    location for the start of the structure member would not induce any
    side-effect problems. We updated the structure to match the actual
    format, and added the TSID (Tech Support Identification) value print,
    should it be present, to the adapter instantiation announcements during
    driver load.

    This later enhancement should improve the relationship between Service
    folk & Tech Support if the printed value of the TSID found it's way into
    the circular file labeled G...

    Neither of these values show in sysfs (yet).

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

    Salyzyn, Mark