21 Dec, 2014

1 commit

  • Pull SCSI update from James Bottomley:
    "This is a much shorter set of patches that were on the go but didn't
    make it in to the early pull request for the merge window. It's
    really a set of bug fixes plus some final cleanup work on the new tag
    queue API"

    * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    storvsc: ring buffer failures may result in I/O freeze
    ipr: set scsi_level correctly for disk arrays
    ipr: add support for async scanning to speed up boot
    scsi_debug: fix missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case
    scsi_debug: take sdebug_host_list_lock when changing capacity
    scsi_debug: improve driver description in Kconfig
    scsi_debug: fix compare and write errors
    qla2xxx: fix race in handling rport deletion during recovery causes panic
    scsi: blacklist RSOC for Microsoft iSCSI target devices
    scsi: fix random memory corruption with scsi-mq + T10 PI
    Revert "[SCSI] mpt3sas: Remove phys on topology change"
    Revert "[SCSI] mpt2sas: Remove phys on topology change."
    esas2r: Correct typos of "validate" in a comment
    fc: FCP_PTA_SIMPLE is 0
    ibmvfc: remove unused tag variable
    scsi: remove MSG_*_TAG defines
    scsi: remove scsi_set_tag_type
    scsi: remove scsi_get_tag_type
    scsi: never drop to untagged mode during queue ramp down
    scsi: remove ->change_queue_type method

    Linus Torvalds
     

19 Dec, 2014

1 commit

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     

18 Dec, 2014

1 commit


15 Dec, 2014

1 commit

  • After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
    selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
    depending on CONFIG_PM_RUNTIME may now be changed to depend on
    CONFIG_PM.

    Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
    drivers/scsi/ and in include/scsi/scsi_device.h.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Aaron Lu
    Acked-by: Christoph Hellwig

    Rafael J. Wysocki
     

13 Dec, 2014

1 commit

  • Pull trivial tree update from Jiri Kosina:
    "Usual stuff: documentation updates, printk() fixes, etc"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (24 commits)
    intel_ips: fix a type in error message
    cpufreq: cpufreq-dt: Move newline to end of error message
    ps3rom: fix error return code
    treewide: fix typo in printk and Kconfig
    ARM: dts: bcm63138: change "interupts" to "interrupts"
    Replace mentions of "list_struct" to "list_head"
    kernel: trace: fix printk message
    scsi: mpt2sas: fix ioctl in comment
    zbud, zswap: change module author email
    clocksource: Fix 'clcoksource' typo in comment
    arm: fix wording of "Crotex" in CONFIG_ARCH_EXYNOS3 help
    gpio: msm-v1: make boolean argument more obvious
    usb: Fix typo in usb-serial-simple.c
    PCI: Fix comment typo 'COMFIG_PM_OPS'
    powerpc: Fix comment typo 'CONIFG_8xx'
    powerpc: Fix comment typos 'CONFiG_ALTIVEC'
    clk: st: Spelling s/stucture/structure/
    isci: Spelling s/stucture/structure/
    usb: gadget: zero: Spelling s/infrastucture/infrastructure/
    treewide: Fix company name in module descriptions
    ...

    Linus Torvalds
     

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
     

08 Dec, 2014

1 commit


04 Dec, 2014

4 commits


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
     

25 Nov, 2014

4 commits

  • SPC-3 defines SERVICE ACTION IN(12), SERVICE_ACTION OUT(12),
    SERVICE ACTION OUT(16), and SERVICE ACTION BIDIRECTIONAL.
    And READ MEDIA SERIAL NUMBER has long since been deprecated.
    So update callers to refer to the new cdb name.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16).
    So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be
    consistent with SPC and to allow for better distinction.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • The driver core driver structure has grown an owner field and now
    requires it to be set for all modular drivers. Set it up for
    all scsi_driver instances and get rid of the now superflous
    scsi_driver owner field.

    Signed-off-by: Christoph Hellwig
    Reported-by: Shane M Seymour
    Reviewed-by: Ewan D. Milne

    Christoph Hellwig
     
  • There is no reason for ULDs to pass in a flag on how to allocate the S/G
    lists. While we don't need GFP_ATOMIC for the blk-mq case because we
    don't hold locks, that decision can be made way down the chain without
    having to pass a pointless gfp_mask argument.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Bart Van Assche
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

24 Nov, 2014

2 commits

  • Drop the now unused reason argument from the ->change_queue_depth method.
    Also add a return value to scsi_adjust_queue_depth, and rename it to
    scsi_change_queue_depth now that it can be used as the default
    ->change_queue_depth implementation.

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

    Christoph Hellwig
     
  • 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
     

20 Nov, 2014

1 commit


12 Nov, 2014

21 commits

  • Remove the tagged argument from scsi_adjust_queue_depth, and just let it
    handle the queue depth. For most drivers those two are fairly separate,
    given that most modern drivers don't care about the SCSI "tagged" status
    of a command at all, and many old drivers allow queuing of multiple
    untagged commands in the driver.

    Instead we start out with the ->simple_tags flag set before calling
    ->slave_configure, which is how all drivers actually looking at
    ->simple_tags except for one worke anyway. The one other case looks
    broken, but I've kept the behavior as-is for now.

    Except for that we only change ->simple_tags from the ->change_queue_type,
    and when rejecting a tag message in a single driver, so keeping this
    churn out of scsi_adjust_queue_depth is a clear win.

    Now that the usage of scsi_adjust_queue_depth is more obvious we can
    also remove all the trivial instances in ->slave_alloc or ->slave_configure
    that just set it to the cmd_per_lun default.

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

    Christoph Hellwig
     
  • 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
     
  • Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     
  • Unless we want to build a SPI tag message we should just check SCMD_TAGGED
    instead of reverse engineering a tag type through the use of
    scsi_populate_tag_msg.

    Also rename the function to spi_populate_tag_msg, make it behave like the
    other spi message helpers, and move it to the spi transport class.

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

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

    Christoph Hellwig
     
  • Remove the ordered_tags field, we haven't been issuing ordered tags based
    on it since the big barrier rework in 2010.

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

    Christoph Hellwig
     
  • Currently scsi piggy backs on the block layer to define the concept
    of a tagged command. But we want to be able to have block-level host-wide
    tags assigned even for untagged commands like the initial INQUIRY, so add
    a new SCSI-level flag for commands that are tagged at the scsi level, so
    that even commands without that set can have tags assigned to them. Note
    that this alredy is the case for the blk-mq code path, and this just lets
    the old path catch up with it.

    We also set this flag based upon sdev->simple_tags instead of the block
    queue flag, so that it is entirely independent of the block layer tagging,
    and thus always correct even if a driver doesn't use block level tagging
    yet.

    Also remove the old blk_rq_tagged; it was only used by SCSI drivers, and
    removing it forces them to look for the proper replacement.

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

    Christoph Hellwig
     
  • Most drivers use exactly the same implementation, so provide it as a
    library function.

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

    Christoph Hellwig
     
  • Move all code to set up and tear down sdev->scsi_dh_data to common code.

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

    Christoph Hellwig
     
  • All drivers now do their own matching, so there is no more need to expose
    a device list as part of the interface.

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

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

    Christoph Hellwig
     
  • The calling conventions for this function are bad as it could return
    -ENODEV both for a device not currently online and a not recognized ioctl.

    Add a new scsi_ioctl_block_when_processing_errors function that wraps
    scsi_block_when_processing_errors with the a special case for the
    SG_SCSI_RESET ioctl command, and handle the SG_SCSI_RESET case itself
    in scsi_ioctl. All callers of scsi_ioctl now must call the above helper
    to check for the EH state, so that the ioctl handler itself doesn't
    have to.

    Reported-by: Robert Elliott
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     
  • Pull the common code from the two callers into the function,
    and rename it to scsi_ioctl_reset.

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

    Christoph Hellwig
     
  • Modify scsi_find_tag() and scsi_host_find_tag() such that these
    functions can translate a tag generated by blk_mq_unique_tag().

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

    Bart Van Assche
     
  • Allow a SCSI LLD to declare how many hardware queues it supports
    by setting Scsi_Host.nr_hw_queues before calling scsi_add_host().

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

    Bart Van Assche
     
  • Simplify scsi_log_(send|completion) by externalizing
    scsi_mlreturn_string() and always print the command address.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Open-code scsi_print_result in sd.c, and cleanup logging to
    not print duplicate informations.
    Also remove the call to scsi_show_result() in ufshcd.c
    to be consistent with other callers of scsi_execute().

    With that we can remove scsi_show_result in constants.c

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Export functions for later use.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • print_opcode_name() was only ever called with a '0' argument
    from LLDDs and ULDs which were _not_ supporting variable length
    CDBs, so the 'if' clause was never triggered.
    Instead we should be using the last argument to specify
    the cdb length to avoid accidental overflow when reading
    the cdb buffer.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Last caller is gone, so we can remove it.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Convert scsi_normalize_sense() and friends to return 'bool'
    instead of an integer.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Robert Elliott
    Reviewed-by: Yoshihiro Yunomae
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke