SCSI fixes on 20200430
Four minor fixes: three in drivers and one in the core. The core one allows an additional state change that fixes a regression introduced by an update to the aacraid driver in the previous merge window. Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com> -----BEGIN PGP SIGNATURE----- iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXquFjyYcamFtZXMuYm90 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishSooAQCdPJNC K9x3+/1APfHlbLSAE2yK+KRsIsEuJgczaSXOigD+Lk/vHuwBWJB/eO5lIaIKw+n5 Lggev6IimeCQb6mThG8= =133j -----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 minor fixes: three in drivers and one in the core. The core one allows an additional state change that fixes a regression introduced by an update to the aacraid driver in the previous merge window" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target/iblock: fix WRITE SAME zeroing scsi: qla2xxx: check UNLOADING before posting async work scsi: qla2xxx: set UNLOADING before waiting for session deletion scsi: core: Allow the state change from SDEV_QUIESCE to SDEV_BLOCK
This commit is contained in:
commit
cebcff3a1c
@ -3732,6 +3732,13 @@ qla2x00_remove_one(struct pci_dev *pdev)
|
|||||||
}
|
}
|
||||||
qla2x00_wait_for_hba_ready(base_vha);
|
qla2x00_wait_for_hba_ready(base_vha);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* if UNLOADING flag is already set, then continue unload,
|
||||||
|
* where it was set first.
|
||||||
|
*/
|
||||||
|
if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags))
|
||||||
|
return;
|
||||||
|
|
||||||
if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) ||
|
if (IS_QLA25XX(ha) || IS_QLA2031(ha) || IS_QLA27XX(ha) ||
|
||||||
IS_QLA28XX(ha)) {
|
IS_QLA28XX(ha)) {
|
||||||
if (ha->flags.fw_started)
|
if (ha->flags.fw_started)
|
||||||
@ -3750,15 +3757,6 @@ qla2x00_remove_one(struct pci_dev *pdev)
|
|||||||
|
|
||||||
qla2x00_wait_for_sess_deletion(base_vha);
|
qla2x00_wait_for_sess_deletion(base_vha);
|
||||||
|
|
||||||
/*
|
|
||||||
* if UNLOAD flag is already set, then continue unload,
|
|
||||||
* where it was set first.
|
|
||||||
*/
|
|
||||||
if (test_bit(UNLOADING, &base_vha->dpc_flags))
|
|
||||||
return;
|
|
||||||
|
|
||||||
set_bit(UNLOADING, &base_vha->dpc_flags);
|
|
||||||
|
|
||||||
qla_nvme_delete(base_vha);
|
qla_nvme_delete(base_vha);
|
||||||
|
|
||||||
dma_free_coherent(&ha->pdev->dev,
|
dma_free_coherent(&ha->pdev->dev,
|
||||||
@ -4864,6 +4862,9 @@ qla2x00_alloc_work(struct scsi_qla_host *vha, enum qla_work_type type)
|
|||||||
struct qla_work_evt *e;
|
struct qla_work_evt *e;
|
||||||
uint8_t bail;
|
uint8_t bail;
|
||||||
|
|
||||||
|
if (test_bit(UNLOADING, &vha->dpc_flags))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
QLA_VHA_MARK_BUSY(vha, bail);
|
QLA_VHA_MARK_BUSY(vha, bail);
|
||||||
if (bail)
|
if (bail)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -6628,13 +6629,6 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work)
|
|||||||
struct pci_dev *pdev = ha->pdev;
|
struct pci_dev *pdev = ha->pdev;
|
||||||
scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
|
scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
|
||||||
|
|
||||||
/*
|
|
||||||
* if UNLOAD flag is already set, then continue unload,
|
|
||||||
* where it was set first.
|
|
||||||
*/
|
|
||||||
if (test_bit(UNLOADING, &base_vha->dpc_flags))
|
|
||||||
return;
|
|
||||||
|
|
||||||
ql_log(ql_log_warn, base_vha, 0x015b,
|
ql_log(ql_log_warn, base_vha, 0x015b,
|
||||||
"Disabling adapter.\n");
|
"Disabling adapter.\n");
|
||||||
|
|
||||||
@ -6645,9 +6639,14 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qla2x00_wait_for_sess_deletion(base_vha);
|
/*
|
||||||
|
* if UNLOADING flag is already set, then continue unload,
|
||||||
|
* where it was set first.
|
||||||
|
*/
|
||||||
|
if (test_and_set_bit(UNLOADING, &base_vha->dpc_flags))
|
||||||
|
return;
|
||||||
|
|
||||||
set_bit(UNLOADING, &base_vha->dpc_flags);
|
qla2x00_wait_for_sess_deletion(base_vha);
|
||||||
|
|
||||||
qla2x00_delete_all_vps(ha, base_vha);
|
qla2x00_delete_all_vps(ha, base_vha);
|
||||||
|
|
||||||
|
@ -2284,6 +2284,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
|
|||||||
switch (oldstate) {
|
switch (oldstate) {
|
||||||
case SDEV_RUNNING:
|
case SDEV_RUNNING:
|
||||||
case SDEV_CREATED_BLOCK:
|
case SDEV_CREATED_BLOCK:
|
||||||
|
case SDEV_QUIESCE:
|
||||||
case SDEV_OFFLINE:
|
case SDEV_OFFLINE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -432,7 +432,7 @@ iblock_execute_zero_out(struct block_device *bdev, struct se_cmd *cmd)
|
|||||||
target_to_linux_sector(dev, cmd->t_task_lba),
|
target_to_linux_sector(dev, cmd->t_task_lba),
|
||||||
target_to_linux_sector(dev,
|
target_to_linux_sector(dev,
|
||||||
sbc_get_write_same_sectors(cmd)),
|
sbc_get_write_same_sectors(cmd)),
|
||||||
GFP_KERNEL, false);
|
GFP_KERNEL, BLKDEV_ZERO_NOUNMAP);
|
||||||
if (ret)
|
if (ret)
|
||||||
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
|
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user