1
0

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

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
  ...
This commit is contained in:
Linus Torvalds
2018-12-28 14:48:06 -08:00
269 changed files with 7993 additions and 3853 deletions

View File

@@ -328,7 +328,6 @@ struct scsi_host_template qla2xxx_driver_template = {
.map_queues = qla2xxx_map_queues,
.this_id = -1,
.cmd_per_lun = 3,
.use_clustering = ENABLE_CLUSTERING,
.sg_tablesize = SG_ALL,
.max_sectors = 0xFFFF,
@@ -1742,10 +1741,53 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
return QLA_SUCCESS;
}
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)
{
int cnt, status;
int cnt;
unsigned long flags;
srb_t *sp;
scsi_qla_host_t *vha = qp->vha;
@@ -1764,50 +1806,7 @@ __qla2x00_abort_all_cmds(struct qla_qpair *qp, int res)
req->outstanding_cmds[cnt] = NULL;
switch (sp->cmd_type) {
case TYPE_SRB:
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)) {
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);
qla2x00_abort_srb(qp, sp, res, &flags);
break;
case TYPE_TGT_CMD:
if (!vha->hw->tgt.tgt_ops || !tgt ||
@@ -3558,6 +3557,8 @@ qla2x00_delete_all_vps(struct qla_hw_data *ha, scsi_qla_host_t *base_vha)
spin_unlock_irqrestore(&ha->vport_slock, flags);
mutex_unlock(&ha->vport_lock);
qla_nvme_delete(vha);
fc_vport_terminate(vha->fc_vport);
scsi_host_put(vha->host);
@@ -4179,12 +4180,10 @@ fail_free_nvram:
kfree(ha->nvram);
ha->nvram = NULL;
fail_free_ctx_mempool:
if (ha->ctx_mempool)
mempool_destroy(ha->ctx_mempool);
mempool_destroy(ha->ctx_mempool);
ha->ctx_mempool = NULL;
fail_free_srb_mempool:
if (ha->srb_mempool)
mempool_destroy(ha->srb_mempool);
mempool_destroy(ha->srb_mempool);
ha->srb_mempool = NULL;
fail_free_gid_list:
dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
@@ -4486,8 +4485,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
dma_free_coherent(&ha->pdev->dev, MCTP_DUMP_SIZE, ha->mctp_dump,
ha->mctp_dump_dma);
if (ha->srb_mempool)
mempool_destroy(ha->srb_mempool);
mempool_destroy(ha->srb_mempool);
if (ha->dcbx_tlv)
dma_free_coherent(&ha->pdev->dev, DCBX_TLV_DATA_SIZE,
@@ -4519,8 +4517,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
if (ha->async_pd)
dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma);
if (ha->s_dma_pool)
dma_pool_destroy(ha->s_dma_pool);
dma_pool_destroy(ha->s_dma_pool);
if (ha->gid_list)
dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
@@ -4541,14 +4538,11 @@ qla2x00_mem_free(struct qla_hw_data *ha)
}
}
if (ha->dl_dma_pool)
dma_pool_destroy(ha->dl_dma_pool);
dma_pool_destroy(ha->dl_dma_pool);
if (ha->fcp_cmnd_dma_pool)
dma_pool_destroy(ha->fcp_cmnd_dma_pool);
dma_pool_destroy(ha->fcp_cmnd_dma_pool);
if (ha->ctx_mempool)
mempool_destroy(ha->ctx_mempool);
mempool_destroy(ha->ctx_mempool);
qlt_mem_free(ha);
@@ -7095,8 +7089,7 @@ qla2x00_module_exit(void)
qla2x00_release_firmware();
kmem_cache_destroy(srb_cachep);
qlt_exit();
if (ctx_cachep)
kmem_cache_destroy(ctx_cachep);
kmem_cache_destroy(ctx_cachep);
fc_release_transport(qla2xxx_transport_template);
fc_release_transport(qla2xxx_transport_vport_template);
}