03 Oct, 2011

9 commits

  • Re-arrange its fields to avoid padding and have better
    cacheline alignments.

    Removed not used start_time, end_time and last_pkt_time
    fields.

    This all reduced this struct size to 448 from 480 and
    that also reduced one cacheline on x86_64 beside
    eliminating 8 pads. However kept logical fields together.

    Signed-off-by: Vasu Dev
    Tested-by: Ross Brattain
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Vasu Dev
     
  • Since fcoe_percpu_thread_create() creates percpu kthread, it makes sense
    to use kthread_create_on_node() to get proper NUMA affinity for kthread
    stack.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Yi Zou
    Signed-off-by: James Bottomley

    Eric Dumazet
     
  • Libsas forget to set the sas_address and device type of rphy lead to file
    under /sys/class/sas_x show wrong value, fix that.

    Signed-off-by: Jack Wang
    Tested-by: Crystal Yu
    Cc: stable@kernel.org
    Signed-off-by: James Bottomley

    Jack Wang
     
  • libsas handles:
    1/ limiting ata scanning to lun0
    2/ changes to /sys/block//device/queue_depth for ata devices

    libata handles turning off ncq globally via kernel command line
    (libata.force=noncq) or sysfs (echo 1 >
    /sys/block//device/queue_depth). A lldd specific compile option is
    not necessary.

    Cc: Jack Wang
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • libsas now handles:
    1/ limiting ata scanning to lun0
    2/ maximizing the queue_depth of sas devices (up to 256, mvsas only
    supports 64)
    3/ changes to /sys/block//device/queue_depth for ata devices

    Acked-by: Xiangliang Yu
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • The queue-depth for libsas-attached devices initializes to 32 and can
    only be increased manually via sysfs to a max of 64, while mpt2sas
    attached devices initialize to 254 and dynamically float via the
    midlayer ->change_queue_depth interface.

    No performance regression was observed with this change on the isci
    driver.

    Tested-by: Dave Jiang
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Pass queue_depth change requests to libata, and prevent queue_type
    changes for ATA devices.

    Otherwise:
    1/ we do not honor the libata specific restrictions on the queue depth
    2/ libsas drivers that do not set sdev->tagged_supported are unable to
    change the queue_depth of ata devices via sysfs

    Signed-off-by: Dan Williams
    Acked-by: Jeff Garzik
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Currently mvsas and pm8001 have custom ->slave_alloc implementations to
    achieve this. Uplevel it for all libsas drivers as isci encounters problems
    with atapi devices when scanning past lun0.

    Just do what Darrick suggested [1], and limit the scan for ata devices.

    [1] http://marc.info/?l=linux-scsi&m=116604101119861&w=2

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Allow expander table-to-table attachments for
    expanders that support it.

    Signed-off-by: Luben Tuikov
    Signed-off-by: James Bottomley

    Luben Tuikov
     

22 Sep, 2011

14 commits

  • When the ipr driver decides to dump the adapter, it changes the
    sdt_state to GET_DUMP, then prepares the adapter so that the dump
    can be read. However, if the ipr worker thread wakes up for some
    reason before the driver has put the adapter in a state where it
    can succesfully dump the adapter, the driver will start dumping
    the adapter too early, which can potentially trigger a BUG check
    in the pci config blocking API. Fix this by adding a new
    sdt_state to differentiate between the ipr driver wanting to dump
    the adapter in the near future and wanting to dump the adapter now.

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

    Brian King
     
  • Signed-off-by: Vijay Chauhan
    Reviewed-by: Bob Stankey
    Reviewed-by: Babu Moger
    Acked-by: Chandra Seetharaman
    Signed-off-by: James Bottomley

    Chauhan, Vijay
     
  • Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • Gracefully handle bnx2fc_map_sg failure, so that queuecommand returns host busy
    and SCSI-ml can retry the IO.

    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • scsi_dma_map doesn't work for NPIV since vport dev isn't fully initialized.

    For more details: http://marc.info/?l=linux-scsi&m=118312448030633&w=2 and
    commit - c59fd9ebc46da8d48b76955d4d48e3597f8c8726.

    Signed-off-by: Nithin Sujir
    Signed-off-by: Bhanu Prakash Gollapudi
    Signed-off-by: James Bottomley

    Bhanu Prakash Gollapudi
     
  • When READ_16 command is issued, the setting of SILI Bit in CDB is confirmed
    and if SILI bit is off, the processing of relavent Errata is executed.

    Added code for checking SILI bit for READ_16 as described in "SSC-4".

    Signed-off-by: Nagalakshmi Nandigama
    Signed-off-by: James Bottomley

    nagalakshmi.nandigama@lsi.com
     
  • Sizeof a pointer-typed expression returns the size of the pointer, not that
    of the pointed data.

    The semantic patch that fixes this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @@
    expression *e;
    type T;
    identifier f;
    @@

    f(...,(T)e,...,
    -sizeof(e)
    +sizeof(*e)
    ,...)
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: James Bottomley

    Julia Lawall
     
  • Mutual exclusion is redundant here because all the paths in the call graph
    leading to esp_driver_ops.send_dma_cmd() happen under spin_lock_irqsave/
    spin_lock_irqrestore. Remove it.

    Tested on a Mac Quadra 660av and a Mac LC 630.

    Signed-off-by: Finn Thain
    Signed-off-by: James Bottomley

    Finn Thain
     
  • Signed-off-by: Nagalakshmi Nandigama
    Signed-off-by: James Bottomley

    nagalakshmi.nandigama@lsi.com
     
  • Support added for controllers capable of multi reply queues.

    The following are the modifications to the driver to support NUMA.

    1) Create the new structure adapter_reply_queue to contain the reply queue
    info for every msix vector. This object will contain a
    reply_post_host_index, reply_post_free for each instance, msix_index, among
    other parameters. We will track all the reply queues on a link list called
    ioc->reply_queue_list. Each reply queue is aligned with each IRQ, and is
    passed to the interrupt via the bus_id parameter.

    (2) The driver will figure out the msix_vector_count from the PCIe MSIX
    capabilities register instead of the IOC Facts->MaxMSIxVectors. This is
    because the firmware is not filling in this field until the driver has
    already registered MSIX support.

    (3) If the ioc_facts reports that the controller is MSIX compatible in the
    capabilities, then the driver will request for multiple irqs. This count
    is calculated based on the minimum between the online cpus available and
    the ioc->msix_vector_count. This count is reported to firmware in the
    ioc_init request.

    (4) New routines were added _base_free_irq and _base_request_irq, so
    registering and freeing msix vectors were done thru simple function API.

    (5) The new routine _base_assign_reply_queues was added to align the msix
    indexes across cpus. This will initialize the array called
    ioc->cpu_msix_table. This array is looked up on every MPI request so the
    MSIxIndex is set appropriately.

    (6) A new shost sysfs attribute was added to report the reply_queue_count.

    (7) User needs to set the affinity cpu mask, so the interrupts occur on the
    same cpu that sent the original request.

    Signed-off-by: Nagalakshmi Nandigama
    Signed-off-by: James Bottomley

    nagalakshmi.nandigama@lsi.com
     
  • This patch adds couple more Vendor/Product IDs for RDAC.. There are no
    functional changes.

    Signed-off-by: Babu Moger
    Signed-off-by: James Bottomley

    Moger, Babu
     
  • Basic support to initialize the gpio unit, accept an incomming
    SAS_GPIO_REG_TX_GP bitstream, and translate it to the ODx.n fields in
    the hardware registers. If register indexes outside the supported range
    are specified in the SMP frame we simply accept the write and return how
    many registers (SFF-8485) were written (libsas reports this as residue
    in the request).

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • output_data_select registers are off by one u32

    delete the macros we will never use.

    Reported-by: Artur Wojcik
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     
  • Add SFF-8485 v0.7 / SAS-1 smp-write-gpio register support to libsas.
    Defer SAS-2 support unless/until it defines an sgpio interface.

    Minimum implementation needed to get the lights blinking.
    try_test_sas_gpio_gp_bit() provides a common method to parse the
    incoming write data (raw bitstream), and the to_sas_gpio_gp_bit() helper
    routine can be used as a basis for the set/clear operations for the
    'read' implementation. Host implementations parse as many bits
    (ODx.[012]) as are locally supported and report the number of registers
    successfully written. If the submitted data overruns the internal
    number of registers available report the write as a success with the
    number of bytes remaining reported in ->resid_len.

    Example (assuming an active backplane) set the "identify" pattern for
    the first 21 devices:

    smp_write_gpio --count=2 --data=92,49,24,92,24,92,49,24 -t 4 --index=1 /dev/bsg/sas_hostX

    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     

18 Sep, 2011

3 commits


17 Sep, 2011

6 commits


31 Aug, 2011

8 commits

  • The alua device handler starts the first retry after 10 seconds,
    and increases it times 10 for each round.
    This leads to an unnecessary delay. This patch modifies it to
    start after one second, and increase by a factor of two.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • For Target Portal Group IDs occupying the full 2 bytes in the
    RTPG response, the following group_id check in the alua_rtpg
    routine always fails in scsi_dh_alua.c:

    if (h->group_id == (ucp[2] << 8) + ucp[3]) {

    This causes the ALUA handler to wrongly identify the AAS of
    a specified device as well as incorrectly interpreting the
    supported AAS of the target as seen by the following entries
    in the /var/log/messages:

    "alua: port group 3ea state A supports tousna"
    "alua: port group 3e9 state A supports tousna"

    This is because 'ucp' is wrongly declared in alua_rtpg as
    a character pointer instead of an unsigned character pointer.

    Signed-off-by: Martin George
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Avoid attaching a hardware handler to a device which is
    already scheduled for deletion.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • When activating a patch we should always update the TPGS state
    as it might have changed in between.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Some device handler types are not tied to the vendor/model
    but rather to a specific capability. Eg ALUA is supported
    if the 'TPGS' setting in the standard inquiry is set.
    This patch implements a 'match' callback for device handler
    which supersedes the original vendor/model lookup and
    implements the callback for the ALUA handler.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Fixup some kernel-doc comments to reference to the
    correct function name.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • Instead of issuing a standard inquiry from within the
    alua device handler we can evaluate the TPGS setting from
    the existing inquiry data of the sdev and save us the I/O.

    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     
  • ->queuecommand must return either 0, or one of the SCSI_MLQUEUE_* return
    values. Non-transient errors are indicated by setting cmd->result before
    calling ->scsi_done and returning 0. Fix libsas to adhere to this calling
    convention. Note that the DID_ERROR for returns from the low-level driver
    might not be correct for all cases, but it's the best we can do with
    the current layering in libsas. I also suspect that the pre-existing
    handling of -SAS_QUEUE_FULL should really be SCSI_MLQUEUE_HOST_BUSY, but
    I'll leave that for a separate change.

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

    Christoph Hellwig