26 Nov, 2015

1 commit

  • The xfer_rdy, command, and task frame's iu structures are not available
    in , but only aic94xx driver folder. Add them to
    include/scsi/sas.h

    Signed-off-by: John Garry
    Reviewed-by: Arnd Bergmann
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    John Garry
     

12 Nov, 2015

1 commit


10 Nov, 2015

2 commits

  • This patch changes the !blk-mq path to the same defaults as the blk-mq
    I/O path by always enabling block tagging, and always using host wide
    tags. We've had blk-mq available for a few releases so bugs with
    this mode should have been ironed out, and this ensures we get better
    coverage of over tagging setup over different configs.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jens Axboe
    Reviewed-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     
  • commit cff549e4860f ("scsi: proper state checking and module refcount
    handling in scsi_device_get") the reference count of scsi device was
    changed, which could lead to when rmmod with at least on drive attached,
    SCSI error handle will run into infinite loop, and lockup the system.

    Fix it by remove scsi host first, this way scsi core will not send
    commands down after detaching SAS transport.

    This is a follow up fix for Benjamin's fix for pm80xx.

    See also:
    http://www.spinics.net/lists/linux-scsi/msg90088.html

    Signed-off-by: Jack Wang
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Jack Wang
     

12 Sep, 2015

1 commit

  • Pull second round of SCSI updates from James Bottomley:
    "There's one late arriving patch here (added today), fixing a build
    issue which the scsi_dh patch set in here uncovered. Other than that,
    everything has been incubated in -next and the checkers for a week.

    The major pieces of this patch are a set patches facilitating better
    integration between scsi and scsi_dh (the device handling layer used
    by multi-path; all the dm parts are acked by Mike Snitzer).

    This also includes driver updates for mp3sas, scsi_debug and an
    assortment of bug fixes"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (50 commits)
    scsi_dh: fix randconfig build error
    scsi: fix scsi_error_handler vs. scsi_host_dev_release race
    fcoe: Convert use of __constant_htons to htons
    mpt2sas: setpci reset kernel oops fix
    pm80xx: Don't override ts->stat on IO_OPEN_CNX_ERROR_HW_RESOURCE_BUSY
    lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()
    bfa: Fix incorrect de-reference of pointer
    bfa: Fix indentation
    scsi_transport_sas: Remove check for SAS expander when querying bay/enclosure IDs.
    scsi_debug: resp_request: remove unused variable
    scsi_debug: fix REPORT LUNS Well Known LU
    scsi_debug: schedule_resp fix input variable check
    scsi_debug: make dump_sector static
    scsi_debug: vfree is null safe so drop the check
    scsi_debug: use SCSI_W_LUN_REPORT_LUNS instead of SAM2_WLUN_REPORT_LUNS;
    scsi_debug: define pr_fmt() for consistent logging
    mpt2sas: Refcount fw_events and fix unsafe list usage
    mpt2sas: Refcount sas_device objects and fix unsafe list usage
    scsi_dh: return SCSI_DH_NOTCONN in scsi_dh_activate()
    scsi_dh: don't allow to detach device handlers at runtime
    ...

    Linus Torvalds
     

09 Sep, 2015

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "This update has successfully completed a 0day-kbuild run and has
    appeared in a linux-next release. The changes outside of the typical
    drivers/nvdimm/ and drivers/acpi/nfit.[ch] paths are related to the
    removal of IORESOURCE_CACHEABLE, the introduction of memremap(), and
    the introduction of ZONE_DEVICE + devm_memremap_pages().

    Summary:

    - Introduce ZONE_DEVICE and devm_memremap_pages() as a generic
    mechanism for adding device-driver-discovered memory regions to the
    kernel's direct map.

    This facility is used by the pmem driver to enable pfn_to_page()
    operations on the page frames returned by DAX ('direct_access' in
    'struct block_device_operations').

    For now, the 'memmap' allocation for these "device" pages comes
    from "System RAM". Support for allocating the memmap from device
    memory will arrive in a later kernel.

    - Introduce memremap() to replace usages of ioremap_cache() and
    ioremap_wt(). memremap() drops the __iomem annotation for these
    mappings to memory that do not have i/o side effects. The
    replacement of ioremap_cache() with memremap() is limited to the
    pmem driver to ease merging the api change in v4.3.

    Completion of the conversion is targeted for v4.4.

    - Similar to the usage of memcpy_to_pmem() + wmb_pmem() in the pmem
    driver, update the VFS DAX implementation and PMEM api to provide
    persistence guarantees for kernel operations on a DAX mapping.

    - Convert the ACPI NFIT 'BLK' driver to map the block apertures as
    cacheable to improve performance.

    - Miscellaneous updates and fixes to libnvdimm including support for
    issuing "address range scrub" commands, clarifying the optimal
    'sector size' of pmem devices, a clarification of the usage of the
    ACPI '_STA' (status) property for DIMM devices, and other minor
    fixes"

    * tag 'libnvdimm-for-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (34 commits)
    libnvdimm, pmem: direct map legacy pmem by default
    libnvdimm, pmem: 'struct page' for pmem
    libnvdimm, pfn: 'struct page' provider infrastructure
    x86, pmem: clarify that ARCH_HAS_PMEM_API implies PMEM mapped WB
    add devm_memremap_pages
    mm: ZONE_DEVICE for "device memory"
    mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h
    dax: drop size parameter to ->direct_access()
    nd_blk: change aperture mapping from WC to WB
    nvdimm: change to use generic kvfree()
    pmem, dax: have direct_access use __pmem annotation
    dax: update I/O path to do proper PMEM flushing
    pmem: add copy_from_iter_pmem() and clear_pmem()
    pmem, x86: clean up conditional pmem includes
    pmem: remove layer when calling arch_has_wmb_pmem()
    pmem, x86: move x86 PMEM API to new pmem.h header
    libnvdimm, e820: make CONFIG_X86_PMEM_LEGACY a tristate option
    pmem: switch to devm_ allocations
    devres: add devm_memremap
    libnvdimm, btt: write and validate parent_uuid
    ...

    Linus Torvalds
     

29 Aug, 2015

1 commit


27 Aug, 2015

1 commit

  • We recently did some cleanup here and now the static checkers notice
    that there is a missing error code when ioremap() fails. Let's set it
    to -ENOMEM.

    Signed-off-by: Dan Carpenter
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: James Bottomley

    Dan Carpenter
     

11 Aug, 2015

1 commit

  • Quoting Arnd:
    I was thinking the opposite approach and basically removing all uses
    of IORESOURCE_CACHEABLE from the kernel. There are only a handful of
    them.and we can probably replace them all with hardcoded
    ioremap_cached() calls in the cases they are actually useful.

    All existing usages of IORESOURCE_CACHEABLE call ioremap() instead of
    ioremap_nocache() if the resource is cacheable, however ioremap() is
    uncached by default. Clearly none of the existing usages care about the
    cacheability. Particularly devm_ioremap_resource() never worked as
    advertised since it always fell back to plain ioremap().

    Clean this up as the new direction we want is to convert
    ioremap_() usages to memremap(..., flags).

    Suggested-by: Arnd Bergmann
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Dan Williams

    Dan Williams
     

01 Jun, 2015

1 commit


18 Dec, 2014

1 commit


12 Dec, 2014

1 commit

  • Pull libata changes from Tejun Heo:
    "The only interesting piece is the support for shingled drives. The
    changes in libata layer are minimal. All it does is identifying the
    new class of device and report upwards accordingly"

    * 'for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
    libata: Remove FIXME comment in atapi_request_sense()
    sata_rcar: Document deprecated "renesas,rcar-sata"
    sata_rcar: Add clocks to sata_rcar bindings
    ahci_sunxi: Make AHCI_HFLAG_NO_PMP flag configurable with a module option
    libata-scsi: Update SATL for ZAC drives
    libata: Implement ATA_DEV_ZAC
    libsas: use ata_dev_classify()

    Linus Torvalds
     

04 Dec, 2014

1 commit

  • Since we got rid of ordered tag support in 2010 the prime use case of
    switching on and off ordered tags has been obsolete. The other function
    of enabling/disabling tagging entirely has only been correctly implemented
    by the 53c700 driver and isn't generally useful.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     

27 Nov, 2014

1 commit

  • The task_collector mode (or "latency_injector", (C) Dan Willians) is an
    optional I/O path in libsas that queues up scsi commands instead of
    directly sending it to the hardware. It generall increases latencies
    to in the optiomal case slightly reduce mmio traffic to the hardware.

    Only the obsolete aic94xx driver and the mvsas driver allowed to use
    it without recompiling the kernel, and most drivers didn't support it
    at all.

    Remove the giant blob of code to allow better optimizations for scsi-mq
    in the future.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Hannes Reinecke
    Acked-by: Dan Williams

    Christoph Hellwig
     

24 Nov, 2014

1 commit

  • All drivers use the implementation for ramping the queue up and down, so
    instead of overloading the change_queue_depth method call the
    implementation diretly if the driver opts into it by setting the
    track_queue_depth flag in the host template.

    Note that a few drivers validated the new queue depth in their
    change_queue_depth method, but as we never go over the queue depth
    set during slave_configure or the sysfs file this isn't nessecary
    and can safely be removed.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Venkatesh Srinivas

    Christoph Hellwig
     

12 Nov, 2014

1 commit

  • Allow a driver to ask for block layer tags by setting .use_blk_tags in the
    host template, in which case it will always see a valid value in
    request->tag, similar to the behavior when using blk-mq. This means even
    SCSI "untagged" commands will now have a tag, which is especially useful
    when using a host-wide tag map.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

06 Nov, 2014

1 commit

  • Use the ata device class from libata in libsas instead of checking
    the supported command set and switch to using ata_dev_classify()
    instead of our own method.

    Cc: Tejun Heo
    Cc: Dan Williams
    Acked-by: Christoph Hellwig
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Tejun Heo

    Hannes Reinecke
     

05 Jun, 2013

1 commit

  • Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
    or less. Instead do all copies via cmd->cmd_len (and use a pointer to this in
    the libsas task instead of a copy). Note that this still doesn't enable > 16
    byte CDB support in the underlying drivers because their internal format has
    to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
    different. the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
    updated for this change.

    Cc: Lukasz Dorau
    Cc: Maciej Patelczyk
    Cc: Dave Jiang
    Cc: Jack Wang
    Cc: Lindar Liu
    Cc: Xiangliang Yu
    Signed-off-by: James Bottomley

    James Bottomley
     

10 May, 2013

1 commit

  • These enums have been separate since the dawn of SAS, mainly because the
    latter is a procotol only enum and the former includes additional state
    for libsas. The dichotomy causes endless confusion about which one you
    should use where and leads to pointless warnings like this:

    drivers/scsi/mvsas/mv_sas.c: In function 'mvs_update_phyinfo':
    drivers/scsi/mvsas/mv_sas.c:1162:34: warning: comparison between 'enum sas_device_type' and 'enum sas_dev_type' [-Wenum-compare]

    Fix by eliminating one of them. The one kept is effectively the sas.h
    one, but call it sas_device_type and make sure the enums are all
    properly namespaced with the SAS_ prefix.

    Signed-off-by: James Bottomley

    James Bottomley
     

04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Adam Radford
    Cc: "James E.J. Bottomley"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

06 Oct, 2012

1 commit


08 Jul, 2012

1 commit

  • fill_result_tf() grabs the taskfile flags from the originating qc which
    sas_ata_qc_fill_rtf() promptly overwrites. The presence of an
    ata_taskfile in the sata_device makes it tempting to just copy the full
    contents in sas_ata_qc_fill_rtf(). However, libata really only wants
    the fis contents and expects the other portions of the taskfile to not
    be touched by ->qc_fill_rtf. To that end store a fis buffer in the
    sata_device and use ata_tf_from_fis() like every other ->qc_fill_rtf()
    implementation.

    Cc:
    Reported-by: Praveen Murali
    Tested-by: Praveen Murali
    Signed-off-by: Dan Williams
    Signed-off-by: James Bottomley

    Dan Williams
     

30 Apr, 2012

1 commit


01 Mar, 2012

3 commits

  • If userspace has decided to disable a phy the kernel should honor that
    and not inadvertantly re-enable the phy via error recovery. This is
    more straightforward in the sata case where link recovery (via
    libata-eh) is separate from sas_task cancelling in libsas-eh. Teach
    libsas to accept -ENODEV as a successful response from I_T_nexus_reset
    ('successful' in terms of not escalating further).

    This is a more comprehensive fix then "libsas: don't recover 'gone'
    devices in sas_ata_hard_reset()", as it is no longer sata-specific.

    aic94xx does check the return value from sas_phy_reset() so if the phy
    is disabled we proceed with clearing the I_T_nexus.

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

    Dan Williams
     
  • libsas ata error handling is already async but this does not help the
    scan case. Move initial link recovery out from under host->scan_mutex,
    and delay synchronization with eh until after all port probe/recovery
    work has been queued.

    Device ordering is maintained with scan order by still calling
    sas_rphy_add() in order of domain discovery.

    Since we now scan the domain list when invoking libata-eh we need to be
    careful to check for fully initialized ata ports.

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

    Dan Williams
     
  • In the direct-attached case this routine returns the phy on which this
    device was first discovered. Which is broken if we want to support
    wide-targets, as this phy reference can become stale even though the
    port is still active.

    In the expander-attached case this routine tries to lookup the phy by
    scanning the attached sas addresses of the parent expander, and BUG_ONs
    if it can't find it. However since eh and the libsas workqueue run
    independently we can still be attempting device recovery via eh after
    libsas has recorded the device as detached. This is even easier to hit
    now that eh is blocked while device domain rediscovery takes place, and
    that libata is fed more timed out commands increasing the chances that
    it will try to recover the ata device.

    Arrange for dev->phy to always point to a last known good phy, it may be
    stale after the port is torn down, but it will catch up for wide port
    reconfigurations, and never be NULL.

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

    Dan Williams
     

20 Feb, 2012

3 commits

  • sas_discover_sata() notifies lldds of sata devices twice. Once to allow
    the 'identify' to be sent, and a second time to allow aic94xx (the only
    libsas driver that cares about sata_dev.identify) to setup NCQ
    parameters before the device becomes known to the midlayer. Replace
    this double notification and intervening 'identify' with an explicit
    ->lldd_ata_set_dmamode notification. With this change all ata internal
    commands are issued by libata, so we no longer need sas_issue_ata_cmd().

    The data from the identify command only needs to be cached in one
    location so ata_device.id replaces domain_device.sata_dev.identify.

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

    Dan Williams
     
  • When an lldd invokes ->notify_port_event() it can trigger a chain of libsas
    events to:

    1/ form the port and find the direct attached device

    2/ if the attached device is an expander perform domain discovery

    A call to flush_workqueue() will only flush the initial port formation work.
    Currently libsas users need to call scsi_flush_work() up to the max depth of
    chain (which will grow from 2 to 3 when ata discovery is moved to its own
    discovery event). Instead of open coding multiple calls switch to use
    drain_workqueue() to flush sas work.

    drain_workqueue() does not handle new work submitted during the drain so
    libsas needs a bit of infrastructure to hold off unchained work submissions
    while a drain is in flight. A lldd ->notify() event is considered 'unchained'
    while a sas_discover_event() is 'chained'. As Tejun notes:

    "For now, I think it would be best to add private wrapper in libsas to
    support deferring unchained work items while draining."

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

    Dan Williams
     
  • Per commit 3e4ec344 "libata: kill ATA_FLAG_DISABLED" needing to set
    ATA_DEV_NONE is a holdover from before libsas converted to the
    "new-style" ata-eh.

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

    Dan Williams
     

29 Oct, 2011

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (204 commits)
    [SCSI] qla4xxx: export address/port of connection (fix udev disk names)
    [SCSI] ipr: Fix BUG on adapter dump timeout
    [SCSI] megaraid_sas: Fix instance access in megasas_reset_timer
    [SCSI] hpsa: change confusing message to be more clear
    [SCSI] iscsi class: fix vlan configuration
    [SCSI] qla4xxx: fix data alignment and use nl helpers
    [SCSI] iscsi class: fix link local mispelling
    [SCSI] iscsi class: Replace iscsi_get_next_target_id with IDA
    [SCSI] aacraid: use lower snprintf() limit
    [SCSI] lpfc 8.3.27: Change driver version to 8.3.27
    [SCSI] lpfc 8.3.27: T10 additions for SLI4
    [SCSI] lpfc 8.3.27: Fix queue allocation failure recovery
    [SCSI] lpfc 8.3.27: Change algorithm for getting physical port name
    [SCSI] lpfc 8.3.27: Changed worst case mailbox timeout
    [SCSI] lpfc 8.3.27: Miscellanous logic and interface fixes
    [SCSI] megaraid_sas: Changelog and version update
    [SCSI] megaraid_sas: Add driver workaround for PERC5/1068 kdump kernel panic
    [SCSI] megaraid_sas: Add multiple MSI-X vector/multiple reply queue support
    [SCSI] megaraid_sas: Add support for MegaRAID 9360/9380 12GB/s controllers
    [SCSI] megaraid_sas: Clear FUSION_IN_RESET before enabling interrupts
    ...

    Linus Torvalds
     

03 Oct, 2011

1 commit

  • Allow the sas-transport-class to update events for local phys via a new
    PHY_FUNC_GET_EVENTS command to ->lldd_control_phy(). Fixup drivers that
    are not prepared for new enum phy_func values, and unify
    ->lldd_control_phy() error codes.

    These are the SAS defined phy events that are reported in a
    smp-report-phy-error-log command:
    * /sys/class/sas_phy//invalid_dword_count
    * /sys/class/sas_phy//running_disparity_error_count
    * /sys/class/sas_phy//loss_of_dword_sync_count
    * /sys/class/sas_phy//phy_reset_problem_count

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

    Dan Williams
     

15 Sep, 2011

1 commit


25 May, 2011

1 commit


31 Mar, 2011

1 commit


17 Mar, 2011

1 commit


03 Nov, 2010

1 commit


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

11 Aug, 2010

1 commit

  • In each case, the destination of the allocation has type struct **, so the
    elements of the array should have pointer type, not structure type.

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

    //
    @disable sizeof_type_expr@
    type T;
    T **x;
    @@

    x =

    //

    Signed-off-by: Julia Lawall
    Cc: Rolf Eike Beer
    Cc: Joe Perches
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     

05 Aug, 2010

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (48 commits)
    Documentation: update broken web addresses.
    fix comment typo "choosed" -> "chosen"
    hostap:hostap_hw.c Fix typo in comment
    Fix spelling contorller -> controller in comments
    Kconfig.debug: FAIL_IO_TIMEOUT: typo Faul -> Fault
    fs/Kconfig: Fix typo Userpace -> Userspace
    Removing dead MACH_U300_BS26
    drivers/infiniband: Remove unnecessary casts of private_data
    fs/ocfs2: Remove unnecessary casts of private_data
    libfc: use ARRAY_SIZE
    scsi: bfa: use ARRAY_SIZE
    drm: i915: use ARRAY_SIZE
    drm: drm_edid: use ARRAY_SIZE
    synclink: use ARRAY_SIZE
    block: cciss: use ARRAY_SIZE
    comment typo fixes: charater => character
    fix comment typos concerning "challenge"
    arm: plat-spear: fix typo in kerneldoc
    reiserfs: typo comment fix
    update email address
    ...

    Linus Torvalds
     

28 Jul, 2010

1 commit

  • We have two separate definitions for identical constants with nearly the
    same name. One comes from the generic headers in scsi.h; the other is
    an enum in libsas.h ... it's causing confusion about which one is
    correct (fortunately they both are).

    Fix this by eliminating the libsas.h duplicate

    Signed-off-by: James Bottomley

    James Bottomley