Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jun 2020 22:11:50 +0000 (15:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jun 2020 22:11:50 +0000 (15:11 -0700)
Pull SCSI updates from James Bottomley:
 :This series consists of the usual driver updates (qla2xxx, ufs, zfcp,
  target, scsi_debug, lpfc, qedi, qedf, hisi_sas, mpt3sas) plus a host
  of other minor updates.

  There are no major core changes in this series apart from a
  refactoring in scsi_lib.c"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (207 commits)
  scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes
  scsi: cxgb3i: Fix some leaks in init_act_open()
  scsi: ibmvscsi: Make some functions static
  scsi: iscsi: Fix deadlock on recovery path during GFP_IO reclaim
  scsi: ufs: Fix WriteBooster flush during runtime suspend
  scsi: ufs: Fix index of attributes query for WriteBooster feature
  scsi: ufs: Allow WriteBooster on UFS 2.2 devices
  scsi: ufs: Remove unnecessary memset for dev_info
  scsi: ufs-qcom: Fix scheduling while atomic issue
  scsi: mpt3sas: Fix reply queue count in non RDPQ mode
  scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event
  scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd()
  scsi: vhost: Notify TCM about the maximum sg entries supported per command
  scsi: qla2xxx: Remove return value from qla_nvme_ls()
  scsi: qla2xxx: Remove an unused function
  scsi: iscsi: Register sysfs for iscsi workqueue
  scsi: scsi_debug: Parser tables and code interaction
  scsi: core: Refactor scsi_mq_setup_tags function
  scsi: core: Fix incorrect usage of shost_for_each_device
  scsi: qla2xxx: Fix endianness annotations in source files
  ...

27 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/qlogic/qed/qed.h
drivers/net/ethernet/qlogic/qed/qed_main.c
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_ct.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_nvmet.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/qla2xxx/qla_attr.c
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_mbx.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/scsi_lib.c
drivers/scsi/sd.c
drivers/scsi/sr.c
drivers/target/target_core_transport.c
drivers/target/target_core_user.c
drivers/vhost/scsi.c
include/linux/qed/qed_if.h
include/scsi/scsi_cmnd.h

diff --cc MAINTAINERS
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
@@@ -87,11 -87,12 +87,11 @@@ qla24xx_process_abts(struct scsi_qla_ho
        }
  
        /* terminate exchange */
 -      memset(rsp_els, 0, sizeof(*rsp_els));
        rsp_els->entry_type = ELS_IOCB_TYPE;
        rsp_els->entry_count = 1;
-       rsp_els->nport_handle = ~0;
+       rsp_els->nport_handle = cpu_to_le16(~0);
        rsp_els->rx_xchg_address = abts->rx_xch_addr_to_abort;
-       rsp_els->control_flags = EPD_RX_XCHG;
+       rsp_els->control_flags = cpu_to_le16(EPD_RX_XCHG);
        ql_dbg(ql_dbg_init, vha, 0x0283,
            "Sending ELS Response to terminate exchange %#x...\n",
            abts->rx_xch_addr_to_abort);
Simple merge
Simple merge
@@@ -978,24 -953,38 +953,22 @@@ void scsi_io_completion(struct scsi_cmn
                scsi_io_completion_action(cmd, result);
  }
  
 -static blk_status_t scsi_init_sgtable(struct request *req,
 -              struct scsi_data_buffer *sdb)
 +static inline bool scsi_cmd_needs_dma_drain(struct scsi_device *sdev,
 +              struct request *rq)
  {
 -      int count;
 -
 -      /*
 -       * If sg table allocation fails, requeue request later.
 -       */
 -      if (unlikely(sg_alloc_table_chained(&sdb->table,
 -                      blk_rq_nr_phys_segments(req), sdb->table.sgl,
 -                      SCSI_INLINE_SG_CNT)))
 -              return BLK_STS_RESOURCE;
 -
 -      /* 
 -       * Next, walk the list, and fill in the addresses and sizes of
 -       * each segment.
 -       */
 -      count = blk_rq_map_sg(req->q, req, sdb->table.sgl);
 -      BUG_ON(count > sdb->table.nents);
 -      sdb->table.nents = count;
 -      sdb->length = blk_rq_payload_bytes(req);
 -      return BLK_STS_OK;
 +      return sdev->dma_drain_len && blk_rq_is_passthrough(rq) &&
 +             !op_is_write(req_op(rq)) &&
 +             sdev->host->hostt->dma_need_drain(rq);
  }
  
- /*
-  * Function:    scsi_init_io()
-  *
-  * Purpose:     SCSI I/O initialize function.
-  *
-  * Arguments:   cmd   - Command descriptor we wish to initialize
+ /**
+  * scsi_init_io - SCSI I/O initialization function.
+  * @cmd:  command descriptor we wish to initialize
   *
-  * Returns:     BLK_STS_OK on success
-  *            BLK_STS_RESOURCE if the failure is retryable
-  *            BLK_STS_IOERR if the failure is fatal
+  * Returns:
+  * * BLK_STS_OK       - on success
+  * * BLK_STS_RESOURCE - if the failure is retryable
+  * * BLK_STS_IOERR    - if the failure is fatal
   */
  blk_status_t scsi_init_io(struct scsi_cmnd *cmd)
  {
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -821,13 -811,13 +821,14 @@@ enum qed_nvm_flash_cmd 
  
  struct qed_common_cb_ops {
        void (*arfs_filter_op)(void *dev, void *fltr, u8 fw_rc);
 -      void    (*link_update)(void                     *dev,
 -                             struct qed_link_output   *link);
 +      void (*link_update)(void *dev, struct qed_link_output *link);
        void (*schedule_recovery_handler)(void *dev);
 -      void    (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
 +      void (*schedule_hw_err_handler)(void *dev,
 +                                      enum qed_hw_err_type err_type);
 +      void (*dcbx_aen)(void *dev, struct qed_dcbx_get *get, u32 mib_type);
        void (*get_generic_tlv_data)(void *dev, struct qed_generic_tlvs *data);
        void (*get_protocol_tlv_data)(void *dev, void *data);
+       void (*bw_update)(void *dev);
  };
  
  struct qed_selftest_ops {
Simple merge