27 Jul, 2008

1 commit


19 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
    [SCSI] iscsi: bidi support for iscsi_tcp
    [SCSI] iscsi: bidi support at the generic libiscsi level
    [SCSI] iscsi: extended cdb support
    [SCSI] zfcp: Fix error handling for blocked unit for send FCP command
    [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
    [SCSI] zfcp: fix 31 bit compile warnings
    [SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
    [SCSI] bsg: remove minor in struct bsg_device
    [SCSI] bsg: use better helper list functions
    [SCSI] bsg: replace kobject_get with blk_get_queue
    [SCSI] bsg: takes a ref to struct device in fops->open
    [SCSI] qla1280: remove version check
    [SCSI] libsas: fix endianness bug in sas_ata
    [SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
    [SCSI] aacraid: Do not describe check_reset parameter with its value
    [SCSI] aacraid: Fix down_interruptible() to check the return value
    [SCSI] sun3_scsi_vme: add MODULE_LICENSE
    [SCSI] st: rename flush_write_buffer()
    [SCSI] tgt: use KMEM_CACHE macro
    [SCSI] initio: fix big endian problems for auto request sense
    ...

    Linus Torvalds
     

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
     
  • Signed-off-by: Al Viro
    Signed-off-by: James Bottomley

    Al Viro
     

08 Apr, 2008

1 commit


28 Mar, 2008

1 commit


24 Feb, 2008

4 commits

  • - Correct one use after free of the sas task
    - update the reset required path to move straight to LUN reset
    - make the bigger hammer actually reset something instead of just trying
    to clear all the tasks.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • Once the phy reset is plumbed in properly, SATA error handling fails
    nastily because we change the port attached_sas_address using the WWN
    field of the IDENTIFY message. This is a nice thing to do in theory,
    but it really destroys hotplug because any event on the port causes an
    automatic mismatch between the sas_address the phy just picked up and
    the one we propagate into the port. However ugly they are, we have to
    stick with the sas addresses made up by the phys and expanders.

    Also does a few cosmetic changes to the way port printing is done to
    make it clearer how a port is formed.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • This is needed by the to be added I_T reset function in aic94xx. It
    needs to know the local phy so it can send a link or hard reset along
    the path.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (25 commits)
    [SCSI] qlogicpt: section fixes
    [SCSI] mvsas: convert from rough draft to working driver
    [SCSI] mvsas: Add Marvell 6440 SAS/SATA driver
    [SCSI] libsas: correctly flush the LU queue on error recovery
    [SCSI] aic94xx: fix sequencer hang on error recovery
    [SCSI] st: compile fix when DEBUG set to one
    [SCSI] stex: stex_internal_copy should be called with sg_count in struct st_ccb
    [SCSI] stex: stex_direct_copy shouldn't call dma_map_sg
    [SCSI] lpfc: Balance locking
    [SCSI] qla4xxx: fix up residual handling
    [SCSI] libsas: fix error handling
    [SCSI] arcmsr: fix message allocation
    [SCSI] mptbase: fix use-after-free's
    [SCSI] iscsi transport: make 2 functions static
    [SCSI] lpfc: make lpfc_disable_node() static
    [SCSI] ips: fix data buffer accessors conversion bug
    [SCSI] gdth: don't call pci_free_consistent under spinlock
    [SCSI] qla2xxx: fix compile warning for printk format
    [SCSI] aic7xx: mitigate HOST_MSG_LOOP invalid SCB ff panic
    [SCSI] scsi_debug: disable clustering
    ...

    Linus Torvalds
     

23 Feb, 2008

2 commits

  • The current sas_scsi_clear_queue_lu() is wrongly checking for commands
    which match the pointer to the one passed in. It should be checking for
    commands which are on the same logical unit as the one passed in. Fix
    this by checking target pointer and LUN for equality.

    Signed-off-by: James Bottomley

    James Bottomley
     
  • The libsas error handler has two fairly fatal bugs

    1. scsi_sas_task_done calls scsi_eh_finish_cmd() too early. This
    happens if the task completes after it has been aborted but before
    the error handler starts up. Because scsi_eh_finish_cmd()
    decrements host_failed and adds the task to the done list, the
    error handler start check (host_failed == host_busy) never passes
    and the eh never starts.

    2. The multiple task completion paths sas_scsi_clear_queue_... all
    simply delete the task from the error queue. This causes it to
    disappear into the ether, since a command must be placed on the
    done queue to be finished off by the error handler. This behaviour
    causes the HBA to hang on pending commands.

    Fix 1. by moving the SAS_TASK_STATE_ABORTED check to an exit clause at
    the top of the routine and calling ->scsi_done() unconditionally (it
    is a nop if the timer has fired). This keeps the task in the error
    handling queue until the eh starts.

    Fix 2. by making sure every task goes through task complete followed
    by scsi_eh_finish_cmd().

    Tested this by firing resets across a disk running a hammer test (now
    it actually survives without hanging the system)

    Signed-off-by: James Bottomley

    James Bottomley
     

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
     

26 Jan, 2008

3 commits

  • * 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
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (67 commits)
    fix drivers/ata/sata_fsl.c double-decl
    [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
    pata_legacy: Merge winbond support
    ata_generic: Cenatek support
    pata_winbond: error return
    pata_serverworks: Fix cable types and cosmetics
    pata_mpc52xx: remove un-needed assignment
    libata: fix off-by-one in error categorization
    ahci: factor out AHCI enabling and enable AHCI before reading CAP
    ata_piix: implement SIDPR SCR access
    ata_piix: convert to prepare - activate initialization
    libata: factor out ata_pci_activate_sff_host() from ata_pci_one()
    [libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
    pata_legacy: resychronize with upstream changes and resubmit
    [libata] pata_legacy: typo fix
    [libata] pata_winbond: update for new ->data_xfer hook
    pata_pcmcia: convert to new data_xfer prototype
    libata annotations and fixes
    libata: use dev_driver_string() instead of "libata" in libata-sff.c
    ata_piix: kill unused constants and flags
    ...

    Linus Torvalds
     
  • Break out the frame processor for STP tasks from aic94xx so they can
    be shared by other SAS HBA's

    Original patch from Jeff Garzik

    Signed-off-by: James Bottomley

    James Bottomley
     

25 Jan, 2008

1 commit


24 Jan, 2008

2 commits


23 Jan, 2008

3 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
     
  • Implement protocol tests - ata_is_atapi(), ata_is_nodata(),
    ata_is_pio(), ata_is_dma(), ata_is_ncq() and ata_is_data() and use
    them to replace is_atapi_taskfile() and hard coded protocol tests.

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

    Tejun Heo
     

12 Jan, 2008

5 commits


20 Oct, 2007

1 commit

  • The task_struct->pid member is going to be deprecated, so start
    using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
    the kernel.

    The first thing to start with is the pid, printed to dmesg - in
    this case we may safely use task_pid_nr(). Besides, printks produce
    more (much more) than a half of all the explicit pid usage.

    [akpm@linux-foundation.org: git-drm went and changed lots of stuff]
    Signed-off-by: Pavel Emelyanov
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov
     

13 Oct, 2007

2 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
     
  • 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
     

31 Jul, 2007

1 commit


28 Jul, 2007

1 commit

  • In sas_smp_get_phy_events() we never test if the call to
    alloc_smp_req(RPEL_REQ_SIZE) succeeds or fails. That means we run
    the risk of dereferencing a NULL pointer if it does fail. Far
    better to test if we got NULL back and in that case return -ENOMEM
    just as we already do for the other memory allocation in that
    function.

    Signed-off-by: Jesper Juhl
    Signed-off-by: James Bottomley

    Jesper Juhl
     

26 Jul, 2007

1 commit


25 Jul, 2007

1 commit


23 Jul, 2007

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (60 commits)
    [SCSI] libsas: make ATA functions selectable by a config option
    [SCSI] bsg: unexport sg v3 helper functions
    [SCSI] bsg: fix bsg_unregister_queue
    [SCSI] bsg: make class backlinks
    [SCSI] 3w-9xxx: add support for 9690SA
    [SCSI] bsg: fix bsg_register_queue error path
    [SCSI] ESP: Increase ESP_BUS_TIMEOUT to 275.
    [SCSI] libsas: fix scr_read/write users and update the libata documentation
    [SCSI] mpt fusion: update Kconfig help
    [SCSI] scsi_transport_sas: add destructor for bsg
    [SCSI] iscsi_tcp: buggered kmalloc()
    [SCSI] qla2xxx: Update version number to 8.02.00-k2.
    [SCSI] qla2xxx: Add ISP25XX support.
    [SCSI] qla2xxx: Use pci_try_set_mwi().
    [SCSI] qla2xxx: Use PCI-X/PCI-Express read control interfaces.
    [SCSI] qla2xxx: Re-factor isp_operations to static structures.
    [SCSI] qla2xxx: Validate mid-layer 'underflow' during check-condition handling.
    [SCSI] qla2xxx: Correct setting of 'current' and 'supported' speeds during FDMI registration.
    [SCSI] qla2xxx: Generalize iIDMA support.
    [SCSI] qla2xxx: Generalize FW-Interface-2 support.
    ...

    Linus Torvalds
     
  • Not everyone wants libsas automatically to pull in libata. This patch
    makes the behaviour configurable, so you can build libsas with or
    without ATA support.

    Signed-off-by: James Bottomley

    James Bottomley