28 Sep, 2016

1 commit


27 Sep, 2016

1 commit

  • This patch avoids that the following memory leak is triggered if
    use_blk_mq is disabled after a SCSI host has been allocated by the
    ib_srp driver and before the same SCSI host is freed:

    unreferenced object 0xffff8803a168c568 (size 256):
    backtrace:
    [] kmemleak_alloc+0x45/0xa0
    [] __kmalloc_node+0x1e4/0x400
    [] blk_mq_alloc_tag_set+0xb4/0x230
    [] scsi_mq_setup_tags+0xc7/0xd0
    [] scsi_add_host_with_dma+0x216/0x2d0
    [] srp_create_target+0xe55/0x13d0 [ib_srp]
    [] dev_attr_store+0x13/0x20
    [] sysfs_kf_write+0x40/0x50
    [] kernfs_fop_write+0x137/0x1c0
    [] __vfs_write+0x23/0x140
    [] vfs_write+0xb0/0x190
    [] SyS_write+0x44/0xa0
    [] entry_SYSCALL_64_fastpath+0x18/0xa8

    Fixes: 9aa9cc4221f5 ("scsi: remove the disable_blk_mq host flag")
    Signed-off-by: Bart Van Assche
    Cc: Christoph Hellwig
    Cc: Martin K. Petersen
    Cc:
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

19 Aug, 2016

3 commits


05 Aug, 2016

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The most notable item is IBM virtual SCSI target driver, that was
    originally ported to target-core back in 2010 by Tomo-san, and has
    been brought forward to v4.x code by Bryant Ly, Michael Cyr and co
    over the last months.

    Also included are two ORDERED task related bug-fixes Bryant + Michael
    found along the way using ibmvscsis with AIX guests, plus a few
    miscellaneous target-core + iscsi-target bug-fixes with associated
    stable tags"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    target: fix spelling mistake: "limitiation" -> "limitation"
    target: Fix residual overflow handling in target_complete_cmd_with_length
    tcm_fc: set and unset FCP_SPPF_TARG_FCN
    iscsi-target: Fix panic when adding second TCP connection to iSCSI session
    ibmvscsis: Initial commit of IBM VSCSI Tgt Driver
    target: Fix ordered task CHECK_CONDITION early exception handling
    target: Fix ordered task target_setup_cmd_from_cdb exception hang
    target: Fix max_unmap_lba_count calc overflow
    target: Fix race between iscsi-target connection shutdown + ABORT_TASK
    target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP

    Linus Torvalds
     

21 Jul, 2016

1 commit

  • When running in VN2VN mode there is no central instance which would send
    out any FIP VLAN discovery notifications. So this patch adds a new sysfs
    attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery
    responder.

    Signed-off-by: Hannes Reinecke
    Acked-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     

20 Jul, 2016

1 commit

  • This driver is a pick up of the old IBM VIO scsi Target Driver
    that was started by Nick and Fujita 2-4 years ago.
    http://comments.gmane.org/gmane.linux.scsi/90119

    The driver provides a virtual SCSI device on IBM Power Servers.

    This patch contains the fifth version for an initial merge of the
    tcm ibmvscsis driver. More information on this driver and config
    can be found:

    https://github.com/powervm/ibmvscsis/wiki/Configuration
    http://www.linux-iscsi.org/wiki/IBM_vSCSI

    (Drop extra libsrp review breakage + Fix kconfig typo - nab)

    Signed-off-by: Steven Royer
    Signed-off-by: Tyrel Datwyler
    Signed-off-by: Michael Cyr
    Signed-off-by: Bryant G. Ly
    Cc: FUJITA Tomonori
    Signed-off-by: Nicholas Bellinger

    Bryant G. Ly
     

16 Jul, 2016

1 commit


14 Jul, 2016

3 commits


13 Jul, 2016

1 commit

  • The driver creates its own per-CPU threads which are updated based on
    CPU hotplug events. It is also possible to use kworkers and remove some
    of the kthread infrastrucure.

    The code checked ->thread to decide if there is an active per-CPU
    thread. By using the kworker infrastructure this is no longer
    possible (or required). The thread pointer is saved in `kthread' instead
    of `thread' so anything trying to use thread is caught by the
    compiler. Currently only the bnx2fc driver is using struct fcoe_percpu_s
    and the kthread member.

    After a CPU went offline, we may still enqueue items on the "offline"
    CPU. This isn't much of a problem. The work will be done on a random
    CPU. The allocated crc_eof_page page won't be cleaned up. It is probably
    expected that the CPU comes up at some point so it should not be a
    problem. The crc_eof_page memory is released of course once the module
    is removed.

    This patch was only compile-tested due to -ENODEV.

    Cc: Vasu Dev
    Cc: "James E.J. Bottomley"
    Cc: "Martin K. Petersen"
    Cc: Christoph Hellwig
    Cc: fcoe-devel@open-fcoe.org
    Cc: linux-scsi@vger.kernel.org
    Signed-off-by: Sebastian Andrzej Siewior
    Tested-by: Johannes Thumshirn
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Sebastian Andrzej Siewior
     

10 May, 2016

1 commit


16 Apr, 2016

4 commits

  • Now it's ready to move the mempool based SG chained allocator code from
    SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig
    symbol CONFIG_SG_POOL.

    SCSI selects CONFIG_SG_POOL.

    Reviewed-by: Christoph Hellwig
    Signed-off-by: Ming Lin
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Martin K. Petersen

    Ming Lin
     
  • Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount
    we fit into a single scatterlist chunk.

    Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS.

    Will move these 2 generic definitions to scatterlist.h later.

    Reviewed-by: Christoph Hellwig
    Acked-by: Bart Van Assche (for ib_srp changes)
    Signed-off-by: Ming Lin
    Acked-by: Tejun Heo
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Martin K. Petersen

    Ming Lin
     
  • VPD pages 0x0 and 0x83 are mandatory even for SPC-2, so we should be
    lowering the restriction to avoid having to whitelist every SPC-2
    compliant device.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • Add intermediate STARGET_REMOVE state to scsi_target_state to avoid
    running into the BUG_ON() in scsi_target_reap(). The STARGET_REMOVE
    state is only valid in the path from scsi_remove_target() to
    scsi_target_destroy() indicating this target is going to be removed.

    This re-fixes the problem introduced in commits bc3f02a795d3 ("[SCSI]
    scsi_remove_target: fix softlockup regression on hot remove") and
    40998193560d ("scsi: restart list search after unlock in
    scsi_remove_target") in a more comprehensive way.

    [mkp: Included James' fix for scsi_target_destroy()]

    Signed-off-by: Johannes Thumshirn
    Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38
    Cc: stable@vger.kernel.org
    Reported-by: Sergey Senozhatsky
    Tested-by: Sergey Senozhatsky
    Reviewed-by: Ewan D. Milne
    Reviewed-by: Hannes Reinecke
    Reviewed-by: James Bottomley
    Signed-off-by: Martin K. Petersen

    Johannes Thumshirn
     

12 Apr, 2016

2 commits

  • Add new trace functions for ZBC_IN and ZBC_OUT.

    Reviewed-by: Doug Gilbert
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     
  • On larger installations it is useful to disable automatic LUN scanning,
    and only add the required LUNs via udev rules. This can speed up bootup
    dramatically.

    This patch introduces a new scan module parameter value 'manual', which
    works like 'none', but can be overridden by setting the 'rescan' value
    from scsi_scan_target to 'SCSI_SCAN_MANUAL'. And it updates all
    relevant callers to set the 'rescan' value to 'SCSI_SCAN_MANUAL' if
    invoked via the 'scan' option in sysfs.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: Ewan D. Milne
    Tested-by: Laurence Oberman
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     

05 Apr, 2016

4 commits


27 Mar, 2016

1 commit

  • Pull more SCSI updates from James Bottomley:
    "The only new stuff which missed the first pull request is an update to
    the UFS driver.

    The rest is an assortment of bug fixes and minor tweaks which appeared
    recently (some are fixes for recent code and some are stuff spotted
    recently by the checkers or the new gcc-6 compiler [most of Arnd's
    stuff])"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
    scsi_common: do not clobber fixed sense information
    scsi: ufs: select CONFIG_NLS
    scsi: fc: use get/put_unaligned64 for wwn access
    fnic: move printk()s outside of the critical code section.
    qla2xxx: avoid maybe_uninitialized warning
    megaraid_sas: add missing curly braces in ioctl handler
    lpfc: fix misleading indentation
    scsi_transport_sas: add 'scsi_target_id' sysfs attribute
    scsi_dh_alua: uninitialized variable in alua_check_vpd()
    scsi: ufs-qcom: add printouts of testbus debug registers
    scsi: ufs-qcom: enable/disable the device ref clock
    scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup
    scsi: ufs: add device quirk delay before putting UFS rails in LPM
    scsi: ufs: fix leakage during link off state
    scsi: ufs: tune UniPro parameters to optimize hibern8 exit time
    scsi: ufs: handle non spec compliant bkops behaviour by device
    scsi: ufs: add retry for query descriptors
    scsi: ufs: add error recovery after DL NAC error
    scsi: ufs: make error handling bit faster
    scsi: ufs: disable vccq if it's not needed by UFS device
    ...

    Linus Torvalds
     

19 Mar, 2016

1 commit

  • A bug in the gcc-6.0 prerelease version caused at least one
    driver (lpfc) to have excessive stack usage when dealing with
    wwn data, on the ARM architecture.

    lpfc_scsi.c: In function 'lpfc_find_next_oas_lun':
    lpfc_scsi.c:117:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=]

    I have reported this as a gcc regression in
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70232

    However, using a better implementation of wwn_to_u64() not only
    helps with the particular gcc problem but also leads to better
    object code for any version or architecture.

    The kernel already provides get_unaligned_be64() and
    put_unaligned_be64() helper functions that provide an
    optimized implementation with the desired semantics.

    The lpfc_find_next_oas_lun() function in the example that
    grew from 1146 bytes to 5144 bytes when moving from gcc-5.3
    to gcc-6.0 is now 804 bytes, as the optimized
    get_unaligned_be64() load can be done in three instructions.
    The stack usage is now down to 28 bytes from 128 bytes with
    gcc-5.3 before.

    Signed-off-by: Arnd Bergmann
    Reviewed-by: Hannes Reinicke
    Reviewed-by: Ewan Milne
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

18 Mar, 2016

1 commit

  • Pull crypto update from Herbert Xu:
    "Here is the crypto update for 4.6:

    API:
    - Convert remaining crypto_hash users to shash or ahash, also convert
    blkcipher/ablkcipher users to skcipher.
    - Remove crypto_hash interface.
    - Remove crypto_pcomp interface.
    - Add crypto engine for async cipher drivers.
    - Add akcipher documentation.
    - Add skcipher documentation.

    Algorithms:
    - Rename crypto/crc32 to avoid name clash with lib/crc32.
    - Fix bug in keywrap where we zero the wrong pointer.

    Drivers:
    - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
    - Add PIC32 hwrng driver.
    - Support BCM6368 in bcm63xx hwrng driver.
    - Pack structs for 32-bit compat users in qat.
    - Use crypto engine in omap-aes.
    - Add support for sama5d2x SoCs in atmel-sha.
    - Make atmel-sha available again.
    - Make sahara hashing available again.
    - Make ccp hashing available again.
    - Make sha1-mb available again.
    - Add support for multiple devices in ccp.
    - Improve DMA performance in caam.
    - Add hashing support to rockchip"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
    crypto: qat - remove redundant arbiter configuration
    crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
    crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
    crypto: qat - Change the definition of icp_qat_uof_regtype
    hwrng: exynos - use __maybe_unused to hide pm functions
    crypto: ccp - Add abstraction for device-specific calls
    crypto: ccp - CCP versioning support
    crypto: ccp - Support for multiple CCPs
    crypto: ccp - Remove check for x86 family and model
    crypto: ccp - memset request context to zero during import
    lib/mpi: use "static inline" instead of "extern inline"
    lib/mpi: avoid assembler warning
    hwrng: bcm63xx - fix non device tree compatibility
    crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
    crypto: qat - The AE id should be less than the maximal AE number
    lib/mpi: Endianness fix
    crypto: rockchip - add hash support for crypto engine in rk3288
    crypto: xts - fix compile errors
    crypto: doc - add skcipher API documentation
    crypto: doc - update AEAD AD handling
    ...

    Linus Torvalds
     

06 Mar, 2016

1 commit


24 Feb, 2016

5 commits

  • If a device needs to be rescanned the device_handler might need
    to be rechecked, too.
    So add a 'rescan' callback to the device handler and call it
    upon scsi_rescan_device(). The rescan callback will be invoked
    from the Unit Attention handling of ASC/ASCQ 3F 03
    (INQUIRY DATA HAS CHANGED).

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

    Hannes Reinecke
     
  • Add a new blacklist flag BLIST_SYNC_ALUA to instruct the
    alua device handler to use synchronous command submission
    for ALUA commands.

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

    Hannes Reinecke
     
  • The port group needs to be a separate structure as several
    LUNs might belong to the same group.

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

    Hannes Reinecke
     
  • The hpsa driver uses this function to cleanup inquiry data. Our new pqi
    driver will also use this function. This function was copied into both
    drivers.

    This patch exports sanitize_inquiry_string so the hpsa and the pqi
    drivers can use this function directly.

    Suggested-by: Hannes Reinecke
    Suggested-by: Matthew R. Ochs mrochs@linux.vnet.ibm.com
    Reviewed-by: Kevin Barnett
    Reviewed-by: Justin Lindley
    Reviewed-by: Scott Teel
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • iscsi_port_speed and iscsi_port_speed_names have new entries for
    25Gbps and 40Gbps link speeds.

    Signed-off-by: Jitendra Bhivare
    Reviewed-by: Hannes Reinicke
    Signed-off-by: Martin K. Petersen

    Jitendra Bhivare
     

27 Jan, 2016

1 commit


24 Jan, 2016

1 commit

  • Pull rdma updates from Doug Ledford:
    "Initial roundup of 4.5 merge window patches

    - Remove usage of ib_query_device and instead store attributes in
    ib_device struct

    - Move iopoll out of block and into lib, rename to irqpoll, and use
    in several places in the rdma stack as our new completion queue
    polling library mechanism. Update the other block drivers that
    already used iopoll to use the new mechanism too.

    - Replace the per-entry GID table locks with a single GID table lock

    - IPoIB multicast cleanup

    - Cleanups to the IB MR facility

    - Add support for 64bit extended IB counters

    - Fix for netlink oops while parsing RDMA nl messages

    - RoCEv2 support for the core IB code

    - mlx4 RoCEv2 support

    - mlx5 RoCEv2 support

    - Cross Channel support for mlx5

    - Timestamp support for mlx5

    - Atomic support for mlx5

    - Raw QP support for mlx5

    - MAINTAINERS update for mlx4/mlx5

    - Misc ocrdma, qib, nes, usNIC, cxgb3, cxgb4, mlx4, mlx5 updates

    - Add support for remote invalidate to the iSER driver (pushed
    through the RDMA tree due to dependencies, acknowledged by nab)

    - Update to NFSoRDMA (pushed through the RDMA tree due to
    dependencies, acknowledged by Bruce)"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (169 commits)
    IB/mlx5: Unify CQ create flags check
    IB/mlx5: Expose Raw Packet QP to user space consumers
    {IB, net}/mlx5: Move the modify QP operation table to mlx5_ib
    IB/mlx5: Support setting Ethernet priority for Raw Packet QPs
    IB/mlx5: Add Raw Packet QP query functionality
    IB/mlx5: Add create and destroy functionality for Raw Packet QP
    IB/mlx5: Refactor mlx5_ib_qp to accommodate other QP types
    IB/mlx5: Allocate a Transport Domain for each ucontext
    net/mlx5_core: Warn on unsupported events of QP/RQ/SQ
    net/mlx5_core: Add RQ and SQ event handling
    net/mlx5_core: Export transport objects
    IB/mlx5: Expose CQE version to user-space
    IB/mlx5: Add CQE version 1 support to user QPs and SRQs
    IB/mlx5: Fix data validation in mlx5_ib_alloc_ucontext
    IB/sa: Fix netlink local service GFP crash
    IB/srpt: Remove redundant wc array
    IB/qib: Improve ipoib UD performance
    IB/mlx4: Advertise RoCE v2 support
    IB/mlx4: Create and use another QP1 for RoCEv2
    IB/mlx4: Enable send of RoCE QP1 packets with IP/UDP headers
    ...

    Linus Torvalds
     

08 Jan, 2016

1 commit


24 Dec, 2015

1 commit

  • The iser RDMA_CM negotiation protocol is shared by
    the initiator and the target, so have a shared header
    for the defines and structure. Move relevant items from
    the initiator and target headers.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Jenny Derzhavetz
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Doug Ledford

    Sagi Grimberg
     

19 Dec, 2015

2 commits

  • For a device known to be SAS connected, this will return the endpoint
    address. This is useful for getting the SAS address of SATA devices.

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

    James Bottomley
     
  • Adds a function designed to be callable any time (regardless of
    whether the transport attributes are configured or not) which returns
    true if the device is attached over a SAS transport. The design of
    this function is that transport specific functions can be embedded
    within a

    if (is_sas_attached(sdev)) {
    ...
    }

    which would be compiled out (and thus eliminate the symbols) if SAS is
    not configured.

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

    James Bottomley
     

04 Dec, 2015

1 commit