07 Apr, 2017

18 commits


20 Mar, 2017

6 commits

  • Linus Torvalds
     
  • This BUG_ON() triggered for me once at shutdown, and I don't see a
    reason for the check. The code correctly checks whether the swap slot
    cache is usable or not, so an uninitialized swap slot cache is not
    actually problematic afaik.

    I've temporarily just switched the BUG_ON() to a WARN_ON_ONCE(), since
    I'm not sure why that seemingly pointless check was there. I suspect
    the real fix is to just remove it entirely, but for now we'll warn about
    it but not bring the machine down.

    Cc: "Huang, Ying"
    Cc: Tim Chen
    Cc: Michal Hocko
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull more powerpc fixes from Michael Ellerman:
    "A couple of minor powerpc fixes for 4.11:

    - wire up statx() syscall

    - don't print a warning on memory hotplug when HPT resizing isn't
    available

    Thanks to: David Gibson, Chandan Rajendra"

    * tag 'powerpc-4.11-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    powerpc/pseries: Don't give a warning when HPT resizing isn't available
    powerpc: Wire up statx() syscall

    Linus Torvalds
     
  • Pull parisc fixes from Helge Deller:

    - Mikulas Patocka added support for R_PARISC_SECREL32 relocations in
    modules with CONFIG_MODVERSIONS.

    - Dave Anglin optimized the cache flushing for vmap ranges.

    - Arvind Yadav provided a fix for a potential NULL pointer dereference
    in the parisc perf code (and some code cleanups).

    - I wired up the new statx system call, fixed some compiler warnings
    with the access_ok() macro and fixed shutdown code to really halt a
    system at shutdown instead of crashing & rebooting.

    * 'parisc-4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Fix system shutdown halt
    parisc: perf: Fix potential NULL pointer dereference
    parisc: Avoid compiler warnings with access_ok()
    parisc: Wire up statx system call
    parisc: Optimize flush_kernel_vmap_range and invalidate_kernel_vmap_range
    parisc: support R_PARISC_SECREL32 relocation in modules

    Linus Torvalds
     
  • Pull SCSI target fixes from Nicholas Bellinger:
    "The bulk of the changes are in qla2xxx target driver code to address
    various issues found during Cavium/QLogic's internal testing (stable
    CC's included), along with a few other stability and smaller
    miscellaneous improvements.

    There are also a couple of different patch sets from Mike Christie,
    which have been a result of his work to use target-core ALUA logic
    together with tcm-user backend driver.

    Finally, a patch to address some long standing issues with
    pass-through SCSI export of TYPE_TAPE + TYPE_MEDIUM_CHANGER devices,
    which will make folks using physical (or virtual) magnetic tape happy"

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (28 commits)
    qla2xxx: Update driver version to 9.00.00.00-k
    qla2xxx: Fix delayed response to command for loop mode/direct connect.
    qla2xxx: Change scsi host lookup method.
    qla2xxx: Add DebugFS node to display Port Database
    qla2xxx: Use IOCB interface to submit non-critical MBX.
    qla2xxx: Add async new target notification
    qla2xxx: Export DIF stats via debugfs
    qla2xxx: Improve T10-DIF/PI handling in driver.
    qla2xxx: Allow relogin to proceed if remote login did not finish
    qla2xxx: Fix sess_lock & hardware_lock lock order problem.
    qla2xxx: Fix inadequate lock protection for ABTS.
    qla2xxx: Fix request queue corruption.
    qla2xxx: Fix memory leak for abts processing
    qla2xxx: Allow vref count to timeout on vport delete.
    tcmu: Convert cmd_time_out into backend device attribute
    tcmu: make cmd timeout configurable
    tcmu: add helper to check if dev was configured
    target: fix race during implicit transition work flushes
    target: allow userspace to set state to transitioning
    target: fix ALUA transition timeout handling
    ...

    Linus Torvalds
     
  • Pull device-dax fixes from Dan Williams:
    "The device-dax driver was not being careful to handle falling back to
    smaller fault-granularity sizes.

    The driver already fails fault attempts that are smaller than the
    device's alignment, but it also needs to handle the cases where a
    larger page mapping could be established. For simplicity of the
    immediate fix the implementation just signals VM_FAULT_FALLBACK until
    fault-size == device-alignment.

    One fix is for -stable to address pmd-to-pte fallback from the
    original implementation, another fix is for the new (introduced in
    4.11-rc1) pud-to-pmd regression, and a typo fix comes along for the
    ride.

    These have received a build success notification from the kbuild
    robot"

    * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    device-dax: fix debug output typo
    device-dax: fix pud fault fallback handling
    device-dax: fix pmd/pte fault fallback handling

    Linus Torvalds
     

19 Mar, 2017

16 commits

  • Signed-off-by: Himanshu Madhani
    signed-off-by: Giridhar Malavali
    Signed-off-by: Nicholas Bellinger

    Himanshu Madhani
     
  • Current driver wait for FW to be in the ready state before
    processing in-coming commands. For Arbitrated Loop or
    Point-to- Point (not switch), FW Ready state can take a while.
    FW will transition to ready state after all Nports have been
    logged in. In the mean time, certain initiators have completed
    the login and starts IO. Driver needs to start processing all
    queues if FW is already started.

    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • For target mode, when new scsi command arrive, driver first performs
    a look up of the SCSI Host. The current look up method is based on
    the ALPA portion of the NPort ID. For Cisco switch, the ALPA can
    not be used as the index. Instead, the new search method is based
    on the full value of the Nport_ID via btree lib.

    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Signed-off-by: Himanshu Madhani
    Signed-off-by: Giridhar Malavali
    Signed-off-by: Nicholas Bellinger

    Himanshu Madhani
     
  • The Mailbox interface is currently over subscribed. We like
    to reserve the Mailbox interface for the chip managment and
    link initialization. Any non essential Mailbox command will
    be routed through the IOCB interface. The IOCB interface is
    able to absorb more commands.

    Following commands are being routed through IOCB interface

    - Get ID List (007Ch)
    - Get Port DB (0064h)
    - Get Link Priv Stats (006Dh)

    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Signed-off-by: Anil Gurumurthy
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Anil Gurumurthy
     
  • Add routines to support T10 DIF tag.

    Signed-off-by: Quinn Tran
    Signed-off-by: Anil Gurumurthy
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • If the remote port have started the login process, then the
    PLOGI and PRLI should be back to back. Driver will allow
    the remote port to complete the process. For the case where
    the remote port decide to back off from sending PRLI, this
    local port sets an expiration timer for the PRLI. Once the
    expiration time passes, the relogin retry logic is allowed
    to go through and perform login with the remote port.

    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • The main lock that needs to be held for CMD or TMR submission
    to upper layer is the sess_lock. The sess_lock is used to
    serialize cmd submission and session deletion. The addition
    of hardware_lock being held is not necessary. This patch removes
    hardware_lock dependency from CMD/TMR submission.

    Use hardware_lock only for error response in this case.

    Path1
    CPU0 CPU1
    ---- ----
    lock(&(&ha->tgt.sess_lock)->rlock);
    lock(&(&ha->hardware_lock)->rlock);
    lock(&(&ha->tgt.sess_lock)->rlock);
    lock(&(&ha->hardware_lock)->rlock);

    Path2/deadlock
    *** DEADLOCK ***
    Call Trace:
    dump_stack+0x85/0xc2
    print_circular_bug+0x1e3/0x250
    __lock_acquire+0x1425/0x1620
    lock_acquire+0xbf/0x210
    _raw_spin_lock_irqsave+0x53/0x70
    qlt_sess_work_fn+0x21d/0x480 [qla2xxx]
    process_one_work+0x1f4/0x6e0

    Cc:
    Cc: Bart Van Assche
    Reported-by: Bart Van Assche
    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Normally, ABTS is sent to Target Core as Task MGMT command.
    In the case of error, qla2xxx needs to send response, hardware_lock
    is required to prevent request queue corruption.

    Cc:
    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • When FW notify driver or driver detects low FW resource,
    driver tries to send out Busy SCSI Status to tell Initiator
    side to back off. During the send process, the lock was not held.

    Cc:
    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Cc:
    Signed-off-by: Quinn Tran
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Quinn Tran
     
  • Cc:
    Signed-off-by: Joe Carnuccio
    Signed-off-by: Himanshu Madhani
    Signed-off-by: Nicholas Bellinger

    Joe Carnuccio
     
  • Instead of putting cmd_time_out under ../target/core/user_0/foo/control,
    which has historically been used by parameters needed for initial
    backend device configuration, go ahead and move cmd_time_out into
    a backend device attribute.

    In order to do this, tcmu_module_init() has been updated to create
    a local struct configfs_attribute **tcmu_attrs, that is based upon
    the existing passthrough_attrib_attrs along with the new cmd_time_out
    attribute. Once **tcm_attrs has been setup, go ahead and point
    it at tcmu_ops->tb_dev_attrib_attrs so it's picked up by target-core.

    Also following MNC's previous change, ->cmd_time_out is stored in
    milliseconds but exposed via configfs in seconds. Also, note this
    patch restricts the modification of ->cmd_time_out to before +
    after the TCMU device has been configured, but not while it has
    active fabric exports.

    Cc: Mike Christie
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     
  • A single daemon could implement multiple types of devices
    using multuple types of real devices that may not support
    restarting from crashes and/or handling tcmu timeouts. This
    makes the cmd timeout configurable, so handlers that do not
    support it can turn if off for now.

    Signed-off-by: Mike Christie
    Signed-off-by: Nicholas Bellinger

    Mike Christie