13 Oct, 2012

1 commit

  • Pull misc SCSI updates from James Bottomley:
    "This is an assorted set of stragglers into the merge window with
    driver updates for megaraid_sas, lpfc, bfi and mvumi. It also
    includes some fairly major fixes for virtio-scsi (scatterlist init),
    scsi_debug (off by one error), storvsc (use after free) and qla2xxx
    (potential deadlock).

    Signed-off-by: James Bottomley "

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (49 commits)
    [SCSI] storvsc: Account for in-transit packets in the RESET path
    [SCSI] qla2xxx: fix potential deadlock on ha->hardware_lock
    [SCSI] scsi_debug: Fix off-by-one bug when unmapping region
    [SCSI] Shorten the path length of scsi_cmd_to_driver()
    [SCSI] virtio-scsi: support online resizing of disks
    [SCSI] virtio-scsi: fix LUNs greater than 255
    [SCSI] virtio-scsi: initialize scatterlist structure
    [SCSI] megaraid_sas: Version, Changelog, Copyright update
    [SCSI] megaraid_sas: Remove duplicate code
    [SCSI] megaraid_sas: Add SystemPD FastPath support
    [SCSI] megaraid_sas: Add array boundary check for SystemPD
    [SCSI] megaraid_sas: Load io_request DataLength in bytes
    [SCSI] megaraid_sas: Add module param for configurable MSI-X vector count
    [SCSI] megaraid_sas: Remove un-needed completion_lock spinlock calls
    [SCSI] lpfc 8.3.35: Update lpfc version for 8.3.35 driver release
    [SCSI] lpfc 8.3.35: Fixed not reporting logical link speed to SCSI midlayer when QoS not on
    [SCSI] lpfc 8.3.35: Fix error with fabric service parameters causing performance issues
    [SCSI] lpfc 8.3.35: Fixed SCSI host create showing wrong link speed on SLI3 HBA ports
    [SCSI] lpfc 8.3.35: Fixed not checking solicition in progress bit when verifying FCF record for use
    [SCSI] lpfc 8.3.35: Fixed messages for misconfigured port errors
    ...

    Linus Torvalds
     

10 Oct, 2012

1 commit

  • Pull scsi target updates from Nicholas Bellinger:
    "Things have been calm for the most part with no new fabric drivers in
    flight for v3.7 (we're up to eight now !), so this update is primarily
    focused on addressing a few long-standing items within target-core and
    iscsi-target fabric code.

    The highlights include:

    - target: Simplify fabric sense data length handling (roland)
    - qla2xxx: Fix endianness of task management response code (roland)
    - target: fix truncation of mode data, support zero allocation length
    (paolo)
    - target: Properly support zero-length commands in normal processing
    path (paolo)
    - iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT
    PDU (ronnie + nab)
    - iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG
    demo-mode (ronnie + nab)
    - target/file: Re-enable optional fd_buffered_io=1 operation (nab +
    hch)
    - iscsi-target: Add MaxXmitDataSegmenthLength forr target ->
    initiator MDRSL declaration (nab)
    - target: Add target_submit_cmd_map_sgls for SGL fabric memory
    passthrough (nab + hch)
    - tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls (hch +
    nab)
    - tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls (nab
    + hch)

    The last series for adding a new target_submit_cmd_map_sgls() fabric
    caller (as requested by hch) that accepts pre-allocated SGL memory
    (using existing logic), along with converting tcm_loop + tcm_vhost has
    only been in -next for the last days, but has gotten enough review
    +testing and is clear enough a mechanical change that I think it's
    reasonable to merge for -rc1 code.

    Thanks again to everyone who contributed this round! Extra special
    thanks to Roland (PureStorage) for tracking down the qla2xxx target
    TMR response code endian issue, and to Paolo (Redhat) for resolving
    the long standing zero-length CDB issues within target-core between
    virtual and pSCSI backends."

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (44 commits)
    iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values
    iscsit: proper endianess conversions
    iscsit: use the itt_t abstract type
    iscsit: add missing endianess conversion in iscsit_check_inaddr_any
    iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp
    iscsit: mark various functions static
    target/iscsi: precedence bug in iscsit_set_dataout_sequence_values()
    target/usb-gadget: strlen() doesn't count the terminator
    target/usb-gadget: remove duplicate initialization
    tcm_vhost: Convert I/O path to use target_submit_cmd_map_sgls
    target: Add control CDB READ payload zero work-around
    tcm_loop: Convert I/O path to use target_submit_cmd_map_sgls
    target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough
    iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode
    iscsi-target: Change iscsi_target_seq_pdu_list.c to honor MaxXmitDataSegmentLength
    iscsi-target: Add MaxXmitDataSegmentLength connection recovery check
    iscsi-target: Convert incoming PDU payload checks to MaxXmitDataSegmentLength
    iscsi-target: Enable MaxXmitDataSegmentLength operation in login path
    iscsi-target: Add base MaxXmitDataSegmentLength code
    target/file: Re-enable optional fd_buffered_io=1 operation
    ...

    Linus Torvalds
     

09 Oct, 2012

15 commits

  • Properly account for I/O in transit before returning from the RESET call.
    In the absense of this patch, we could have a situation where the host may
    respond to a command that was issued prior to the issuance of the RESET
    command at some arbitrary time after responding to the RESET command.
    Currently, the host does not do anything with the RESET command.

    Signed-off-by: K. Y. Srinivasan
    Cc: stable@vger.kernel.org
    Signed-off-by: James Bottomley

    K. Y. Srinivasan
     
  • Lockdep reports:

    === [ cut here ] ===
    =========================================================
    [ INFO: possible irq lock inversion dependency detected ]
    3.6.0-0.0.0.28.36b5ec9-default #1 Not tainted
    ---------------------------------------------------------
    qla2xxx_1_dpc/368 just changed the state of lock:
    (&(&ha->vport_slock)->rlock){+.....}, at: [] qla2x00_configure_hba+0x197/0x3c0 [qla2xxx]
    but this lock was taken by another, HARDIRQ-safe lock in the past:
    (&(&ha->hardware_lock)->rlock){-.....}

    and interrupts could create inverse lock ordering between them.

    other info that might help us debug this:
    Possible interrupt unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(&(&ha->vport_slock)->rlock);
    local_irq_disable();
    lock(&(&ha->hardware_lock)->rlock);
    lock(&(&ha->vport_slock)->rlock);

    lock(&(&ha->hardware_lock)->rlock);
    === [ cut here ] ===

    Fix the potential deadlock by disabling IRQs while holding ha->vport_slock.

    Reported-and-tested-by: Srivatsa S. Bhat
    Signed-off-by: Jiri Kosina
    Acked-by: Saurav Kashyap
    Signed-off-by: James Bottomley

    Jiri Kosina
     
  • Currently it is possible to unmap one more block than user requested to
    due to the off-by-one error in unmap_region(). This is probably due to
    the fact that the end variable despite its name actually points to the
    last block to unmap + 1. However in the condition it is handled as the
    last block of the region to unmap.

    The bug was not previously spotted probably due to the fact that the
    region was not zeroed, which has changed with commit
    be1dd78de5686c062bb3103f9e86d444a10ed783. With that commit we were able
    to corrupt the ext4 file system on 256M scsi_debug device with LBPRZ
    enabled using fstrim.

    Since the 'end' semantic is the same in several functions there this
    commit just fixes the condition to use the 'end' variable correctly in
    that context.

    Reported-by: Paolo Bonzini
    Signed-off-by: Lukas Czerner
    Reviewed-by: Martin K. Petersen
    Acked-by: Douglas Gilbert
    Cc:
    Signed-off-by: James Bottomley

    Lukas Czerner
     
  • This patch tries to shorten the path length of scsi_cmd_to_driver(). As only
    REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could
    avoid the related NULL checking, as long as we make sure we don't use it for
    REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you get
    different behaviors from REQ_TYPE_BLOCK_PC commands when a driver is and isn't
    attached.

    Signed-off-by: Li Zhong
    Reviewed-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Li Zhong
     
  • Support the LUN parameter change event. Currently, the host fires this event
    when the capacity of a disk is changed from the virtual machine monitor.
    The resize then appears in the kernel log like this:

    sd 0:0:0:0: [sda] 46137344 512-byte logical blocks: (23.6 GB/22.0 GIb)
    sda: detected capacity change from 22548578304 to 23622320128

    Signed-off-by: Paolo Bonzini
    Signed-off-by: James Bottomley

    Paolo Bonzini
     
  • virtio-scsi needs to report LUNs greater than 256 using the "flat"
    format. Because the Linux SCSI layer just maps the SCSI LUN to
    an u32, without any parsing, these end up in the range from 16640
    to 32767. Fix max_lun to account for the possibility that logical
    unit numbers are encoded with the "flat" format.

    Signed-off-by: Paolo Bonzini
    Signed-off-by: James Bottomley

    Paolo Bonzini
     
  • The sg struct is used without being initialized, which breaks
    when CONFIG_DEBUG_SG is enabled.

    Cc: stable@vger.kernel.org
    Signed-off-by: Richard W.M. Jones
    Signed-off-by: Paolo Bonzini
    Signed-off-by: James Bottomley

    Richard W.M. Jones
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Load io_request->DataLength in bytes for newer firmware that supports high
    availability.

    Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • Signed-off-by: Adam Radford
    Signed-off-by: James Bottomley

    adam radford
     
  • A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
    currently it lost original meaning but still has some effects:

    | effect | alternative flags
    -+------------------------+---------------------------------------------
    1| account as reserved_vm | VM_IO
    2| skip in core dump | VM_IO, VM_DONTDUMP
    3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
    4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

    This patch removes reserved_vm counter from mm_struct. Seems like nobody
    cares about it, it does not exported into userspace directly, it only
    reduces total_vm showed in proc.

    Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

    remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
    remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

    [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
    Signed-off-by: Konstantin Khlebnikov
    Cc: Alexander Viro
    Cc: Carsten Otte
    Cc: Chris Metcalf
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: H. Peter Anvin
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: James Morris
    Cc: Jason Baron
    Cc: Kentaro Takeda
    Cc: Matt Helsley
    Cc: Nick Piggin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Suresh Siddha
    Cc: Tetsuo Handa
    Cc: Venkatesh Pallipadi
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     

08 Oct, 2012

16 commits


07 Oct, 2012

7 commits

  • In LUN RESET testing involving NetApp targets, it is observed that LUN
    RESET is failing. The fc_fcp_resp() is not completing the completion
    for the LUN RESET task since fc_fcp_resp assumes that the FCP_RSP_INFO
    is 8 bytes with the 4 byte reserved field, where in case of NetApp targets
    the FCP_RSP to LUN RESET only has 4 bytes of FCP_RSP_INFO. This leads
    fc_fcp_resp to error out w/o completing the task completion, eventually
    causing LUN RESET to be escalated to host reset, which is not very nice.

    Per FCP-3 r04, clause 9.5.15 and Table 23, the FCP_RSP_INFO field can be either
    4 bytes or 8 bytes, with the last 4 bytes as "Reserved (if any)". Therefore it
    is valid to have 4 bytes FCP_RSP_INFO like some of the NetApp targets behave.
    Fixing this by validating the FCP_RSP_INFO against both the two spec allowed
    length.

    Reported-by: Frank Zhang
    Signed-off-by: Yi Zou
    Tested-by: Ross Brattain
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Yi Zou
     
  • SCSI errors were generated while writing to LUNs
    connected via NPIV ports.

    Debugging this it was found that the FCoE packets
    transmitted via the NPIV ports were not tagged with
    correct user priority as negotiated with peer by DCB
    agent. This resulted in FCoE traffic going with priority
    zero(0) that did not have priority flow control (PFC)
    enabled for it. The initiator after transferring data
    to the target never saw any reply indicating the transfer
    was complete. This resulted in error recovery (ABTS) and
    SCSI command retries by the scsi-mid layer; eventually
    resulting in I/O errors.

    This patch fixes this issue by keeping the FCoE user
    priority information in the fcoe_interface instance
    that is common for both the physical port as well as
    NPIV ports connected to that physical port; instead
    of storing it in fcoe_port structure that has a per
    port instance.

    Signed-off-by: Neerav Parikh
    Acked-by: Yi Zou
    Acked-by: John Fastabend
    Tested-by: Marcus Dennis
    Signed-off-by: Robert Love
    Signed-off-by: James Bottomley

    Neerav Parikh
     
  • [jejb: fix up for spelling correction patch]
    Signed-off-by: Shun Fu
    Signed-off-by: James Bottomley

    Shun Fu
     
  • Signed-off-by: Krishna Gudipati
    Signed-off-by: James Bottomley

    Krishna Gudipati
     
  • - Modified the firmware naming convention to contain the
    firmware image version (3.1.0.0).
    - The new convention is -.bin
    - The change will enforce loading only compatible firmware with this driver
    and also avoid over-writing the old firmware image in-order to load new
    version driver as the firmware names used to be the same.

    Signed-off-by: Krishna Gudipati
    Signed-off-by: James Bottomley

    Krishna Gudipati
     
  • - Add FRU sub-module to support FRU read/write/update.
    - Add support to read/write from the temp FRU module.

    [jejb: fix checkpatch issues]
    Signed-off-by: Krishna Gudipati
    Signed-off-by: James Bottomley

    Krishna Gudipati
     
  • - Add Power On Hours display support during sfpshow
    - Fix to properly set the diag temperature sensor status variable.

    Signed-off-by: Krishna Gudipati
    Signed-off-by: James Bottomley

    Krishna Gudipati