20 Apr, 2008

1 commit


18 Apr, 2008

6 commits

  • Now that SFF assumptions are separated out from non-SFF reset
    sequence, port_ops->sff_dev_select() is no longer necessary for
    non-SFF controllers. Kill ata_noop_dev_select() and ->sff_dev_select
    initialization from base and other non-SFF port_ops.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Now that all SFF stuff is separated out of core layer, core layer
    doesn't call ops->[alt_]check_status(). In fact, no one calls them
    for non-SFF drivers anymore. Kill them.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Now that all SFF stuff is separated out of core layer, core layer
    doesn't call ops->tf_read directly. It gets called only via
    ops->qc_fill_rtf() for non-SFF drivers. This patch directly
    implements private ops->qc_fill_rtf() for non-SFF controllers and kill
    ops->tf_read().

    This is much cleaner for non-SFF controllers as some of them have to
    cache SFF register values in private data structure and report the
    cached values via ops->tf_read(). Also, ops->tf_read() gets nasty for
    controllers which don't have clear notion of TF registers when
    operation is not in progress.

    As this change makes default ops->qc_fill_rtf unnecessary, move
    ata_sff_qc_fill_rtf() form ata_base_port_ops to ata_sff_port_ops where
    it belongs.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • On command completion, ata_qc_complete() directly called ops->tf_read
    to fill qc->result_tf. This patch adds ops->qc_fill_rtf to replace
    hardcoded ops->tf_read usage.

    ata_sff_qc_fill_rtf() which uses ops->tf_read to fill result_tf is
    implemented and set in ata_base_port_ops and other ops tables which
    don't inherit from ata_base_port_ops, so this patch doesn't introduce
    any behavior change.

    ops->qc_fill_rtf() is similar to ops->sff_tf_read() but can only be
    called when a command finishes. As some non-SFF controllers don't
    have TF registers defined unless they're associated with in-flight
    commands, this limited operation makes life easier for those drivers
    and help lifting SFF assumptions from libata core layer.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Add sff_ prefix to SFF specific port ops.

    This rename is in preparation of separating SFF support out of libata
    core layer. This patch strictly renames ops and doesn't introduce any
    behavior difference.

    Signed-off-by: Tejun Heo

    Tejun Heo
     
  • Currently reset methods are not specified directly in the
    ata_port_operations table. If a LLD wants to use custom reset
    methods, it should construct and use a error_handler which uses those
    reset methods. It's done this way for two reasons.

    First, the ops table already contained too many methods and adding
    four more of them would noticeably increase the amount of necessary
    boilerplate code all over low level drivers.

    Second, as ->error_handler uses those reset methods, it can get
    confusing. ie. By overriding ->error_handler, those reset ops can be
    made useless making layering a bit hazy.

    Now that ops table uses inheritance, the first problem doesn't exist
    anymore. The second isn't completely solved but is relieved by
    providing default values - most drivers can just override what it has
    implemented and don't have to concern itself about higher level
    callbacks. In fact, there currently is no driver which actually
    modifies error handling behavior. Drivers which override
    ->error_handler just wraps the standard error handler only to prepare
    the controller for EH. I don't think making ops layering strict has
    any noticeable benefit.

    This patch makes ->prereset, ->softreset, ->hardreset, ->postreset and
    their PMP counterparts propoer ops. Default ops are provided in the
    base ops tables and drivers are converted to override individual reset
    methods instead of creating custom error_handler.

    * ata_std_error_handler() doesn't use sata_std_hardreset() if SCRs
    aren't accessible. sata_promise doesn't need to use separate
    error_handlers for PATA and SATA anymore.

    * softreset is broken for sata_inic162x and sata_sx4. As libata now
    always prefers hardreset, this doesn't really matter but the ops are
    forced to NULL using ATA_OP_NULL for documentation purpose.

    * pata_hpt374 needs to use different prereset for the first and second
    PCI functions. This used to be done by branching from
    hpt374_error_handler(). The proper way to do this is to use
    separate ops and port_info tables for each function. Converted.

    Signed-off-by: Tejun Heo

    Tejun Heo
     

19 Feb, 2008

1 commit

  • that provided by the block layer

    ATA requires that all DMA transfers begin and end on word boundaries.
    Because of this, a large amount of machinery grew up in ide to adjust
    scatterlists on this basis. However, as of 2.5, the block layer has a
    dma_alignment variable which ensures both the beginning and length of a
    DMA transfer are aligned on the dma_alignment boundary. Although the
    block layer does adjust the beginning of the transfer to ensure this
    happens, it doesn't actually adjust the length, it merely makes sure
    that space is allocated for transfers beyond the declared length. The
    upshot of this is that scatterlists may be padded to any size between
    the actual length and the length adjusted to the dma_alignment safely
    knowing that memory is allocated in this region.

    Right at the moment, SCSI takes the default dma_aligment which is on a
    512 byte boundary. Note that this aligment only applies to transfers
    coming in from user space. However, since all kernel allocations are
    automatically aligned on a minimum of 32 byte boundaries, it is safe to
    adjust them in this manner as well.

    tj: * Adjusting sg after padding is done in block layer. Make libata
    set queue alignment correctly for ATAPI devices and drop broken
    sg mangling from ata_sg_setup().
    * Use request->raw_data_len for ATAPI transfer chunk size.
    * Killed qc->raw_nbytes.
    * Separated out killing qc->n_iter.

    Signed-off-by: James Bottomley
    Signed-off-by: Tejun Heo
    Signed-off-by: Jens Axboe

    James Bottomley
     

03 Feb, 2008

1 commit


26 Jan, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits)
    [SCSI] usbstorage: use last_sector_bug flag universally
    [SCSI] libsas: abstract STP task status into a function
    [SCSI] ultrastor: clean up inline asm warnings
    [SCSI] aic7xxx: fix firmware build
    [SCSI] aacraid: fib context lock for management ioctls
    [SCSI] ch: remove forward declarations
    [SCSI] ch: fix device minor number management bug
    [SCSI] ch: handle class_device_create failure properly
    [SCSI] NCR5380: fix section mismatch
    [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices
    [SCSI] IB/iSER: add logical unit reset support
    [SCSI] don't use __GFP_DMA for sense buffers if not required
    [SCSI] use dynamically allocated sense buffer
    [SCSI] scsi.h: add macro for enclosure bit of inquiry data
    [SCSI] sd: add fix for devices with last sector access problems
    [SCSI] fix pcmcia compile problem
    [SCSI] aacraid: add Voodoo Lite class of cards.
    [SCSI] aacraid: add new driver features flags
    [SCSI] qla2xxx: Update version number to 8.02.00-k7.
    [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command.
    ...

    Linus Torvalds
     

23 Jan, 2008

2 commits

  • libata used private sg iterator to handle padding sg. Now that sg can
    be chained, padding can be handled using standard sg ops. Convert to
    chained sg.

    * s/qc->__sg/qc->sg/

    * s/qc->pad_sgent/qc->extra_sg[]/. Because chaining consumes one sg
    entry. There need to be two extra sg entries. The renaming is also
    for future addition of other extra sg entries.

    * Padding setup is moved into ata_sg_setup_extra() which is organized
    in a way that future addition of other extra sg entries is easy.

    * qc->orig_n_elem is unused and removed.

    * qc->n_elem now contains the number of sg entries that LLDs should
    map. qc->mapped_n_elem is added to carry the original number of
    mapped sgs for unmapping.

    * The last sg of the original sg list is used to chain to extra sg
    list. The original last sg is pointed to by qc->last_sg and the
    content is stored in qc->saved_last_sg. It's restored during
    ata_sg_clean().

    * All sg walking code has been updated. Unnecessary assertions and
    checks for conditions the core layer already guarantees are removed.

    Signed-off-by: Tejun Heo
    Cc: Jens Axboe
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • ATA_PROT_ATAPI_* are ugly and naming schemes between ATA_PROT_* and
    ATA_PROT_ATAPI_* are inconsistent causing confusion. Rename them to
    ATAPI_PROT_* and make them consistent with ATA counterpart.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

12 Jan, 2008

1 commit


24 Oct, 2007

1 commit


23 Oct, 2007

1 commit


19 Oct, 2007

1 commit

  • Short term, this works around a bug introduced by early sg-chaining
    work.

    Long term, removing this function eliminates a branch from a hot
    path loop in each scatter/gather table build. Also, as this code
    demonstrates, we don't need to _track_ the end of the s/g list, as
    long as we mark it in some way. And doing so programatically is nice.
    So its a useful cleanup, regardless of its short term effects.

    Based conceptually on a quick patch by Jens Axboe.

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

13 Oct, 2007

3 commits

  • It was always set to ata_port_disable(). Removed the hook, and replaced
    the very few ap->ops->port_disable() callsites with direct calls to
    ata_port_disable().

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • Make reset methods and related functions deal with ata_link instead of
    ata_port.

    * ata_do_reset()
    * ata_eh_reset()
    * all prereset/reset/postreset methods and related functions

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Introduce ata_link. It abstracts PHY and sits between ata_port and
    ata_device. This new level of abstraction is necessary to support
    SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
    a ATA host port. Fields related to command execution, spd_limit and
    EH are per-link and thus moved to ata_link.

    This patch only defines the host link. Multiple link handling will be
    added later. Also, a lot of ap->link derefences are added but many of
    them will be removed as each part is converted to deal directly with
    ata_link instead of ata_port.

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Cc: James Bottomley
    Signed-off-by: Jeff Garzik

    Tejun Heo
     

16 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (166 commits)
    [SCSI] ibmvscsi: convert to use the data buffer accessors
    [SCSI] dc395x: convert to use the data buffer accessors
    [SCSI] ncr53c8xx: convert to use the data buffer accessors
    [SCSI] sym53c8xx: convert to use the data buffer accessors
    [SCSI] ppa: coding police and printk levels
    [SCSI] aic7xxx_old: remove redundant GFP_ATOMIC from kmalloc
    [SCSI] i2o: remove redundant GFP_ATOMIC from kmalloc from device.c
    [SCSI] remove the dead CYBERSTORMIII_SCSI option
    [SCSI] don't build scsi_dma_{map,unmap} for !HAS_DMA
    [SCSI] Clean up scsi_add_lun a bit
    [SCSI] 53c700: Remove printk, which triggers because of low scsi clock on SNI RMs
    [SCSI] sni_53c710: Cleanup
    [SCSI] qla4xxx: Fix underrun/overrun conditions
    [SCSI] megaraid_mbox: use mutex instead of semaphore
    [SCSI] aacraid: add 51245, 51645 and 52245 adapters to documentation.
    [SCSI] qla2xxx: update version to 8.02.00-k1.
    [SCSI] qla2xxx: add support for NPIV
    [SCSI] stex: use resid for xfer len information
    [SCSI] Add Brownie 1200U3P to blacklist
    [SCSI] scsi.c: convert to use the data buffer accessors
    ...

    Linus Torvalds
     

13 Jul, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
    PCI: Only build PCI syscalls on architectures that want them
    PCI: limit pci_get_bus_and_slot to domain 0
    PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
    PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
    PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
    PCI: hotplug: pciehp: wait for 1 second after power off slot
    PCI: pci_set_power_state(): check for PM capabilities earlier
    PCI: cpci_hotplug: Convert to use the kthread API
    PCI: add pci_try_set_mwi
    PCI: pcie: remove SPIN_LOCK_UNLOCKED
    PCI: ROUND_UP macro cleanup in drivers/pci
    PCI: remove pci_dac_dma_... APIs
    PCI: pci-x-pci-express-read-control-interfaces cleanups
    PCI: Fix typo in include/linux/pci.h
    PCI: pci_ids, remove double or more empty lines
    PCI: pci_ids, add atheros and 3com_2 vendors
    PCI: pci_ids, reorder some entries
    PCI: i386: traps, change VENDOR to DEVICE
    PCI: ATM: lanai, change VENDOR to DEVICE
    PCI: Change all drivers to use pci_device->revision
    ...

    Linus Torvalds
     

12 Jul, 2007

2 commits

  • Well, first of all, I don't want to change so many files either.

    What I do:
    Adding a new parameter "struct bin_attribute *" in the
    .read/.write methods for the sysfs binary attributes.

    In fact, only the four lines change in fs/sysfs/bin.c and
    include/linux/sysfs.h do the real work.
    But I have to update all the files that use binary attributes
    to make them compatible with the new .read and .write methods.
    I'm not sure if I missed any. :(

    Why I do this:
    For a sysfs attribute, we can get a pointer pointing to the
    struct attribute in the .show/.store method,
    while we can't do this for the binary attributes.
    I don't know why this is different, but this does make it not
    so handy to use the binary attributes as the regular ones.
    So I think this patch is reasonable. :)

    Who benefits from it:
    The patch that exposes ACPI tables in sysfs
    requires such an improvement.
    All the table binary attributes share the same .read method.
    Parameter "struct bin_attribute *" is used to get
    the table signature and instance number which are used to
    distinguish different ACPI table binary attributes.

    Without this parameter, we need to offer different .read methods
    for different ACPI table binary attributes.
    This is impossible as there are various ACPI tables on different
    platforms, and we don't know what they are until they are loaded.

    Signed-off-by: Zhang Rui
    Signed-off-by: Greg Kroah-Hartman

    Zhang Rui
     
  • Instead of all drivers reading pci config space to get the revision
    ID, they can now use the pci_device->revision member.

    This exposes some issues where drivers where reading a word or a dword
    for the revision number, and adding useless error-handling around the
    read. Some drivers even just read it for no purpose of all.

    In devices where the revision ID is being copied over and used in what
    appears to be the equivalent of hotpath, I have left the copy code
    and the cached copy as not to influence the driver's performance.

    Compile tested with make all{yes,mod}config on x86_64 and i386.

    Signed-off-by: Auke Kok
    Acked-by: Dave Jones
    Signed-off-by: Greg Kroah-Hartman

    Auke Kok
     

31 May, 2007

1 commit


30 May, 2007

1 commit


17 May, 2007

1 commit

  • Currently ipr always returns success from eh_dev_reset when
    called for a SATA device. If ata_do_eh is unable to recover
    for some reason, this can result in commands that are still
    outstanding when ata_do_eh returns. Change ipr to verify no
    commands are outstanding before returning success.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     

09 May, 2007

1 commit

  • Use a newly added PCI API to issue a PCI Fundamental reset
    (warm reset) to a new ipr PCI-E adapter. Typically, the
    ipr adapter uses the start BIST bit in config space to reset
    an adapter. Issuing start BIST on this particular adapter
    results in the PCI-E logic on the card losing sync, which
    causes PCI-E errors, making the card unusable. The only reset
    mechanism that exists on this hardware that does not have this
    problem is PCI Fundamental reset (warm reset).

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     

06 May, 2007

10 commits

  • If an ipr adapter encounters an adapter error requiring an
    adapter reset to recover from prior to driver load time, the
    error will be ignored and recovery will not happen until the
    initial timeout occurs waiting for the firmware to come ready,
    which means a five minute timeout. Fix is to read the interrupt
    register before clearing any of the interrupts at probe time.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • Enables multi-initiator support on ipr RAID adapters that support it.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • Formats ipr dual adapter errors so that they are more compact.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • Increases the adapter operational timeout for some adapters that support
    dual controller configurations, since they may take longer to come ready.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • In ipr dual adapter configurations, the ipr adapter firmware
    may require an adapter reset for various reasons. The reset
    is requested by the adapter firmware logging an error with
    an IOASC of 0x02048000. Add support to log this error, and
    reset the adapter.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • On newer levels of microcode for ipr RAID adapters supporting
    multi-initiator configurations, the disk array, or VSET, resources
    are capable of generating a check condition. This patch prevents
    ipr from generating sense data in this scenario and retrieving it
    from the logical device instead.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • On certain ipr RAID adapters, which are capable of multi-initiator
    configurations, the disk array, or VSET, resources will be in a POR
    Unit Attention state following an adapter reset. In order for the
    midlayer to handle the UA, I must report a bus reset to the logical
    disk array bus at the end of an adapter reset.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • Since driver_data for pci ids in the ipr driver is now
    just flags, we can allow these to be passed in from userspace
    for dynamic ids.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • This patch fixes some scenarios where an ipr adapter
    could get reset overlapped, which could cause very
    long timeouts to occur, or PCI bus errors.

    Signed-off-by: Brian King
    Signed-off-by: James Bottomley

    Brian King
     
  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits)
    [SCSI] fusion: fix domain validation loops
    [SCSI] qla2xxx: fix regression on sparc64
    [SCSI] modalias for scsi devices
    [SCSI] sg: cap reserved_size values at max_sectors
    [SCSI] BusLogic: stop using check_region
    [SCSI] tgt: fix rdma transfer bugs
    [SCSI] aacraid: fix aacraid not finding device
    [SCSI] aacraid: Correct SMC products in aacraid.txt
    [SCSI] scsi_error.c: Add EH Start Unit retry
    [SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test.
    [SCSI] ipr: Driver version to 2.3.2
    [SCSI] ipr: Faster sg list fetch
    [SCSI] ipr: Return better qc_issue errors
    [SCSI] ipr: Disrupt device error
    [SCSI] ipr: Improve async error logging level control
    [SCSI] ipr: PCI unblock config access fix
    [SCSI] ipr: Fix for oops following SATA request sense
    [SCSI] ipr: Log error for SAS dual path switch
    [SCSI] ipr: Enable logging of debug error data for all devices
    [SCSI] ipr: Add new PCI-E IDs to device table
    ...

    Linus Torvalds
     

29 Apr, 2007

1 commit

  • drivers/scsi/ipr.c: In function '__ipr_eh_dev_reset':
    drivers/scsi/ipr.c:3865: warning: passing argument 4 of 'ata_do_eh' from incompatible pointer type

    Cc: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Andrew Morton
     

02 Apr, 2007

2 commits