Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 22:48:06 +0000 (14:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 28 Dec 2018 22:48:06 +0000 (14:48 -0800)
Pull SCSI updates from James Bottomley:
 "This is mostly update of the usual drivers: smarpqi, lpfc, qedi,
  megaraid_sas, libsas, zfcp, mpt3sas, hisi_sas.

  Additionally, we have a pile of annotation, unused variable and minor
  updates.

  The big API change is the updates for Christoph's DMA rework which
  include removing the DISABLE_CLUSTERING flag.

  And finally there are a couple of target tree updates"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (259 commits)
  scsi: isci: request: mark expected switch fall-through
  scsi: isci: remote_node_context: mark expected switch fall-throughs
  scsi: isci: remote_device: Mark expected switch fall-throughs
  scsi: isci: phy: Mark expected switch fall-through
  scsi: iscsi: Capture iscsi debug messages using tracepoints
  scsi: myrb: Mark expected switch fall-throughs
  scsi: megaraid: fix out-of-bound array accesses
  scsi: mpt3sas: mpt3sas_scsih: Mark expected switch fall-through
  scsi: fcoe: remove set but not used variable 'port'
  scsi: smartpqi: call pqi_free_interrupts() in pqi_shutdown()
  scsi: smartpqi: fix build warnings
  scsi: smartpqi: update driver version
  scsi: smartpqi: add ofa support
  scsi: smartpqi: increase fw status register read timeout
  scsi: smartpqi: bump driver version
  scsi: smartpqi: add smp_utils support
  scsi: smartpqi: correct lun reset issues
  scsi: smartpqi: correct volume status
  scsi: smartpqi: do not offline disks for transient did no connect conditions
  scsi: smartpqi: allow for larger raid maps
  ...

36 files changed:
1  2 
block/blk-merge.c
block/blk-settings.c
block/blk-sysfs.c
drivers/scsi/bnx2fc/bnx2fc_fcoe.c
drivers/scsi/bnx2i/bnx2i_hwi.c
drivers/scsi/csiostor/csio_scsi.c
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
drivers/scsi/cxlflash/main.c
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
drivers/scsi/hosts.c
drivers/scsi/libiscsi.c
drivers/scsi/libsas/sas_ata.c
drivers/scsi/libsas/sas_scsi_host.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_scsi.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/myrb.c
drivers/scsi/qedi/qedi_main.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_nvme.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_transport_iscsi.c
drivers/scsi/smartpqi/smartpqi_init.c
drivers/scsi/storvsc_drv.c
drivers/scsi/ufs/ufshcd.c
drivers/scsi/virtio_scsi.c
drivers/scsi/vmw_pvscsi.c
drivers/target/target_core_pscsi.c
drivers/target/target_core_transport.c
include/linux/blkdev.h
include/scsi/scsi_host.h

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f92196ec54894d3363749010405c23e07c139c8a,90f1742cff584dbc1bcb2fca41b8cae16b1446de..ea69dafc97749e34be377c658c314cbfdc58bf94
@@@ -1742,6 -1745,41 +1741,49 @@@ qla2x00_loop_reset(scsi_qla_host_t *vha
        return QLA_SUCCESS;
  }
  
 -                      qla2xxx_eh_abort(GET_CMD_SP(sp));
+ static void qla2x00_abort_srb(struct qla_qpair *qp, srb_t *sp, const int res,
+                             unsigned long *flags)
+       __releases(qp->qp_lock_ptr)
+       __acquires(qp->qp_lock_ptr)
+ {
+       scsi_qla_host_t *vha = qp->vha;
+       struct qla_hw_data *ha = vha->hw;
+       if (sp->type == SRB_NVME_CMD || sp->type == SRB_NVME_LS) {
+               if (!sp_get(sp)) {
+                       /* got sp */
+                       spin_unlock_irqrestore(qp->qp_lock_ptr, *flags);
+                       qla_nvme_abort(ha, sp, res);
+                       spin_lock_irqsave(qp->qp_lock_ptr, *flags);
+               }
+       } else if (GET_CMD_SP(sp) && !ha->flags.eeh_busy &&
+                  !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) &&
+                  !qla2x00_isp_reg_stat(ha) && sp->type == SRB_SCSI_CMD) {
+               /*
+                * Don't abort commands in adapter during EEH recovery as it's
+                * not accessible/responding.
+                *
+                * Get a reference to the sp and drop the lock. The reference
+                * ensures this sp->done() call and not the call in
+                * qla2xxx_eh_abort() ends the SCSI cmd (with result 'res').
+                */
+               if (!sp_get(sp)) {
++                      int status;
++
+                       spin_unlock_irqrestore(qp->qp_lock_ptr, *flags);
++                      status = qla2xxx_eh_abort(GET_CMD_SP(sp));
+                       spin_lock_irqsave(qp->qp_lock_ptr, *flags);
++                      /*
++                       * Get rid of extra reference caused
++                       * by early exit from qla2xxx_eh_abort
++                       */
++                      if (status == FAST_IO_FAIL)
++                              atomic_dec(&sp->ref_count);
+               }
+       }
+       sp->done(sp, res);
+ }
  static void
  __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
  {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 2cfd61d62e9730503414817d52c053c4083ba9e7,dccf2c58c7ec2b6c7d70f3830e433d428804d489..ef9e75b359d47048ab0a5449c6f3b576b6b23215
@@@ -1790,10 -1831,13 +1831,13 @@@ void transport_generic_request_failure(
        transport_complete_task_attr(cmd);
  
        if (cmd->transport_complete_callback)
 -              cmd->transport_complete_callback(cmd, false, NULL);
 +              cmd->transport_complete_callback(cmd, false, &post_ret);
  
-       if (transport_check_aborted_status(cmd, 1))
+       if (cmd->transport_state & CMD_T_ABORTED) {
+               INIT_WORK(&cmd->work, target_abort_work);
+               queue_work(target_completion_wq, &cmd->work);
                return;
+       }
  
        switch (sense_reason) {
        case TCM_NON_EXISTENT_LUN:
index 45552e6eae1e345a320ae0539cce1c28f744b9b7,653ae90eec0be5ba7fe00bd8a0099d589ee955fa..338604dff7d04315555105d8c0f806fad349c701
@@@ -653,16 -775,15 +652,11 @@@ static inline bool blk_account_rq(struc
  
  #define rq_data_dir(rq)               (op_is_write(req_op(rq)) ? WRITE : READ)
  
 -/*
 - * Driver can handle struct request, if it either has an old style
 - * request_fn defined, or is blk-mq based.
 - */
 -static inline bool queue_is_rq_based(struct request_queue *q)
 +static inline bool queue_is_mq(struct request_queue *q)
  {
 -      return q->request_fn || q->mq_ops;
 +      return q->mq_ops;
  }
  
- static inline unsigned int blk_queue_cluster(struct request_queue *q)
- {
-       return q->limits.cluster;
- }
  static inline enum blk_zoned_model
  blk_queue_zoned_model(struct request_queue *q)
  {
Simple merge