SCSI fixes on 20171017
Four mostly error leg fixes and one more important regression in a prior commit (the qla2xxx one). Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJZ5h/9AAoJEAVr7HOZEZN4moMQAKnW6fLBZ8gb5BiZa5+zFFwf OEYP70It4EW1+tINcL1mTYzXTP03sS08iKdDg8MsRSltShwpc7Hxch731wV1wIod VPvRt/0RIODaMPBEHBlYTBZUsXOZ494sVCzhH8oE5uB3yEZEBctd2klIMgBXFvIH GxQR9PMbY4cm9Ve9jsLsNLP/EFRNMrXOUG5Z9bCU+bOhiR67ic3lLfONqPZZKWHo WuZSdOW3wHozVTa4VNFTvHRE3xYXwG7QnTP5rbmFtV7Q026lwz5R2TLsuxbEhZZk jbxVpA/Hqu0apsaUFzxu4FS6E4jkUpRdv0wweotW5OQMxZaARLr8C9xvYim+mSAU JkA+ce+1GiUUFz7E+Empqzi2R8GjBu1y/OBbD5R5QKPR/2caRSUbMqmnppAgweXK nQlxtrbOvdgSeEHffB08VeQhKod9xEc/eE++yGTg2N+JhSratKs3Rx8VVj9dOMgP S4UmWTr/Vy5NJCLrkQ2GWM6fiXFjQnpymzzzGZKvRXSWqVuJHEG8PY4Bbj2Q2UfD 9xwIUAFu/uAQZ0Thy6KrMGs266V66P7fpKL40P2FCQtrAFQcqd1D50Ubv4qs3uyw jc0/mW4VIgggu78SR20XJp/MCiStzEYko8NhXZ6FadOzz3nprSrUtwx2fEqrDmFF 0iK0LBUJl4NjhVUPv2gn =3PVx -----END PGP SIGNATURE----- Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four mostly error leg fixes and one more important regression in a prior commit (the qla2xxx one)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fc: check for rport presence in fc_block_scsi_eh scsi: qla2xxx: Fix uninitialized work element scsi: libiscsi: fix shifting of DID_REQUEUE host byte scsi: libfc: fix a deadlock in fc_rport_work scsi: fixup kernel warning during rmmod()
This commit is contained in:
commit
ebe6e90ccc
5 changed files with 15 additions and 5 deletions
|
@ -383,11 +383,11 @@ static void fc_rport_work(struct work_struct *work)
|
|||
fc_rport_enter_flogi(rdata);
|
||||
mutex_unlock(&rdata->rp_mutex);
|
||||
} else {
|
||||
mutex_unlock(&rdata->rp_mutex);
|
||||
FC_RPORT_DBG(rdata, "work delete\n");
|
||||
mutex_lock(&lport->disc.disc_mutex);
|
||||
list_del_rcu(&rdata->peers);
|
||||
mutex_unlock(&lport->disc.disc_mutex);
|
||||
mutex_unlock(&rdata->rp_mutex);
|
||||
kref_put(&rdata->kref, fc_rport_destroy);
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -1728,7 +1728,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
|
|||
|
||||
if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
|
||||
reason = FAILURE_SESSION_IN_RECOVERY;
|
||||
sc->result = DID_REQUEUE;
|
||||
sc->result = DID_REQUEUE << 16;
|
||||
goto fault;
|
||||
}
|
||||
|
||||
|
|
|
@ -3175,6 +3175,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
host->can_queue, base_vha->req,
|
||||
base_vha->mgmt_svr_loop_id, host->sg_tablesize);
|
||||
|
||||
INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn);
|
||||
|
||||
if (ha->mqenable) {
|
||||
bool mq = false;
|
||||
bool startit = false;
|
||||
|
@ -3223,7 +3225,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
*/
|
||||
qla2xxx_wake_dpc(base_vha);
|
||||
|
||||
INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn);
|
||||
INIT_WORK(&ha->board_disable, qla2x00_disable_board_on_pci_error);
|
||||
|
||||
if (IS_QLA8031(ha) || IS_MCTP_CAPABLE(ha)) {
|
||||
|
|
|
@ -1376,13 +1376,19 @@ static void __scsi_remove_target(struct scsi_target *starget)
|
|||
spin_lock_irqsave(shost->host_lock, flags);
|
||||
restart:
|
||||
list_for_each_entry(sdev, &shost->__devices, siblings) {
|
||||
/*
|
||||
* We cannot call scsi_device_get() here, as
|
||||
* we might've been called from rmmod() causing
|
||||
* scsi_device_get() to fail the module_is_live()
|
||||
* check.
|
||||
*/
|
||||
if (sdev->channel != starget->channel ||
|
||||
sdev->id != starget->id ||
|
||||
scsi_device_get(sdev))
|
||||
!get_device(&sdev->sdev_gendev))
|
||||
continue;
|
||||
spin_unlock_irqrestore(shost->host_lock, flags);
|
||||
scsi_remove_device(sdev);
|
||||
scsi_device_put(sdev);
|
||||
put_device(&sdev->sdev_gendev);
|
||||
spin_lock_irqsave(shost->host_lock, flags);
|
||||
goto restart;
|
||||
}
|
||||
|
|
|
@ -3320,6 +3320,9 @@ int fc_block_scsi_eh(struct scsi_cmnd *cmnd)
|
|||
{
|
||||
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
|
||||
|
||||
if (WARN_ON_ONCE(!rport))
|
||||
return FAST_IO_FAIL;
|
||||
|
||||
return fc_block_rport(rport);
|
||||
}
|
||||
EXPORT_SYMBOL(fc_block_scsi_eh);
|
||||
|
|
Loading…
Reference in a new issue