16 Oct, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Five changes, two in drivers (qla2xxx, zfcp), one to MAINTAINERS
    (qla2xxx) and two in the core.

    The last two are mostly about removing incorrect messages from the
    kernel log: the resid message is definitely wrong and the sync cache
    on protected drive problem is arguably wrong"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: MAINTAINERS: Update qla2xxx driver
    scsi: zfcp: fix reaction on bit error threshold notification
    scsi: core: save/restore command resid for error handling
    scsi: qla2xxx: Remove WARN_ON_ONCE in qla2x00_status_cont_entry()
    scsi: sd: Ignore a failure to sync cache due to lack of authorization

    Linus Torvalds
     

04 Oct, 2019

1 commit

  • When a non-passthrough command is terminated with CHECK CONDITION, request
    sense is executed by hijacking the command descriptor. Since
    scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore the
    original command resid, the value returned on failure of the original
    command is lost and replaced with the value set by the execution of the
    request sense command. This value may in many instances be unaligned to the
    device sector size, causing sd_done() to print a warning message about the
    incorrect unaligned resid before the command is retried.

    Fix this problem by saving the original command residual in struct
    scsi_eh_save using scsi_eh_prep_cmnd() and restoring it in
    scsi_eh_restore_cmnd(). In addition, to make sure that the request sense
    command is executed with a correctly initialized command structure, also
    reset the residual to 0 in scsi_eh_prep_cmnd() after saving the original
    command value in struct scsi_eh_save.

    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20191001074839.1994-1-damien.lemoal@wdc.com
    Signed-off-by: Damien Le Moal
    Reviewed-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Damien Le Moal
     

22 Sep, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: qla2xxx, ufs, smartpqi,
    lpfc, hisi_sas, qedf, mpt3sas; plus a whole load of minor updates. The
    only core change this time around is the addition of request batching
    for virtio. Since batching requires an additional flag to use, it
    should be invisible to the rest of the drivers"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (264 commits)
    scsi: hisi_sas: Fix the conflict between device gone and host reset
    scsi: hisi_sas: Add BIST support for phy loopback
    scsi: hisi_sas: Add hisi_sas_debugfs_alloc() to centralise allocation
    scsi: hisi_sas: Remove some unused function arguments
    scsi: hisi_sas: Remove redundant work declaration
    scsi: hisi_sas: Remove hisi_sas_hw.slot_complete
    scsi: hisi_sas: Assign NCQ tag for all NCQ commands
    scsi: hisi_sas: Update all the registers after suspend and resume
    scsi: hisi_sas: Retry 3 times TMF IO for SAS disks when init device
    scsi: hisi_sas: Remove sleep after issue phy reset if sas_smp_phy_control() fails
    scsi: hisi_sas: Directly return when running I_T_nexus reset if phy disabled
    scsi: hisi_sas: Use true/false as input parameter of sas_phy_reset()
    scsi: hisi_sas: add debugfs auto-trigger for internal abort time out
    scsi: virtio_scsi: unplug LUNs when events missed
    scsi: scsi_dh_rdac: zero cdb in send_mode_select()
    scsi: fcoe: fix null-ptr-deref Read in fc_release_transport
    scsi: ufs-hisi: use devm_platform_ioremap_resource() to simplify code
    scsi: ufshcd: use devm_platform_ioremap_resource() to simplify code
    scsi: hisi_sas: use devm_platform_ioremap_resource() to simplify code
    scsi: ufs: Use kmemdup in ufshcd_read_string_desc()
    ...

    Linus Torvalds
     

08 Aug, 2019

1 commit

  • The data structure used for log messages is so large that it can cause a
    boot failure. Since allocations from that data structure can fail anyway,
    use kmalloc() / kfree() instead of that data structure.

    See also https://bugzilla.kernel.org/show_bug.cgi?id=204119.
    See also commit ded85c193a39 ("scsi: Implement per-cpu logging buffer") # v4.0.

    Reported-by: Jan Palus
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Cc: Ming Lei
    Cc: Jan Palus
    Signed-off-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     

30 Jul, 2019

2 commits


24 Jul, 2019

1 commit

  • #define relative to FCOE CTLR start with FCOE_CTLR, except
    FCOE_CTRL_SOL_TOV.

    This is likely a typo and CTRL should be CTLR here as well.

    Signed-off-by: Christophe JAILLET
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Christophe JAILLET
     

23 Jul, 2019

1 commit

  • This allows a list of requests to be issued, with the LLD only writing the
    hardware doorbell when necessary, after the last request was prepared.
    This is more efficient if we have lists of requests to issue, particularly
    on virtualized hardware, where writing the doorbell is more expensive than
    on real hardware.

    The use case for this is plugged IO, where blk-mq flushes a batch of
    requests all at once.

    The API is the same as for blk-mq, just with blk-mq concepts tweaked to
    fit the SCSI subsystem API: the "last" flag in blk_mq_queue_data becomes a
    flag in scsi_cmnd, while the queue_num in the commit_rqs callback is
    extracted from the hctx and passed as a parameter.

    The only complication is that blk-mq uses different plugging heuristics
    depending on whether commit_rqs is present or not. So we have two
    different sets of blk_mq_ops and pick one depending on whether the
    scsi_host template uses commit_rqs or not.

    Signed-off-by: Paolo Bonzini
    Reviewed-by: Bart Van Assche
    Reviewed-by: Ming Lei
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Paolo Bonzini
     

21 Jul, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "This is the final round of mostly small fixes in our initial submit.

    It's mostly minor fixes and driver updates. The only change of note is
    adding a virt_boundary_mask to the SCSI host and host template to
    parametrise this for NVMe devices instead of having them do a call in
    slave_alloc. It's a fairly straightforward conversion except in the
    two NVMe handling drivers that didn't set it who now have a virtual
    infinity parameter added"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
    scsi: megaraid_sas: set an unlimited max_segment_size
    scsi: mpt3sas: set an unlimited max_segment_size for SAS 3.0 HBAs
    scsi: IB/srp: set virt_boundary_mask in the scsi host
    scsi: IB/iser: set virt_boundary_mask in the scsi host
    scsi: storvsc: set virt_boundary_mask in the scsi host template
    scsi: ufshcd: set max_segment_size in the scsi host template
    scsi: core: take the DMA max mapping size into account
    scsi: core: add a host / host template field for the virt boundary
    scsi: core: Fix race on creating sense cache
    scsi: sd_zbc: Fix compilation warning
    scsi: libfc: fix null pointer dereference on a null lport
    scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized
    scsi: zfcp: fix request object use-after-free in send path causing wrong traces
    scsi: zfcp: fix request object use-after-free in send path causing seqno errors
    scsi: megaraid_sas: Update driver version to 07.710.50.00
    scsi: megaraid_sas: Add module parameter for FW Async event logging
    scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers
    scsi: megaraid_sas: Fix calculation of target ID
    scsi: lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE
    scsi: devinfo: BLIST_TRY_VPD_PAGES for SanDisk Cruzer Blade
    ...

    Linus Torvalds
     

17 Jul, 2019

1 commit


12 Jul, 2019

1 commit

  • Pull SCSI updates from James Bottomley:
    "This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs,
    mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the
    removal of the osst driver (I heard from Willem privately that he
    would like the driver removed because all his test hardware has
    failed). Plus number of minor changes, spelling fixes and other
    trivia.

    The big merge conflict this time around is the SPDX licence tags.
    Following discussion on linux-next, we believe our version to be more
    accurate than the one in the tree, so the resolution is to take our
    version for all the SPDX conflicts"

    Note on the SPDX license tag conversion conflicts: the SCSI tree had
    done its own SPDX conversion, which in some cases conflicted with the
    treewide ones done by Thomas & co.

    In almost all cases, the conflicts were purely syntactic: the SCSI tree
    used the old-style SPDX tags ("GPL-2.0" and "GPL-2.0+") while the
    treewide conversion had used the new-style ones ("GPL-2.0-only" and
    "GPL-2.0-or-later").

    In these cases I picked the new-style one.

    In a few cases, the SPDX conversion was actually different, though. As
    explained by James above, and in more detail in a pre-pull-request
    thread:

    "The other problem is actually substantive: In the libsas code Luben
    Tuikov originally specified gpl 2.0 only by dint of stating:

    * This file is licensed under GPLv2.

    In all the libsas files, but then muddied the water by quoting GPLv2
    verbatim (which includes the or later than language). So for these
    files Christoph did the conversion to v2 only SPDX tags and Thomas
    converted to v2 or later tags"

    So in those cases, where the spdx tag substantially mattered, I took the
    SCSI tree conversion of it, but then also took the opportunity to turn
    the old-style "GPL-2.0" into a new-style "GPL-2.0-only" tag.

    Similarly, when there were whitespace differences or other differences
    to the comments around the copyright notices, I took the version from
    the SCSI tree as being the more specific conversion.

    Finally, in the spdx conversions that had no conflicts (because the
    treewide ones hadn't been done for those files), I just took the SCSI
    tree version as-is, even if it was old-style. The old-style conversions
    are perfectly valid, even if the "-only" and "-or-later" versions are
    perhaps more descriptive.

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (185 commits)
    scsi: qla2xxx: move IO flush to the front of NVME rport unregistration
    scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition
    scsi: qla2xxx: on session delete, return nvme cmd
    scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices
    scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1
    scsi: megaraid_sas: Introduce various Aero performance modes
    scsi: megaraid_sas: Use high IOPS queues based on IO workload
    scsi: megaraid_sas: Set affinity for high IOPS reply queues
    scsi: megaraid_sas: Enable coalescing for high IOPS queues
    scsi: megaraid_sas: Add support for High IOPS queues
    scsi: megaraid_sas: Add support for MPI toolbox commands
    scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver
    scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura
    scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD
    scsi: megaraid_sas: Handle sequence JBOD map failure at driver level
    scsi: megaraid_sas: Don't send FPIO to RL Bypass queue
    scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault
    scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout
    scsi: megaraid_sas: Call disable_irq from process IRQ poll
    scsi: megaraid_sas: Remove few debug counters from IO path
    ...

    Linus Torvalds
     

21 Jun, 2019

1 commit


05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms and conditions of the gnu general public license
    version 2 as published by the free software foundation this program
    is distributed in the hope it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details you should have received a copy of the gnu general
    public license along with this program if not write to the free
    software foundation inc 51 franklin st fifth floor boston ma 02110
    1301 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 111 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190530000436.567572064@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

31 May, 2019

2 commits

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

24 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this file is licensed under gplv2 this program is free software you
    can redistribute it and or modify it under the terms of the gnu
    general public license as published by the free software foundation
    either version 2 of the license or at your option any later version
    this program is distributed in the hope that it will be useful but
    without any warranty without even the implied warranty of
    merchantability or fitness for a particular purpose see the gnu
    general public license for more details you should have received a
    copy of the gnu general public license along with this program if
    not write to the free software foundation inc 59 temple place suite
    330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 5 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190520071858.561902672@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

21 May, 2019

8 commits


16 Apr, 2019

2 commits

  • According to the SAS spec, an expander device shall transmit BROADCAST
    (CHANGE) from at least one phy in each expander port other than the
    expander port that is the cause for transmitting BROADCAST (CHANGE).

    As such, for when the link is lost for a root PHY attached to an expander
    PHY, we get no broadcast event.

    This causes an issue for libsas, in that we will not revalidate the domain
    for these events.

    As a solution, for when a root PHY is formed or deformed from a root port,
    insert a broadcast event to trigger a domain revalidation.

    Signed-off-by: John Garry
    Signed-off-by: Martin K. Petersen

    John Garry
     
  • Many times we use 8 for SAS address length, while we already have a macro
    for this - SAS_ADDR_SIZE.

    Replace instances of this with the macro. However, don't touch the SAS
    address array sizes sas.h, as these are defined according to the SAS spec.

    Some missing whitespaces are also added, and whitespace indentation
    in sas_hash_addr() is also fixed (see sas_hash_addr()).

    Signed-off-by: John Garry
    Signed-off-by: Martin K. Petersen

    John Garry
     

13 Apr, 2019

1 commit

  • Currently the FC-NVMe driver is leverating the SCSI FC transport class to
    access the remote ports. Which means that all FC-NVMe remote ports will be
    visible to the fc transport layer, but due to missing definitions the port
    roles will always be 'unknown'. This patch adds the missing definitions to
    the fc transport class to that the port roles are correctly displayed.

    Signed-off-by: Hannes Reinecke
    Reviewed-by: James Smart
    Reviewed-by: Ewan D. Milne
    Reviewed-by: Giridhar Malavali
    Reviewed-by: Himanshu Madhani
    Signed-off-by: Martin K. Petersen

    Hannes Reinecke
     

09 Apr, 2019

3 commits

  • Since the wwn_to_u64() function does not change its input, make its
    argument const.

    Cc: James Smart
    Cc: Hannes Reinecke
    Cc: Johannes Thumshirn
    Cc: Steffen Maier
    Signed-off-by: Bart Van Assche
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche
     
  • Add a new event type - an FPIN event.

    Add a new routine, fc_host_fpin_rcv(), that lldd's call when an FPIN is
    received. The routine processes the fpin payload. For now, the routine
    only logs an FPIN event.

    Signed-off-by: Muneendra
    Signed-off-by: James Smart
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Martin K. Petersen

    James Smart
     
  • There are two routines generating transport events that do the same thing
    with only a couple of values set differently.

    Refactor so there's a single routine doing the netlink operations to send
    the event. All the differences are passed as arguments. Export the symbol
    so the generic routine can be called by llds.

    Modify the existing two event routines to use the helper.

    Signed-off-by: James Smart
    Reviewed-by: Ewan D. Milne
    Signed-off-by: Martin K. Petersen

    James Smart
     

20 Mar, 2019

2 commits


27 Feb, 2019

1 commit


26 Feb, 2019

1 commit


20 Feb, 2019

1 commit

  • commit 1917d42d14b7 ("fcoe: use enum for fip_mode") introduces a separate
    enum for the fip_mode that shall be used during initialisation handling
    until it is passed to fcoe_ctrl_link_up to set the initial fip_state. That
    change was incomplete and gcc quietly converted in various places between
    the fip_mode and the fip_state enum values with implicit enum conversions,
    which fortunately cannot cause any issues in the actual code's execution.

    clang however warns about these implicit enum conversions in the scsi
    drivers. This commit consolidates the use of the two enums, guided by
    clang's enum-conversion warnings.

    This commit now completes the use of the fip_mode: It expects and uses
    fip_mode in {bnx2fc,fcoe}_interface_create and fcoe_ctlr_init, and it calls
    fcoe_ctrl_set_set() with the correct values in fcoe_ctlr_link_up(). It
    also breaks the association between FIP_MODE_AUTO and FIP_ST_AUTO to
    indicate these two enums are distinct.

    Link: https://github.com/ClangBuiltLinux/linux/issues/151
    Fixes: 1917d42d14b7 ("fcoe: use enum for fip_mode")
    Reported-by: Dmitry Golovin
    Original-by: Lukas Bulwahn
    CC: Lukas Bulwahn
    CC: Nick Desaulniers
    CC: Nathan Chancellor
    Reviewed-by: Nathan Chancellor
    Tested-by: Nathan Chancellor
    Suggested-by: Johannes Thumshirn
    Signed-off-by: Sedat Dilek
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Martin K. Petersen

    Sedat Dilek
     

13 Feb, 2019

1 commit


09 Feb, 2019

1 commit

  • Clang warns several times in the scsi subsystem (trimmed for brevity):

    drivers/scsi/hpsa.c:6209:7: warning: overflow converting case value to
    switch condition type (2147762695 to 18446744071562347015) [-Wswitch]
    case CCISS_GETBUSTYPES:
    ^
    drivers/scsi/hpsa.c:6208:7: warning: overflow converting case value to
    switch condition type (2147762694 to 18446744071562347014) [-Wswitch]
    case CCISS_GETHEARTBEAT:
    ^

    The root cause is that the _IOC macro can generate really large numbers,
    which don't fit into type 'int', which is used for the cmd parameter in
    the ioctls in scsi_host_template. My research into how GCC and Clang are
    handling this at a low level didn't prove fruitful. However, looking at
    the rest of the kernel tree, all ioctls use an 'unsigned int' for the
    cmd parameter, which will fit all of the _IOC values in the scsi/ata
    subsystems.

    Make that change because none of the ioctls expect a negative value for
    any command, it brings the ioctls inline with the reset of the kernel,
    and it removes ambiguity, which is never good when dealing with compilers.

    Link: https://github.com/ClangBuiltLinux/linux/issues/85
    Link: https://github.com/ClangBuiltLinux/linux/issues/154
    Link: https://github.com/ClangBuiltLinux/linux/issues/157
    Signed-off-by: Nathan Chancellor
    Acked-by: Bradley Grove
    Acked-by: Don Brace
    Reviewed-by: Bart Van Assche
    Tested-by: Nick Desaulniers
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Nathan Chancellor
     

06 Feb, 2019

2 commits


29 Jan, 2019

1 commit

  • Since the function scsi_to_u32() is identical to get_unaligned_be32(),
    change all scsi_to_u32() calls into get_unaligned_be32() calls.

    Cc: Jian Luo
    Cc: John Garry
    Signed-off-by: Bart Van Assche
    Reviewed-by: John Garry
    Reviewed-by: Johannes Thumshirn
    Signed-off-by: Martin K. Petersen

    Bart Van Assche