20 Feb, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6:
    [SCSI] SCSI core: better initialization for sdev->scsi_level
    [SCSI] scsi_proc.c: display sdev->scsi_level correctly
    [SCSI] megaraid_sas: update version and author info
    [SCSI] megaraid_sas: return sync cache call with success
    [SCSI] megaraid_sas: replace pci_alloc_consitent with dma_alloc_coherent in ioctl path
    [SCSI] megaraid_sas: add bios_param in scsi_host_template
    [SCSI] megaraid_sas: do not process cmds if hw_crit_error is set
    [SCSI] scsi_transport.h should include scsi_device.h
    [SCSI] aic79xx: remove extra newline from info message
    [SCSI] scsi_scan.c: handle bad inquiry responses
    [SCSI] aic94xx: tie driver to the major number of the sequencer firmware
    [SCSI] lpfc: add PCI error recovery support
    [SCSI] megaraid: pci_module_init to pci_register_driver
    [SCSI] tgt: fix the user/kernel ring buffer interface
    [SCSI] sgiwd93: interfacing to wd33c93
    [SCSI] wd33c93: Fast SCSI with WD33C93B

    Linus Torvalds
     

17 Feb, 2007

2 commits

  • there's a USB mass storage device which exists in two version. One
    reports the correct size and the other does not. Apart from that they
    are identical and cannot be told apart. Here's a heuristic based on the
    empirical finding that drives have even sizes.

    Signed-off-by: Oliver Neukum
    Acked-by: Alan Stern
    Acked-by: Matthew Dharm
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     
  • scsi_transport.h defines the inline function scsi_transport_device_data() that
    dereferences a pointer of "struct scsi_device *". Since the struct is not
    known by the header this might break compilation.

    Include scsi/scsi_device.h to not rely on users doing the correct magic
    include order.

    Signed-off-by: Rolf Eike Beer
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Rolf Eike Beer
     

16 Feb, 2007

1 commit

  • This patches fixes two bugs in the scsi target infrastructure's
    user/kernel interface.

    - It wrongly assumes that the ring buffer size of the interface (64KB)
    is larger than or equal to the system page size. This patch sets the
    ring buffer size to PAGE_SIZE if the system page size is larger.

    - It uses PAGE_SIZE in the header file exported to userspace. This
    patch removes it.

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

    FUJITA Tomonori
     

12 Feb, 2007

2 commits

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (97 commits)
    [SCSI] zfcp: removed wrong comment
    [SCSI] zfcp: use of uninitialized variable
    [SCSI] zfcp: Invalid locking order
    [SCSI] aic79xx: use dma_get_required_mask()
    [SCSI] aic79xx: fix bracket mismatch in unused macro
    [SCSI] BusLogic: Replace 'boolean' by 'bool'
    [SCSI] advansys: clean up warnings
    [SCSI] 53c7xx: brackets fix in uncompiled code
    [SCSI] nsp_cs: remove old scsi code
    [SCSI] aic79xx: make ahd_match_scb() static
    [SCSI] DAC960: kmalloc->kzalloc/Casting cleanups
    [SCSI] scsi_kmap_atomic_sg(): check that local irqs are disabled
    [SCSI] Buslogic: local_irq_disable() is redundant after local_irq_save()
    [SCSI] aic94xx: update for v28 firmware
    [SCSI] scsi_error: Fix lost EH commands
    [SCSI] aic94xx: Add default bus reset handler
    [SCSI] aic94xx: Remove TMF result code munging
    [SCSI] libsas: Add an LU reset mechanism to the error handler
    [SCSI] libsas: Don't BUG when connecting two expanders via wide port
    [SCSI] st: fix Tape dies if wrong block size used, bug 7919
    ...

    Linus Torvalds
     
  • Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the
    corresponding "kmem_cache_zalloc()" call.

    Signed-off-by: Robert P. J. Day
    Cc: "Luck, Tony"
    Cc: Andi Kleen
    Cc: Roland McGrath
    Cc: James Bottomley
    Cc: Greg KH
    Acked-by: Joel Becker
    Cc: Steven Whitehouse
    Cc: Jan Kara
    Cc: Michael Halcrow
    Cc: "David S. Miller"
    Cc: Stephen Smalley
    Cc: James Morris
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

11 Feb, 2007

1 commit


10 Feb, 2007

1 commit


03 Feb, 2007

2 commits


28 Jan, 2007

2 commits

  • This patch moves the code that handles SAS failures out of the main EH
    function and into a separate function. It also detects commands that have
    no sas_task (i.e. they completed, but with error data) and sends them into
    scsi_error for processing. This allows us to handle SCSI errors (and
    enables auto-spinup as a side effect) instead of dropping them on the
    floor and falling into an infinite loop. It also requires the
    implementation of a device reset function, which the SAS failure code has
    been modified to employ for REQ_DEVICE_RESET.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • sas_rphy_delete does two things: it removes the sas_rphy from the transport
    layer and frees the sas_rphy. This can be broken down into two functions,
    sas_rphy_remove and sas_rphy_free; sas_rphy_remove is of interest to
    sas_discover_root_expander because it calls functions that require
    sas_rphy_add as a prerequisite and can fail (namely sas_discover_expander).
    In that case, sas_discover_root_expander needs to be able to undo the effects
    of sas_rphy_add yet leave the job of freeing the sas_rphy to the caller of
    sas_discover_root_expander.

    This patch also removes some unnecessary code from sas_discover_end_dev
    to eliminate an unnecessary cycle of sas_notify_lldd_gone/found for SAS
    devices, thus eliminating a sas_rphy_remove call (and fixing a race condition
    where a SCSI target scan can come in between the gone and found call).
    It also moves the sas_rphy_free calls into sas_discover_domain and
    sas_ex_discover_end_dev to complement the sas_rphy_allocation via
    sas_get_port_device.

    This patch does not change the semantics of sas_rphy_delete.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     

14 Jan, 2007

6 commits

  • Track sas_ha_struct state so that we ignore events that come in while
    we're shutting things down.

    Signed-off-by: Malahal Naineni
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • sas_task_abort() should simply abort the upper-level SCSI command and wait
    until the error handler to send the actual ABORT TASK command. By
    deferring things to the EH we simplify the concurrency coordination and
    eliminate some race conditions. Note that sas_task_abort has a few hooks
    to handle libsas internal commands properly too.

    Also rename do_sas_task_abort to __sas_task_abort just in case we really
    want to abort the task *right now* and we don't have a scsi_cmnd attached
    to the command. This is a hook for libata internal commands to abort.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • When a SAS LLDD needs to request a device port reset, it needs to have all
    commands aborted before it can reset the port. Since commands are put on
    the EH's list in the order that they were queued, the LLDD can set a "need
    reset" flag in the last task to be aborted so that the EH can reset the
    port after all commands are aborted.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • This flag is no longer necessary because we push tasks to be aborted into
    the EH as soon as we possibly can, and let the SCSI EH code take care of
    the coordination for which this flag was used.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • This patch lets a user arbitrarily enable or disable a phy via sysfs.
    Potential applications include shutting down a phy to replace one
    lane of wide port, and (more importantly) providing a method for the
    libata SATL to control the phy.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • …LLDD or have already returned

    On a system with many SAS targets, it appears possible that a scsi_cmnd
    can time out without ever making it to the SAS LLDD or at the same time
    that a completion is occurring. In both of these cases, telling the
    LLDD to abort the sas_task makes no sense because the LLDD won't know
    about the sas_task; what we really want to do is to increase the timer.
    Note that this involves creating another sas_task bit to indicate
    whether or not the task has been sent to the LLDD; I could have
    implemented this by slightly redefining SAS_TASK_STATE_PENDING, but
    this way seems cleaner.

    This second version amends the aic94xx portion to set the
    TASK_AT_INITIATOR flag for all sas_tasks that were passed to
    lldd_execute_task.

    Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
    Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

    Darrick J. Wong
     

08 Dec, 2006

1 commit

  • Replace all uses of kmem_cache_t with struct kmem_cache.

    The patch was generated using the following script:

    #!/bin/sh
    #
    # Replace one string by another in all the kernel sources.
    #

    set -e

    for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
    quilt add $file
    sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
    mv /tmp/$$ $file
    quilt refresh
    done

    The script was run like this

    sh replace kmem_cache_t "struct kmem_cache"

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     

06 Dec, 2006

4 commits


05 Dec, 2006

1 commit


04 Dec, 2006

1 commit


03 Dec, 2006

1 commit


29 Nov, 2006

1 commit


26 Nov, 2006

3 commits

  • The user-space daemon and tgt kernel module need bi-directional
    kernel/user high-performance interface, however, mainline provides no
    standard interface like that.

    This patch adds shared memory interface between kernel and user spaces
    like some other drivers do by using own character device. The
    user-space daemon and tgt kernel module creates shared memory via mmap
    and use it like ring buffer. poll (kernel to user) and write (user to
    kernel) system calls are used for notification.

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

    FUJITA Tomonori
     
  • The core scsi target lib functions.

    TODO:
    - mv md/dm-bio-list.h to linux/bio-list.h so md and us do not have to
    do that weird include.
    - convert scsi_tgt_cmd's work struct to James's execute code. And try
    to kill our scsi_tgt_cmd.
    - add host state checking. We do refcouting so hotplug is partially
    supported, but we need to add state checking to make it easier on
    the LLD.

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

    FUJITA Tomonori
     
  • This patch contains the needed changes to the scsi-ml for the target
    mode support.

    Note, per the last review we moved almost all the fields we added
    to the scsi_cmnd to our internal data structure which we are going
    to try and kill off when we can replace it with support from other
    parts of the kernel.

    The one field we left on was the offset variable. This is needed to handle
    the case where the target gets request that is so large that it cannot
    execute it in one dma operation. So max_secotors or a segment limit may
    limit the size of the transfer. In this case our tgt core code will
    break up the command into managable transfers and send them to the
    LLD one at a time. The offset is then used to tell the LLD where in
    the command we are at. Is there another field on the scsi_cmd for
    that?

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

    FUJITA Tomonori
     

23 Nov, 2006

3 commits

  • If a driver can find its own targets, it can now fill in scan_finished and
    (optionally) scan_start in the scsi_host_template. Then, when it calls
    scsi_scan_host(), it will be called back (from a thread if asynchronous
    discovery is enabled), first to start the scan, and then at intervals to
    check if the scan is completed.

    Also make scsi_prep_async_scan and scsi_finish_async_scan static.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • James Bottomley
     
  • This patch implements a REQ_DEVICE_RESET handler for the aic94xx
    driver. Like the earlier REQ_TASK_ABORT patch, this patch defers the
    device reset to the Scsi_Host's workqueue, which has the added benefit
    of ensuring that the device reset does not happen at the same time
    that the abort tmfs are being processed. After the phy reset, the
    busted drive should go away and be re-detected later, which is indeed
    what I've seen on both a x260 and a x206m.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     

22 Nov, 2006

1 commit


16 Nov, 2006

3 commits

  • scsi_assign_lock has been unused for a long time and is a bad idea
    in general, so kill it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • This patch adds an external function, sas_abort_task, to enable LLDDs
    to abort sas_tasks. It also adds a work_struct so that the actual
    work of aborting a task can be shifted from tasklet context (in the
    LLDD) onto the scsi_host's workqueue.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     
  • This patch adds an EH done queue to sas_ha, converts the error handling
    strategy function and the sas_scsi_task_done functions in libsas to use
    the scsi_eh_* commands for error'd commands, and adds checks for the
    INITIATOR_ABORTED flag so that we do the right thing if a sas_task has
    been aborted by the initiator.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: James Bottomley

    Darrick J. Wong
     

26 Oct, 2006

3 commits