1. 07 Aug, 2019 6 commits
    • Andrew Vasquez's avatar
      scsi: qla2xxx: Use common update-firmware-options routine for ISP27xx+ · a36f1443
      Andrew Vasquez authored
      Leverage the generic routine, qla24xx_update_fw_options(), for the
      configuration of firmware options for ISP27xx/ISP28xx.
      Signed-off-by: default avatarAndrew Vasquez <andrewv@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      a36f1443
    • Arun Easi's avatar
      scsi: qla2xxx: Fix NVMe port discovery after a short device port loss · 9e744591
      Arun Easi authored
      The following sequence of event leads to NVME port disappearing:
      
          - device port shut
          - nvme_fc_unregister_remoteport
          - device port online
          - remote port delete completes
          - relogin is scheduled
          - "post gidpn" message appears due to rscn generation # mismatch
      
      In short, if a device comes back online sooner than an unregister
      completion, a mismatch in rscn generation number occurs, which is not
      handled correctly during device relogin. Fix this by starting with a redo
      of GNL.
      
      When ql2xextended_error_logging is enabled, the re-plugged device's
      discovery stops with the following messages printed:
      
      --8<--
      qla2xxx [0000:41:00.0]-480d:3: Relogin scheduled.
      qla2xxx [0000:41:00.0]-4800:3: DPC handler sleeping.
      qla2xxx [0000:41:00.0]-2902:3: qla24xx_handle_relogin_event 21:00:00:24:ff:17:9e:91 DS 0 LS 7 P 0 del 2 cnfl
         (null) rscn 1|2 login 1|2 fl 1
      qla2xxx [0000:41:00.0]-28e9:3: qla24xx_handle_relogin_event 1666 21:00:00:24:ff:17:9e:91 post gidpn
      qla2xxx [0000:41:00.0]-480e:3: Relogin end.
      --8<--
      Signed-off-by: default avatarArun Easi <aeasi@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      9e744591
    • Andrew Vasquez's avatar
      scsi: qla2xxx: Correct error handling during initialization failures · 26a77799
      Andrew Vasquez authored
      Current code misses or fails to account for proper recovery during early
      initialization failures:
      
       - Properly unwind allocations during probe() failures.
      
       - Protect against non-initialization memory allocations during
         unwinding.
      
       - Propagate error status during HW initialization.
      
       - Release SCSI host reference when memory allocations fail.
      Signed-off-by: default avatarAndrew Vasquez <andrewv@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      26a77799
    • Quinn Tran's avatar
      scsi: qla2xxx: Retry fabric Scan on IOCB queue full · f0cecc1e
      Quinn Tran authored
      when fabric scan thread encounters IOCB Q Full, schedule a delayed work to
      retry fabric scan.
      Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      f0cecc1e
    • Quinn Tran's avatar
      scsi: qla2xxx: Fix premature timer expiration · 3a4b6cc7
      Quinn Tran authored
      For any qla2xxx async command, the SRB buffer is used to send it. In
      setting up the SRB buffer, the timer for this command is started before all
      memory allocation has finished.  Under low memory pressure, memory alloc
      can go to sleep and not wake up before the timer expires. Once timer has
      expired, the timer thread will access uninitialize fields resulting into
      NULL pointer crash.
      
      This patch fixes this crash by moving the start of timer after everything
      is setup.
      
      backtrace shows following
      
      PID: 3720   TASK: ffff996928401040  CPU: 0   COMMAND: "qla2xxx_1_dpc"
      0 [ffff99652751b698] __schedule at ffffffff965676c7
      1 [ffff99652751b728] schedule at ffffffff96567bc9
      2 [ffff99652751b738] schedule_timeout at ffffffff965655e8
      3 [ffff99652751b7e0] io_schedule_timeout at ffffffff9656726d
      4 [ffff99652751b810] congestion_wait at ffffffff95fd8d12
      5 [ffff99652751b870] isolate_migratepages_range at ffffffff95fddaf3
      6 [ffff99652751b930] compact_zone at ffffffff95fdde96
      7 [ffff99652751b980] compact_zone_order at ffffffff95fde0bc
      8 [ffff99652751ba20] try_to_compact_pages at ffffffff95fde481
      9 [ffff99652751ba80] __alloc_pages_direct_compact at ffffffff9655cc31
      10 [ffff99652751bae0] __alloc_pages_slowpath at ffffffff9655d101
      11 [ffff99652751bbd0] __alloc_pages_nodemask at ffffffff95fc0e95
      12 [ffff99652751bc80] dma_generic_alloc_coherent at ffffffff95e3217f
      13 [ffff99652751bcc8] x86_swiotlb_alloc_coherent at ffffffff95e6b7a1
      14 [ffff99652751bcf8] qla2x00_rft_id at ffffffffc055b5e0 [qla2xxx]
      15 [ffff99652751bd50] qla2x00_loop_resync at ffffffffc0533e71 [qla2xxx]
      16 [ffff99652751be68] qla2x00_do_dpc at ffffffffc05210ca [qla2xxx]
      
      PID: 0      TASK: ffffffff96a18480  CPU: 0   COMMAND: "swapper/0"
       0 [ffff99652fc03ae0] machine_kexec at ffffffff95e63674
       1 [ffff99652fc03b40] __crash_kexec at ffffffff95f1ce12
       2 [ffff99652fc03c10] crash_kexec at ffffffff95f1cf00
       3 [ffff99652fc03c28] oops_end at ffffffff9656c758
       4 [ffff99652fc03c50] no_context at ffffffff9655aa7e
       5 [ffff99652fc03ca0] __bad_area_nosemaphore at ffffffff9655ab15
       6 [ffff99652fc03cf0] bad_area_nosemaphore at ffffffff9655ac86
       7 [ffff99652fc03d00] __do_page_fault at ffffffff9656f6b0
       8 [ffff99652fc03d70] do_page_fault at ffffffff9656f915
       9 [ffff99652fc03da0] page_fault at ffffffff9656b758
          [exception RIP: unknown or invalid address]
          RIP: 0000000000000000  RSP: ffff99652fc03e50  RFLAGS: 00010202
          RAX: 0000000000000000  RBX: ffff99652b79a600  RCX: ffff99652b79a760
          RDX: ffff99652b79a600  RSI: ffffffffc0525ad0  RDI: ffff99652b79a600
          RBP: ffff99652fc03e60   R8: ffffffff96a18a18   R9: ffffffff96ee3c00
          R10: 0000000000000002  R11: ffff99652fc03de8  R12: ffff99652b79a760
          R13: 0000000000000100  R14: ffffffffc0525ad0  R15: ffff99652b79a600
          ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
      10 [ffff99652fc03e50] qla2x00_sp_timeout at ffffffffc0525af8 [qla2xxx]
      11 [ffff99652fc03e68] call_timer_fn at ffffffff95ea7f58
      12 [ffff99652fc03ea0] run_timer_softirq at ffffffff95eaa3bd
      13 [ffff99652fc03f18] __do_softirq at ffffffff95ea0f05
      14 [ffff99652fc03f88] call_softirq at ffffffff9657832c
      15 [ffff99652fc03fa0] do_softirq at ffffffff95e2e675
      16 [ffff99652fc03fc0] irq_exit at ffffffff95ea1285
      17 [ffff99652fc03fd8] smp_apic_timer_interrupt at ffffffff965796c8
      18 [ffff99652fc03ff0] apic_timer_interrupt at ffffffff96575df2
      Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      3a4b6cc7
    • Quinn Tran's avatar
      scsi: qla2xxx: Fix Relogin to prevent modifying scan_state flag · 8b5292bc
      Quinn Tran authored
      Relogin fails to move forward due to scan_state flag indicating device is
      not there. Before relogin process, Session delete process accidently
      modified the scan_state flag.
      
      [mkp: typos plus corrected Fixes: sha as reported by sfr]
      
      Fixes: 2dee5521 ("scsi: qla2xxx: Fix login state machine freeze")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarQuinn Tran <qutran@marvell.com>
      Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      8b5292bc
  2. 30 Jul, 2019 17 commits
  3. 22 Jul, 2019 9 commits
  4. 21 Jul, 2019 8 commits
    • Linus Torvalds's avatar
      Linus 5.3-rc1 · 5f9e832c
      Linus Torvalds authored
      5f9e832c
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · c7bf0a0f
      Linus Torvalds authored
      Pull Devicetree fixes from Rob Herring:
       "Fix several warnings/errors in validation of binding schemas"
      
      * tag 'devicetree-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: pinctrl: stm32: Fix missing 'clocks' property in examples
        dt-bindings: iio: ad7124: Fix dtc warnings in example
        dt-bindings: iio: avia-hx711: Fix avdd-supply typo in example
        dt-bindings: pinctrl: aspeed: Fix AST2500 example errors
        dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors
        dt-bindings: riscv: Limit cpus schema to only check RiscV 'cpu' nodes
        dt-bindings: Ensure child nodes are of type 'object'
      c7bf0a0f
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d6788eb7
      Linus Torvalds authored
      Pull vfs documentation typo fix from Al Viro.
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        typo fix: it's d_make_root, not d_make_inode...
      d6788eb7
    • Linus Torvalds's avatar
      Merge tag '5.3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 91962d0f
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Two fixes for stable, one that had dependency on earlier patch in this
        merge window and can now go in, and a perf improvement in SMB3 open"
      
      * tag '5.3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: flush before set-info if we have writeable handles
        smb3: optimize open to not send query file internal info
        cifs: copy_file_range needs to strip setuid bits and update timestamps
        CIFS: fix deadlock in cached root handling
      91962d0f
    • Qian Cai's avatar
      iommu/amd: fix a crash in iova_magazine_free_pfns · 8cf66504
      Qian Cai authored
      The commit b3aa14f0 ("iommu: remove the mapping_error dma_map_ops
      method") incorrectly changed the checking from dma_ops_alloc_iova() in
      map_sg() causes a crash under memory pressure as dma_ops_alloc_iova()
      never return DMA_MAPPING_ERROR on failure but 0, so the error handling
      is all wrong.
      
         kernel BUG at drivers/iommu/iova.c:801!
          Workqueue: kblockd blk_mq_run_work_fn
          RIP: 0010:iova_magazine_free_pfns+0x7d/0xc0
          Call Trace:
           free_cpu_cached_iovas+0xbd/0x150
           alloc_iova_fast+0x8c/0xba
           dma_ops_alloc_iova.isra.6+0x65/0xa0
           map_sg+0x8c/0x2a0
           scsi_dma_map+0xc6/0x160
           pqi_aio_submit_io+0x1f6/0x440 [smartpqi]
           pqi_scsi_queue_command+0x90c/0xdd0 [smartpqi]
           scsi_queue_rq+0x79c/0x1200
           blk_mq_dispatch_rq_list+0x4dc/0xb70
           blk_mq_sched_dispatch_requests+0x249/0x310
           __blk_mq_run_hw_queue+0x128/0x200
           blk_mq_run_work_fn+0x27/0x30
           process_one_work+0x522/0xa10
           worker_thread+0x63/0x5b0
           kthread+0x1d2/0x1f0
           ret_from_fork+0x22/0x40
      
      Fixes: b3aa14f0 ("iommu: remove the mapping_error dma_map_ops method")
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8cf66504
    • Mike Rapoport's avatar
      hexagon: switch to generic version of pte allocation · 618381f0
      Mike Rapoport authored
      The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(),
      pte_free_kernel() and pte_free() is identical to the generic except of
      lack of __GFP_ACCOUNT for the user PTEs allocation.
      
      Switch hexagon to use generic version of these functions.
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      618381f0
    • Linus Torvalds's avatar
      Merge tag 'ntb-5.3' of git://github.com/jonmason/ntb · bec5545e
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "New feature to add support for NTB virtual MSI interrupts, the ability
        to test and use this feature in the NTB transport layer.
      
        Also, bug fixes for the AMD and Switchtec drivers, as well as some
        general patches"
      
      * tag 'ntb-5.3' of git://github.com/jonmason/ntb: (22 commits)
        NTB: Describe the ntb_msi_test client in the documentation.
        NTB: Add MSI interrupt support to ntb_transport
        NTB: Add ntb_msi_test support to ntb_test
        NTB: Introduce NTB MSI Test Client
        NTB: Introduce MSI library
        NTB: Rename ntb.c to support multiple source files in the module
        NTB: Introduce functions to calculate multi-port resource index
        NTB: Introduce helper functions to calculate logical port number
        PCI/switchtec: Add module parameter to request more interrupts
        PCI/MSI: Support allocating virtual MSI interrupts
        ntb_hw_switchtec: Fix setup MW with failure bug
        ntb_hw_switchtec: Skip unnecessary re-setup of shared memory window for crosslink case
        ntb_hw_switchtec: Remove redundant steps of switchtec_ntb_reinit_peer() function
        NTB: correct ntb_dev_ops and ntb_dev comment typos
        NTB: amd: Silence shift wrapping warning in amd_ntb_db_vector_mask()
        ntb_hw_switchtec: potential shift wrapping bug in switchtec_ntb_init_sndev()
        NTB: ntb_transport: Ensure qp->tx_mw_dma_addr is initaliazed
        NTB: ntb_hw_amd: set peer limit register
        NTB: ntb_perf: Clear stale values in doorbell and command SPAD register
        NTB: ntb_perf: Disable NTB link after clearing peer XLAT registers
        ...
      bec5545e
    • Al Viro's avatar
      typo fix: it's d_make_root, not d_make_inode... · 1b03bc5c
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      1b03bc5c