30 Oct, 2020

1 commit

  • When hpsa_scsi_add_host() fails, h->lastlogicals is leaked since it is
    missing a free() in the error handler.

    Fix this by adding free() when hpsa_scsi_add_host() fails.

    Link: https://lore.kernel.org/r/20201027073125.14229-1-keitasuzuki.park@sslab.ics.keio.ac.jp
    Tested-by: Don Brace
    Acked-by: Don Brace
    Signed-off-by: Keita Suzuki
    Signed-off-by: Martin K. Petersen

    Keita Suzuki
     

15 Oct, 2020

1 commit

  • Pull SCSI updates from James Bottomley:
    "The usual driver updates (ufs, qla2xxx, tcmu, ibmvfc, lpfc, smartpqi,
    hisi_sas, qedi, qedf, mpt3sas) and minor bug fixes.

    There are only three core changes: adding sense codes, cleaning up
    noretry and adding an option for limitless retries"

    * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (226 commits)
    scsi: hisi_sas: Recover PHY state according to the status before reset
    scsi: hisi_sas: Filter out new PHY up events during suspend
    scsi: hisi_sas: Add device link between SCSI devices and hisi_hba
    scsi: hisi_sas: Add check for methods _PS0 and _PR0
    scsi: hisi_sas: Add controller runtime PM support for v3 hw
    scsi: hisi_sas: Switch to new framework to support suspend and resume
    scsi: hisi_sas: Use hisi_hba->cq_nvecs for calling calling synchronize_irq()
    scsi: qedf: Remove redundant assignment to variable 'rc'
    scsi: lpfc: Remove unneeded variable 'status' in lpfc_fcp_cpu_map_store()
    scsi: snic: Convert to use DEFINE_SEQ_ATTRIBUTE macro
    scsi: qla4xxx: Delete unneeded variable 'status' in qla4xxx_process_ddb_changed
    scsi: sun_esp: Use module_platform_driver to simplify the code
    scsi: sun3x_esp: Use module_platform_driver to simplify the code
    scsi: sni_53c710: Use module_platform_driver to simplify the code
    scsi: qlogicpti: Use module_platform_driver to simplify the code
    scsi: mac_esp: Use module_platform_driver to simplify the code
    scsi: jazz_esp: Use module_platform_driver to simplify the code
    scsi: mvumi: Fix error return in mvumi_io_attach()
    scsi: lpfc: Drop nodelist reference on error in lpfc_gen_req()
    scsi: be2iscsi: Fix a theoretical leak in beiscsi_create_eqs()
    ...

    Linus Torvalds
     

03 Sep, 2020

1 commit

  • Add entry for Microchip.

    Link: https://lore.kernel.org/r/159864166227.12131.3427629298809272795.stgit@brunhilda
    Reviewed-by: Scott Teel
    Reviewed-by: Scott Benesh
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

25 Aug, 2020

1 commit

  • The legacy API wrappers in include/linux/pci-dma-compat.h should go away as
    they create unnecessary midlayering for include/linux/dma-mapping.h API.
    Instead use dma-mapping.h API directly.

    The patch has been generated with the coccinelle script below. Compile
    tested.

    @@@@
    - PCI_DMA_BIDIRECTIONAL
    + DMA_BIDIRECTIONAL

    @@@@
    - PCI_DMA_TODEVICE
    + DMA_TO_DEVICE

    @@@@
    - PCI_DMA_FROMDEVICE
    + DMA_FROM_DEVICE

    @@@@
    - PCI_DMA_NONE
    + DMA_NONE

    @@ expression E1, E2, E3; @@
    - pci_alloc_consistent(E1, E2, E3)
    + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)

    @@ expression E1, E2, E3; @@
    - pci_zalloc_consistent(E1, E2, E3)
    + dma_alloc_coherent(&E1->dev, E2, E3, GFP_)

    @@ expression E1, E2, E3, E4; @@
    - pci_free_consistent(E1, E2, E3, E4)
    + dma_free_coherent(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_map_single(E1, E2, E3, E4)
    + dma_map_single(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_unmap_single(E1, E2, E3, E4)
    + dma_unmap_single(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4, E5; @@
    - pci_map_page(E1, E2, E3, E4, E5)
    + dma_map_page(&E1->dev, E2, E3, E4, E5)

    @@ expression E1, E2, E3, E4; @@
    - pci_unmap_page(E1, E2, E3, E4)
    + dma_unmap_page(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_map_sg(E1, E2, E3, E4)
    + dma_map_sg(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_unmap_sg(E1, E2, E3, E4)
    + dma_unmap_sg(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_dma_sync_single_for_cpu(E1, E2, E3, E4)
    + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_dma_sync_single_for_device(E1, E2, E3, E4)
    + dma_sync_single_for_device(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4)
    + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4)

    @@ expression E1, E2, E3, E4; @@
    - pci_dma_sync_sg_for_device(E1, E2, E3, E4)
    + dma_sync_sg_for_device(&E1->dev, E2, E3, E4)

    @@ expression E1, E2; @@
    - pci_dma_mapping_error(E1, E2)
    + dma_mapping_error(&E1->dev, E2)

    @@ expression E1, E2; @@
    - pci_set_consistent_dma_mask(E1, E2)
    + dma_set_coherent_mask(&E1->dev, E2)

    @@ expression E1, E2; @@
    - pci_set_dma_mask(E1, E2)
    + dma_set_mask(&E1->dev, E2)

    Link: https://lore.kernel.org/r/37154a4efe82a58b9bad143608dd9fd37a2c94e5.1596045683.git.usuraj35@gmail.com
    Signed-off-by: Suraj Upadhyay
    Signed-off-by: Martin K. Petersen

    Suraj Upadhyay
     

24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

29 Jul, 2020

1 commit

  • Need to set queue depth for controller devices.

    Link: https://lore.kernel.org/r/159562590819.17915.12766718094041027754.stgit@brunhilda
    Fixes: 30bda7848a23 ("scsi: hpsa: Increase controller error handling timeout")
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

25 Jul, 2020

3 commits

  • Link: https://lore.kernel.org/r/159528198909.24772.9189002306398058371.stgit@brunhilda
    Reviewed-by: Gerry Morong
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • The controller can become slow to respond to SCSI INQUIRY requests
    resulting in the SCSI midlayer offlining the controller device.

    Increase the timeout value for commands sent to the controller device.

    Link: https://lore.kernel.org/r/159528198335.24772.7963614374905470122.stgit@brunhilda
    Reviewed-by: Scott Teel
    Reviewed-by: Scott Benesh
    Reviewed-by: Kevin Barnett
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • There are some rare conditions where a spare is first in the device list
    causing an array out-of-bounds condition.

    Link: https://lore.kernel.org/r/159528197176.24772.14659026352708896249.stgit@brunhilda
    Reviewed-by: Scott Teel
    Reviewed-by: Scott Benesh
    Reviewed-by: Kevin Barnett
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

04 Jun, 2020

4 commits

  • Link: https://lore.kernel.org/r/20200529234028.46373-4-viro@ZenIV.linux.org.uk
    Acked-by: Don Brace
    Tested-by: Don Brace
    Signed-off-by: Al Viro
    Signed-off-by: Martin K. Petersen

    Al Viro
     
  • No need for building a native struct on kernel stack, copying it to
    userland one, then calling hpsa_ioctl() which copies it back into _another_
    instance of the same struct.

    Link: https://lore.kernel.org/r/20200529234028.46373-3-viro@ZenIV.linux.org.uk
    Acked-by: Don Brace
    Tested-by: Don Brace
    Signed-off-by: Al Viro
    Signed-off-by: Martin K. Petersen

    Al Viro
     
  • "BIG" in the name refers to the amount of data being transferred, _not_ the
    size of structure itself; it's 140 or 144 bytes (for 32bit and 64bit hosts
    resp.). IOCTL_Command_struct is 136 or 144 bytes large...

    No point whatsoever turning that into dynamic allocation, let alone vmalloc
    one. Just keep it as local variable...

    Link: https://lore.kernel.org/r/20200529234028.46373-2-viro@ZenIV.linux.org.uk
    Acked-by: Don Brace
    Tested-by: Don Brace
    Signed-off-by: Al Viro
    Signed-off-by: Martin K. Petersen

    Al Viro
     
  • Link: https://lore.kernel.org/r/20200529234028.46373-1-viro@ZenIV.linux.org.uk
    Acked-by: Don Brace
    Tested-by: Don Brace
    Signed-off-by: Al Viro
    Signed-off-by: Martin K. Petersen

    Al Viro
     

27 Mar, 2020

1 commit

  • Correct race condition where ioaccel is re-enabled before the raid_map is
    updated. For RAID_1, RAID_1ADM, and RAID 5/6 there is a BUG_ON called which
    is bad.

    - Change event thread to disable ioaccel only. Send all requests down the
    RAID path instead.

    - Have rescan thread handle offload_enable.

    - Since there is only one rescan allowed at a time, turning
    offload_enabled on/off should not be racy. Each handler queues up a
    rescan if one is already in progress.

    - For timing diagram, offload_enabled is initially off due to a change
    (transformation: splitmirror/remirror), ...

    otbe = offload_to_be_enabled
    oe = offload_enabled

    Time Event Rescan Completion Request
    Worker Worker Thread Thread
    ---- ------ ------ ---------- -------
    T0 | | + UA |
    T1 | + rescan started | 0x3f |
    T2 + Event | | 0x0e |
    T3 + Ack msg | | |
    T4 | + if (!dev[i]->oe && | |
    T5 | | dev[i]->otbe) | |
    T6 | | get_raid_map | |
    T7 + otbe = 1 | | |
    T8 | | | |
    T9 | + oe = otbe | |
    T10 | | | + ioaccel request
    T11 * BUG_ON

    T0 - I/O completion with UA 0x3f 0x0e sets rescan flag.
    T1 - rescan worker thread starts a rescan.
    T2 - event comes in
    T3 - event thread starts and issues "Acknowledge" message
    ...
    T6 - rescan thread has bypassed code to reload new raid map.
    ...
    T7 - event thread runs and sets offload_to_be_enabled
    ...
    T9 - rescan thread turns on offload_enabled.
    T10- request comes in and goes down ioaccel path.
    T11- BUG_ON.

    - After the patch is applied, ioaccel_enabled can only be re-enabled in
    the re-scan thread.

    Link: https://lore.kernel.org/r/158472877894.14200.7077843399036368335.stgit@brunhilda
    Reviewed-by: Scott Teel
    Reviewed-by: Matt Perricone
    Reviewed-by: Scott Benesh
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

06 Jan, 2020

1 commit


26 Oct, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Nine changes, eight to drivers (qla2xxx, hpsa, lpfc, alua, ch,
    53c710[x2], target) and one core change that tries to close a race
    between sysfs delete and module removal"

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: lpfc: remove left-over BUILD_NVME defines
    scsi: core: try to get module before removing device
    scsi: hpsa: add missing hunks in reset-patch
    scsi: target: core: Do not overwrite CDB byte 1
    scsi: ch: Make it possible to open a ch device multiple times again
    scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE
    scsi: sni_53c710: fix compilation error
    scsi: scsi_dh_alua: handle RTPG sense code correctly during state transitions
    scsi: qla2xxx: fix a potential NULL pointer dereference

    Linus Torvalds
     

18 Oct, 2019

1 commit

  • Correct returning from reset before outstanding commands are completed
    for the device.

    Link: https://lore.kernel.org/r/157107623870.17997.11208813089704833029.stgit@brunhilda
    Reviewed-by: Scott Benesh
    Reviewed-by: Kevin Barnett
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

24 Sep, 2019

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:

    - Consolidate _HPP/_HPX stuff in pci-acpi.c and simplify it
    (Krzysztof Wilczynski)

    - Fix incorrect PCIe device types and remove dev->has_secondary_link
    to simplify code that deals with upstream/downstream ports (Mika
    Westerberg)

    - After suspend, restore Resizable BAR size bits correctly for 1MB
    BARs (Sumit Saxena)

    - Enable PCI_MSI_IRQ_DOMAIN support for RISC-V (Wesley Terpstra)

    Virtualization:

    - Add ACS quirks for iProc PAXB (Abhinav Ratna), Amazon Annapurna
    Labs (Ali Saidi)

    - Move sysfs SR-IOV functions to iov.c (Kelsey Skunberg)

    - Remove group write permissions from sysfs sriov_numvfs,
    sriov_drivers_autoprobe (Kelsey Skunberg)

    Hotplug:

    - Simplify pciehp indicator control (Denis Efremov)

    Peer-to-peer DMA:

    - Allow P2P DMA between root ports for whitelisted bridges (Logan
    Gunthorpe)

    - Whitelist some Intel host bridges for P2P DMA (Logan Gunthorpe)

    - DMA map P2P DMA requests that traverse host bridge (Logan
    Gunthorpe)

    Amazon Annapurna Labs host bridge driver:

    - Add DT binding and controller driver (Jonathan Chocron)

    Hyper-V host bridge driver:

    - Fix hv_pci_dev->pci_slot use-after-free (Dexuan Cui)

    - Fix PCI domain number collisions (Haiyang Zhang)

    - Use instance ID bytes 4 & 5 as PCI domain numbers (Haiyang Zhang)

    - Fix build errors on non-SYSFS config (Randy Dunlap)

    i.MX6 host bridge driver:

    - Limit DBI register length (Stefan Agner)

    Intel VMD host bridge driver:

    - Fix config addressing issues (Jon Derrick)

    Layerscape host bridge driver:

    - Add bar_fixed_64bit property to endpoint driver (Xiaowei Bao)

    - Add CONFIG_PCI_LAYERSCAPE_EP to build EP/RC drivers separately
    (Xiaowei Bao)

    Mediatek host bridge driver:

    - Add MT7629 controller support (Jianjun Wang)

    Mobiveil host bridge driver:

    - Fix CPU base address setup (Hou Zhiqiang)

    - Make "num-lanes" property optional (Hou Zhiqiang)

    Tegra host bridge driver:

    - Fix OF node reference leak (Nishka Dasgupta)

    - Disable MSI for root ports to work around design problem (Vidya
    Sagar)

    - Add Tegra194 DT binding and controller support (Vidya Sagar)

    - Add support for sideband pins and slot regulators (Vidya Sagar)

    - Add PIPE2UPHY support (Vidya Sagar)

    Misc:

    - Remove unused pci_block_cfg_access() et al (Kelsey Skunberg)

    - Unexport pci_bus_get(), etc (Kelsey Skunberg)

    - Hide PM, VC, link speed, ATS, ECRC, PTM constants and interfaces in
    the PCI core (Kelsey Skunberg)

    - Clean up sysfs DEVICE_ATTR() usage (Kelsey Skunberg)

    - Mark expected switch fall-through (Gustavo A. R. Silva)

    - Propagate errors for optional regulators and PHYs (Thierry Reding)

    - Fix kernel command line resource_alignment parameter issues (Logan
    Gunthorpe)"

    * tag 'pci-v5.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (112 commits)
    PCI: Add pci_irq_vector() and other stubs when !CONFIG_PCI
    arm64: tegra: Add PCIe slot supply information in p2972-0000 platform
    arm64: tegra: Add configuration for PCIe C5 sideband signals
    PCI: tegra: Add support to enable slot regulators
    PCI: tegra: Add support to configure sideband pins
    PCI: vmd: Fix shadow offsets to reflect spec changes
    PCI: vmd: Fix config addressing when using bus offsets
    PCI: dwc: Add validation that PCIe core is set to correct mode
    PCI: dwc: al: Add Amazon Annapurna Labs PCIe controller driver
    dt-bindings: PCI: Add Amazon's Annapurna Labs PCIe host bridge binding
    PCI: Add quirk to disable MSI-X support for Amazon's Annapurna Labs Root Port
    PCI/VPD: Prevent VPD access for Amazon's Annapurna Labs Root Port
    PCI: Add ACS quirk for Amazon Annapurna Labs root ports
    PCI: Add Amazon's Annapurna Labs vendor ID
    MAINTAINERS: Add PCI native host/endpoint controllers designated reviewer
    PCI: hv: Use bytes 4 and 5 from instance ID as the PCI domain numbers
    dt-bindings: PCI: tegra: Add PCIe slot supplies regulator entries
    dt-bindings: PCI: tegra: Add sideband pins configuration entries
    PCI: tegra: Add Tegra194 PCIe support
    PCI: Get rid of dev->has_secondary_link flag
    ...

    Linus Torvalds
     

28 Aug, 2019

1 commit

  • Move ASPM definitions and function prototypes from include/linux/pci-aspm.h
    to include/linux/pci.h so users only need to include :

    PCIE_LINK_STATE_L0S
    PCIE_LINK_STATE_L1
    PCIE_LINK_STATE_CLKPM
    pci_disable_link_state()
    pci_disable_link_state_locked()
    pcie_no_aspm()

    No functional changes intended.

    Link: https://lore.kernel.org/r/20190827095620.11213-1-kw@linux.com
    Signed-off-by: Krzysztof Wilczynski
    Signed-off-by: Bjorn Helgaas

    Krzysztof Wilczynski
     

03 Aug, 2019

1 commit

  • Pull SCSI fixes from James Bottomley:
    "Seven fixes to four drivers with no core changes.

    The mpt3sas one is theoretical until we get a CPU that goes up to 64
    bits physical, the qla2xxx one fixes an oops in a driver
    initialization error leg and the others are mostly cosmetic"

    [ The fcoe patches may be worth highlighting - they may be "just"
    cleanups, but they simplify and fix the odd fc_rport_priv structure
    handling rules so that the new gcc-9 warnings about memset crossing
    structure boundaries are gone.

    The old code was hard for humans to understand too, and really
    confused the compiler sanity checks - Linus ]

    * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
    scsi: qla2xxx: Fix possible fcport null-pointer dereferences
    scsi: mpt3sas: Use 63-bit DMA addressing on SAS35 HBA
    scsi: hpsa: remove printing internal cdb on tag collision
    scsi: hpsa: correct scsi command status issue after reset
    scsi: fcoe: pass in fcoe_rport structure instead of fc_rport_priv
    scsi: fcoe: Embed fc_rport_priv in fcoe_rport structure
    scsi: libfc: Whitespace cleanup in libfc.h

    Linus Torvalds
     

31 Jul, 2019

2 commits


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
     

10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

19 Jun, 2019

8 commits

  • Currently the check for a lockup_detected failure exits via the label
    return_reset_status that reads and dereferences an uninitialized pointer
    dev. Fix this by ensuring dev is inintialized to null.

    Addresses-Coverity: ("Uninitialized pointer read")
    Fixes: 14991a5bade5 ("scsi: hpsa: correct device resets")
    Signed-off-by: Colin Ian King
    Acked-by: Don Brace
    Reviewed-by: Nathan Chancellor
    Signed-off-by: Martin K. Petersen

    Colin Ian King
     
  • [mkp: wrong baseline, applied by hand]

    Reviewed-by: Gerry Morong
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Correct a race condition that occurs between the reset handler and the
    completion handler. There are times when the wait_event condition is
    never met due to this race condition and the reset never completes.

    The reset_pending field is NULL initially.

    t Reset Handler Thread Completion Thread
    -- -------------------- -----------------
    t1 if (c->reset_pending)
    t2 c->reset_pending = dev; if (atomic_dev_and_test(counter))
    t3 atomic_inc(counter) wait_up_all(event_sync_wait_queue)
    t4
    t5 wait_event(...counter == 0)

    Kernel.org Bugzilla:
    https://bugzilla.kernel.org/show_bug.cgi?id=1994350
    Bug 199435 - HPSA + P420i resetting logical Direct-Access
    never complete

    Reviewed-by: Justin Lindley
    Reviewed-by: David Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Close up a rare multipath issue.

    Close up small hole where a command completes after a device has been
    removed from SML and before the device is re-added.

    - Mark device as removed in slave_destroy

    - Do not complete commands for deleted devices

    Reviewed-by: Justin Lindley
    Reviewed-by: David Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Wait longer for outstanding commands before removing a multipath
    device. Increase the timeout value for ptraid commands.

    Reviewed-by: Justin Lindley
    Reviewed-by: David Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Correct rare multipath issue where a device is deleted with an
    outstanding cmd which results in a tag collision.

    The cmd eventually completes. If a collision is detected wait until
    the command slot is cleared.

    Reviewed-by: Justin Lindley
    Reviewed-by: David Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Avoid system stalls by switching to local workqueue.

    Reviewed-by: Justin Lindley
    Reviewed-by: David Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Correct issue with hpsa_simple_mode module parameter. Driver was
    hanging due to incorrect interrupt setup.

    Reviewed-by: Justin Lindley
    Reviewed-by: Dave Carroll
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

09 Jun, 2019

1 commit


07 Jun, 2019

1 commit

  • - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_LAST_SG for
    the last s/g element.

    - set ioaccel2_sg_element member 'chain_indicator' to IOACCEL2_CHAIN when
    chaining.

    Reviewed-by: Bader Ali - Saleh
    Reviewed-by: Scott Teel
    Reviewed-by: Matt Perricone
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

19 Mar, 2019

4 commits

  • Reviewed-by: Gerry Morong
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • There are times when a TUR can take longer than the DEFAULT_TIMEOUT
    value. The timeout code is not correct as the function exits with an
    automatic as the completion variable...To be fixed later.

    Remove the TUR timeout.

    Reviewed-by: Scott Benesh
    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Correct a 'rare' race condition where a disk is failed after a device list
    has been obtained from the controller and before attempting to get the
    device id.

    Reviewed-by: Scott Teel
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     
  • Multipath failures are normally detected at the frequency of the event
    thread. Detect LUN failures earlier by checking request completion status.

    Reviewed-by: Bader Ali-saleh
    Reviewed-by: Scott Benesh
    Reviewed-by: Scott Teel
    Reviewed-by: Prasad Munirathnam
    Reviewed-by: Kevin Barnett
    Signed-off-by: Don Brace
    Signed-off-by: Martin K. Petersen

    Don Brace
     

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