Skip to content

Commit 90d56a3

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "Five small and fairly minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V scsi: ufs: ufs-mediatek: Fix HCI version in some platforms scsi: qedf: Do not put host in qedf_vport_create() unconditionally scsi: lpfc: Fix failure to transmit ABTS on FC link scsi: target: core: Fix warning on realtime kernels
2 parents 20e41d9 + e57f5cd commit 90d56a3

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

drivers/scsi/lpfc/lpfc_sli.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20589,10 +20589,8 @@ lpfc_sli4_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
2058920589
abtswqe = &abtsiocb->wqe;
2059020590
memset(abtswqe, 0, sizeof(*abtswqe));
2059120591

20592-
if (lpfc_is_link_up(phba))
20592+
if (!lpfc_is_link_up(phba))
2059320593
bf_set(abort_cmd_ia, &abtswqe->abort_cmd, 1);
20594-
else
20595-
bf_set(abort_cmd_ia, &abtswqe->abort_cmd, 0);
2059620594
bf_set(abort_cmd_criteria, &abtswqe->abort_cmd, T_XRI_TAG);
2059720595
abtswqe->abort_cmd.rsrvd5 = 0;
2059820596
abtswqe->abort_cmd.wqe_com.abort_tag = xritag;

drivers/scsi/qedf/qedf_main.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,22 +1827,20 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
18271827
fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
18281828
QEDF_WARN(&(base_qedf->dbg_ctx), "Failed to create vport, "
18291829
"WWPN (0x%s) already exists.\n", buf);
1830-
goto err1;
1830+
return rc;
18311831
}
18321832

18331833
if (atomic_read(&base_qedf->link_state) != QEDF_LINK_UP) {
18341834
QEDF_WARN(&(base_qedf->dbg_ctx), "Cannot create vport "
18351835
"because link is not up.\n");
1836-
rc = -EIO;
1837-
goto err1;
1836+
return -EIO;
18381837
}
18391838

18401839
vn_port = libfc_vport_create(vport, sizeof(struct qedf_ctx));
18411840
if (!vn_port) {
18421841
QEDF_WARN(&(base_qedf->dbg_ctx), "Could not create lport "
18431842
"for vport.\n");
1844-
rc = -ENOMEM;
1845-
goto err1;
1843+
return -ENOMEM;
18461844
}
18471845

18481846
fcoe_wwn_to_str(vport->port_name, buf, sizeof(buf));
@@ -1866,7 +1864,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
18661864
if (rc) {
18671865
QEDF_ERR(&(base_qedf->dbg_ctx), "Could not allocate memory "
18681866
"for lport stats.\n");
1869-
goto err2;
1867+
goto err;
18701868
}
18711869

18721870
fc_set_wwnn(vn_port, vport->node_name);
@@ -1884,7 +1882,7 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
18841882
if (rc) {
18851883
QEDF_WARN(&base_qedf->dbg_ctx,
18861884
"Error adding Scsi_Host rc=0x%x.\n", rc);
1887-
goto err2;
1885+
goto err;
18881886
}
18891887

18901888
/* Set default dev_loss_tmo based on module parameter */
@@ -1925,9 +1923,10 @@ static int qedf_vport_create(struct fc_vport *vport, bool disabled)
19251923
vport_qedf->dbg_ctx.host_no = vn_port->host->host_no;
19261924
vport_qedf->dbg_ctx.pdev = base_qedf->pdev;
19271925

1928-
err2:
1926+
return 0;
1927+
1928+
err:
19291929
scsi_host_put(vn_port->host);
1930-
err1:
19311930
return rc;
19321931
}
19331932

@@ -1968,8 +1967,7 @@ static int qedf_vport_destroy(struct fc_vport *vport)
19681967
fc_lport_free_stats(vn_port);
19691968

19701969
/* Release Scsi_Host */
1971-
if (vn_port->host)
1972-
scsi_host_put(vn_port->host);
1970+
scsi_host_put(vn_port->host);
19731971

19741972
out:
19751973
return 0;

drivers/scsi/scsi_devinfo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ static struct {
184184
{"HP", "C3323-300", "4269", BLIST_NOTQ},
185185
{"HP", "C5713A", NULL, BLIST_NOREPORTLUN},
186186
{"HP", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2},
187+
{"HPE", "OPEN-", "*", BLIST_REPORTLUN2 | BLIST_TRY_VPD_PAGES},
187188
{"IBM", "AuSaV1S2", NULL, BLIST_FORCELUN},
188189
{"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
189190
{"IBM", "2105", NULL, BLIST_RETRY_HWERROR},

drivers/scsi/ufs/ufs-mediatek.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,11 +603,23 @@ static void ufs_mtk_get_controller_version(struct ufs_hba *hba)
603603

604604
ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_LOCALVERINFO), &ver);
605605
if (!ret) {
606-
if (ver >= UFS_UNIPRO_VER_1_8)
606+
if (ver >= UFS_UNIPRO_VER_1_8) {
607607
host->hw_ver.major = 3;
608+
/*
609+
* Fix HCI version for some platforms with
610+
* incorrect version
611+
*/
612+
if (hba->ufs_version < ufshci_version(3, 0))
613+
hba->ufs_version = ufshci_version(3, 0);
614+
}
608615
}
609616
}
610617

618+
static u32 ufs_mtk_get_ufs_hci_version(struct ufs_hba *hba)
619+
{
620+
return hba->ufs_version;
621+
}
622+
611623
/**
612624
* ufs_mtk_init - find other essential mmio bases
613625
* @hba: host controller instance
@@ -1048,6 +1060,7 @@ static void ufs_mtk_event_notify(struct ufs_hba *hba,
10481060
static const struct ufs_hba_variant_ops ufs_hba_mtk_vops = {
10491061
.name = "mediatek.ufshci",
10501062
.init = ufs_mtk_init,
1063+
.get_ufs_hci_version = ufs_mtk_get_ufs_hci_version,
10511064
.setup_clocks = ufs_mtk_setup_clocks,
10521065
.hce_enable_notify = ufs_mtk_hce_enable_notify,
10531066
.link_startup_notify = ufs_mtk_link_startup_notify,

drivers/target/target_core_transport.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,9 +3121,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
31213121
__releases(&cmd->t_state_lock)
31223122
__acquires(&cmd->t_state_lock)
31233123
{
3124-
3125-
assert_spin_locked(&cmd->t_state_lock);
3126-
WARN_ON_ONCE(!irqs_disabled());
3124+
lockdep_assert_held(&cmd->t_state_lock);
31273125

31283126
if (fabric_stop)
31293127
cmd->transport_state |= CMD_T_FABRIC_STOP;

0 commit comments

Comments
 (0)