05 May, 2017

1 commit

  • Pull SCSI updates from James Bottomley:
    "This update includes the usual round of major driver updates
    (hisi_sas, ufs, fnic, cxlflash, be2iscsi, ipr, stex). There's also the
    usual amount of cosmetic and spelling stuff"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (155 commits)
    scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template"
    scsi: stex: make S6flag static
    scsi: mac_esp: fix to pass correct device identity to free_irq()
    scsi: aacraid: pci_alloc_consistent() failures on ARM64
    scsi: ufs: make ufshcd_get_lists_status() register operation obvious
    scsi: ufs: use MASK_EE_STATUS
    scsi: mac_esp: Replace bogus memory barrier with spinlock
    scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static
    scsi: sd_zbc: Do not write lock zones for reset
    scsi: sd_zbc: Remove superfluous assignments
    scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd
    scsi: Improve scsi_get_sense_info_fld
    scsi: sd: Cleanup sd_done sense data handling
    scsi: sd: Improve sd_completed_bytes
    scsi: sd: Fix function descriptions
    scsi: mpt3sas: remove redundant wmb
    scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host()
    scsi: sg: reset 'res_in_use' after unlinking reserved array
    scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case
    scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency"
    ...

    Linus Torvalds
     

20 Apr, 2017

1 commit

  • Included in the current storvsc driver for Hyper-V is the ability to
    access luns on an FC fabric via a virtualized fiber channel adapter
    exposed by the Hyper-V host. The driver also attaches to the FC
    transport to allow host and port names to be published under
    /sys/class/fc_host/hostX. Current customer tools running on the VM
    require that these names be available in the well known standard
    location under fc_host/hostX.

    This patch stubs in an rport per fc_host and sets its rport role as
    FC_PORT_ROLE_FCP_DUMMY_INITIATOR to indicate to the fc_transport that it
    is a pseudo rport in order to scan the scsi stack via echo "- - -" >
    /sys/class/scsi_host/hostX/scan.

    Signed-off-by: Cathy Avery
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Cathy Avery
     

14 Apr, 2017

2 commits


13 Mar, 2017

1 commit


08 Mar, 2017

1 commit

  • Hyper-V host emulation of SCSI for virtual DVD device reports SCSI
    version 0 (UNKNOWN) but is still capable of supporting REPORTLUN.

    Without this patch, a GEN2 Linux guest on Hyper-V will not boot 4.11
    successfully with virtual DVD ROM device. What happens is that the SCSI
    scan process falls back to doing sequential probing by INQUIRY. But the
    storvsc driver has a previous workaround that masks/blocks all errors
    reports from INQUIRY (or MODE_SENSE) commands. This workaround causes
    the scan to then populate a full set of bogus LUN's on the target and
    then sends kernel spinning off into a death spiral doing block reads on
    the non-existent LUNs.

    By setting the correct blacklist flags, the target with the DVD device
    is scanned with REPORTLUN and that works correctly.

    Patch needs to go in current 4.11, it is safe but not necessary in older
    kernels.

    Signed-off-by: Stephen Hemminger
    Reviewed-by: K. Y. Srinivasan
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Stephen Hemminger
     

28 Feb, 2017

1 commit

  • Fix typos and add the following to the scripts/spelling.txt:

    intialization||initialization

    The "inintialization" in drivers/acpi/spcr.c is a different pattern but
    I fixed it as well in this commit.

    Link: http://lkml.kernel.org/r/1481573103-11329-16-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

07 Feb, 2017

1 commit

  • Instead define the timeout behavior purely based on the host_template
    eh_timed_out method and wire up the existing transport implementations
    in the host templates. This also clears up the confusion that the
    transport template method overrides the host template one, so some
    drivers have to re-override the transport template one.

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

    Christoph Hellwig
     

01 Feb, 2017

1 commit


05 Jan, 2017

6 commits


01 Dec, 2016

1 commit


13 Jul, 2016

1 commit

  • When a virtual scsi DVD device is present with no image file
    attached the storvsc driver logs all resulting unnecessary sense errors
    whenever IO is issued to the device.

    [storvsc] Sense Key : Not Ready [current]
    [storvsc] Add. Sense: Medium not present - tray closed

    [mkp: Fixed whitespace]

    Signed-off-by: Cathy Avery
    Reviewed-by: K. Y. Srinivasan
    Signed-off-by: Martin K. Petersen

    Cathy Avery
     

09 Mar, 2016

1 commit

  • Commit 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB
    status flags") filtered SRB_STATUS_AUTOSENSE_VALID out effectively making
    the (SRB_STATUS_ABORTED | SRB_STATUS_AUTOSENSE_VALID) case a dead code. The
    logic from this branch (e.g. storvsc_device_scan() call) is still required,
    fix the check.

    Cc: #v4.4+
    Fixes: 3209f9d780d1 ("scsi: storvsc: Fix a bug in the handling of SRB status flags")
    Signed-off-by: Vitaly Kuznetsov
    Acked-by: K. Y. Srinivasan
    Signed-off-by: Martin K. Petersen

    Vitaly Kuznetsov
     

05 Feb, 2016

1 commit


29 Jan, 2016

2 commits

  • The current code assumes that there is only one target in device lookup.
    Fix this bug. This will alow us to correctly handle hot reomoval of
    LUNs.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Alex Ng
    Tested-by: Vivek Yadav
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     
  • The default timeout routine used for FC transport is not suitable for FC
    devices managed by storvsc since FC devices managed by storvsc driver do
    not have an rport associated with them. Use the time out handler used
    for SCSI devices for FC devices as well.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Alex Ng
    Tested-by: Vivek Yadav
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     

09 Jan, 2016

1 commit


07 Jan, 2016

4 commits

  • On the interrupt path, we repeatedly establish the pointer to the
    storvsc_device. While the compiler does inline get_in_stor_device() (and
    other static functions) in the call chain in the interrupt path, the
    compiler is repeatedly inlining the call to get_in_stor_device() each
    time it is invoked. The return value of get_in_stor_device() can be
    cached in the interrupt path since there is higher level serialization
    in place to ensure correct handling when the module unload races with
    the processing of an incoming message from the host. Optimize this code
    path by caching the pointer to storvsc_device and passing it as an
    argument.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Long Li
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Hannes Reinecke
    Tested-by: Alex Ng
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     
  • The function storvsc_channel_init() repeatedly interacts with the host
    to extract various channel properties. Refactor this code to eliminate
    code repetition.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Long Li
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Hannes Reinecke
    Tested-by: Alex Ng
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     
  • For FC devices managed by this driver, atttach the appropriate transport
    template. This will allow us to create the appropriate sysfs files for
    these devices. With this we can publish the wwn for both the port and the node.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Long Li
    Tested-by: Alex Ng
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     
  • The hv_fc_wwn_packet is exchanged over vmbus. Make the definition in
    Linux match the Windows definition.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Johannes Thumshirn
    Reviewed-by: Long Li
    Reviewed-by: Hannes Reinecke
    Tested-by: Alex Ng
    Signed-off-by: Martin K. Petersen

    K. Y. Srinivasan
     

11 Dec, 2015

1 commit

  • Introduce a logging level for storvsc to log certain error/warning
    messages. Those messages are helpful in some environments,
    e.g. Microsoft Azure, for customer support and troubleshooting purposes.

    Signed-off-by: Long Li
    Acked-by: K. Y. Srinivasan
    Signed-off-by: Martin K. Petersen

    Long Li
     

10 Nov, 2015

3 commits

  • SRB status can have additional information. Mask these out before processing
    SRB status.

    This patch was sent as part of a collection of patches more than a year ago.
    While the rest of the patches in the set were comitted, this patch was not.
    I woulod like to thank Olaf for noticing that this patch was not committed
    upstream.

    Signed-off-by: K. Y. Srinivasan
    Reviewed-by: Long Li
    Signed-off-by: James Bottomley

    K. Y. Srinivasan
     
  • Storvsc driver needs to ensure there are no 'holes' in the presented
    sg list (all segments in the middle of the list need to be of PAGE_SIZE).
    When a hole is detected storvsc driver creates a 'bounce sgl' without
    holes and copies data over with copy_{to,from}_bounce_buffer() functions.
    Setting virt_boundary_mask to PAGE_SIZE - 1 guarantees we'll never see
    such holes so we can significantly simplify the driver. This is also
    supposed to bring us some performance improvement for certain workloads
    as we eliminate copying.

    Reported-by: Radim Krčmář
    Signed-off-by: Vitaly Kuznetsov
    Reviewed-by: K. Y. Srinivasan
    Tested-by: Alex Ng
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: James Bottomley

    Vitaly Kuznetsov
     
  • Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag since we are not specifying
    tags. Without this, the qlogic driver doesn't work properly with storvsc.

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

    K. Y. Srinivasan
     

27 Aug, 2015

7 commits


13 Aug, 2015

2 commits

  • Comment in struct Scsi_Host says that drivers are not supposed to access
    __devices directly. storvsc_host_scan() doesn't happen in irq context
    so we can just use shost_for_each_device().

    Signed-off-by: Vitaly Kuznetsov
    Reviewed-by: Long Li
    Acked-by: K. Y. Srinivasan
    Signed-off-by: James Bottomley

    Vitaly Kuznetsov
     
  • Under the 'default' case in scmnd->sc_data_direction we have 3 options:
    - DMA_NONE which we handle correctly.
    - DMA_BIDIRECTIONAL which is never supposed to be set by SCSI stack.
    - Garbage value.

    Do WARN() and return -EINVAL in the last two cases. virtio_scsi does
    BUG_ON() here but it looks like an overkill.

    Reported-by: Radim Krčmář
    Signed-off-by: Vitaly Kuznetsov
    Acked-by: K. Y. Srinivasan
    Signed-off-by: James Bottomley

    Vitaly Kuznetsov
     

12 May, 2015

1 commit