mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
Merge branch '7.3/scsi-queue' into 7.3/scsi-fixes
Pull in outstanding fixes queued for 7.3. Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
commit
35131b1d29
|
|
@ -2216,7 +2216,7 @@ int nvfnic_add_tport(struct fnic *fnic, struct fnic_tport_s *tport,
|
|||
|
||||
int nvfnic_add_lport(struct fnic *fnic)
|
||||
{
|
||||
struct nvme_fc_port_info pinfo;
|
||||
struct nvme_fc_port_info pinfo = {};
|
||||
struct fnic_iport_s *iport = &fnic->iport;
|
||||
int ret = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1894,7 +1894,7 @@ static void ibmvfc_log_error(struct ibmvfc_event *evt)
|
|||
}
|
||||
|
||||
/**
|
||||
* ibmvfc_relogin - Log back into the specified device
|
||||
* ibmvfc_scsi_relogin - Log back into the specified device
|
||||
* @sdev: scsi device struct
|
||||
*
|
||||
**/
|
||||
|
|
@ -4987,6 +4987,7 @@ static void ibmvfc_tgt_query_target(struct ibmvfc_target *tgt)
|
|||
* ibmvfc_alloc_target - Allocate and initialize an ibmvfc target
|
||||
* @vhost: ibmvfc host struct
|
||||
* @target: Holds SCSI ID to allocate target forand the WWPN
|
||||
* @protocol: protocol of the target to allocate
|
||||
*
|
||||
* Returns:
|
||||
* 0 on success / other on failure
|
||||
|
|
|
|||
|
|
@ -1428,9 +1428,15 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
|
|||
}
|
||||
|
||||
port = sas_port_alloc_num(mr_sas_node->parent_dev);
|
||||
if (!port) {
|
||||
ioc_err(mrioc, "failure at %s:%d/%s()!\n",
|
||||
__FILE__, __LINE__, __func__);
|
||||
goto out_fail;
|
||||
}
|
||||
if ((sas_port_add(port))) {
|
||||
ioc_err(mrioc, "failure at %s:%d/%s()!\n",
|
||||
__FILE__, __LINE__, __func__);
|
||||
sas_port_free(port);
|
||||
goto out_fail;
|
||||
}
|
||||
|
||||
|
|
@ -1501,6 +1507,8 @@ static struct mpi3mr_sas_port *mpi3mr_sas_port_add(struct mpi3mr_ioc *mrioc,
|
|||
list_for_each_entry_safe(mr_sas_phy, next, &mr_sas_port->phy_list,
|
||||
port_siblings)
|
||||
list_del(&mr_sas_phy->port_siblings);
|
||||
if (tgtdev)
|
||||
mpi3mr_tgtdev_put(tgtdev);
|
||||
kfree(mr_sas_port);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1029,8 +1029,8 @@ static u32 pm8001_request_msix(struct pm8001_hba_info *pm8001_ha)
|
|||
&(pm8001_ha->irq_vector[i]));
|
||||
if (rc) {
|
||||
for (j = 0; j < i; j++) {
|
||||
free_irq(pci_irq_vector(pm8001_ha->pdev, i),
|
||||
&(pm8001_ha->irq_vector[i]));
|
||||
free_irq(pci_irq_vector(pm8001_ha->pdev, j),
|
||||
&pm8001_ha->irq_vector[j]);
|
||||
}
|
||||
pci_free_irq_vectors(pm8001_ha->pdev);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1533,8 +1533,10 @@ __iscsit_check_dataout_hdr(struct iscsit_conn *conn, void *buf,
|
|||
*/
|
||||
if (se_cmd->transport_state & CMD_T_ABORTED) {
|
||||
if (hdr->flags & ISCSI_FLAG_CMD_FINAL &&
|
||||
--cmd->outstanding_r2ts < 1)
|
||||
--cmd->outstanding_r2ts < 1) {
|
||||
iscsit_stop_dataout_timer(cmd);
|
||||
target_complete_cmd(se_cmd, SAM_STAT_TASK_ABORTED);
|
||||
}
|
||||
|
||||
return iscsit_dump_data_payload(conn, payload_length, 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -715,6 +715,7 @@ static void ufs_qcom_link_startup_post_change(struct ufs_hba *hba)
|
|||
static int ufs_qcom_link_startup_notify(struct ufs_hba *hba,
|
||||
enum ufs_notify_change_status status)
|
||||
{
|
||||
struct ufs_qcom_host *host = ufshcd_get_variant(hba);
|
||||
int err = 0;
|
||||
|
||||
switch (status) {
|
||||
|
|
@ -737,6 +738,14 @@ static int ufs_qcom_link_startup_notify(struct ufs_hba *hba,
|
|||
*/
|
||||
err = ufshcd_disable_host_tx_lcc(hba);
|
||||
|
||||
/*
|
||||
* Restore HS/LS link startup mode set by bootloader
|
||||
* after UFS reset clears REG_UFS_DEBUG_SPARE_CFG.
|
||||
*/
|
||||
if (host->hw_ver.major > 0x6 ||
|
||||
(host->hw_ver.major == 0x6 && host->hw_ver.minor >= 0x2))
|
||||
ufshcd_writel(hba, host->boot_spare_cfg,
|
||||
REG_UFS_DEBUG_SPARE_CFG);
|
||||
break;
|
||||
case POST_CHANGE:
|
||||
ufs_qcom_link_startup_post_change(hba);
|
||||
|
|
@ -1325,7 +1334,7 @@ static void ufs_qcom_advertise_quirks(struct ufs_hba *hba)
|
|||
static void ufs_qcom_set_phy_gear(struct ufs_qcom_host *host)
|
||||
{
|
||||
struct ufs_host_params *host_params = &host->host_params;
|
||||
u32 val, dev_major;
|
||||
u32 dev_major;
|
||||
|
||||
/*
|
||||
* Default to powering up the PHY to the max gear possible, which is
|
||||
|
|
@ -1344,8 +1353,8 @@ static void ufs_qcom_set_phy_gear(struct ufs_qcom_host *host)
|
|||
*/
|
||||
host->phy_gear = UFS_HS_G2;
|
||||
} else if (host->hw_ver.major >= 0x5) {
|
||||
val = ufshcd_readl(host->hba, REG_UFS_DEBUG_SPARE_CFG);
|
||||
dev_major = FIELD_GET(UFS_DEV_VER_MAJOR_MASK, val);
|
||||
host->boot_spare_cfg = ufshcd_readl(host->hba, REG_UFS_DEBUG_SPARE_CFG);
|
||||
dev_major = FIELD_GET(UFS_DEV_VER_MAJOR_MASK, host->boot_spare_cfg);
|
||||
|
||||
/*
|
||||
* Since the UFS device version is populated, let's remove the
|
||||
|
|
@ -2282,7 +2291,7 @@ static void ufs_qcom_config_scaling_param(struct ufs_hba *hba,
|
|||
p->polling_ms = 60;
|
||||
p->timer = DEVFREQ_TIMER_DELAYED;
|
||||
d->upthreshold = 70;
|
||||
d->downdifferential = 5;
|
||||
d->downdifferential = 65;
|
||||
|
||||
hba->clk_scaling.suspend_on_no_request = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -361,6 +361,7 @@ struct ufs_qcom_host {
|
|||
bool esi_enabled;
|
||||
|
||||
u32 saved_tx_eq_g1_setting;
|
||||
u32 boot_spare_cfg;
|
||||
};
|
||||
|
||||
struct ufs_qcom_drvdata {
|
||||
|
|
|
|||
|
|
@ -181,6 +181,25 @@ static int ufs_intel_lkf_pwr_change_notify(struct ufs_hba *hba,
|
|||
return err;
|
||||
}
|
||||
|
||||
static int ufs_intel_nvl_pwr_change_notify(struct ufs_hba *hba,
|
||||
enum ufs_notify_change_status stage,
|
||||
struct ufs_pa_layer_attr *dev_req_params)
|
||||
{
|
||||
int adapt_val;
|
||||
|
||||
if (stage != PRE_CHANGE || hba->ufs_version < ufshci_version(4, 0))
|
||||
return 0;
|
||||
|
||||
if (dev_req_params->pwr_tx == FAST_MODE || dev_req_params->pwr_tx == FASTAUTO_MODE)
|
||||
adapt_val = PA_INITIAL_ADAPT;
|
||||
else
|
||||
adapt_val = PA_NO_ADAPT;
|
||||
|
||||
ufshcd_dme_configure_adapt(hba, dev_req_params->gear_tx, adapt_val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ufs_intel_lkf_apply_dev_quirks(struct ufs_hba *hba)
|
||||
{
|
||||
u32 granularity, peer_granularity;
|
||||
|
|
@ -441,6 +460,43 @@ static int ufs_intel_mtl_init(struct ufs_hba *hba)
|
|||
return ufs_intel_common_init(hba);
|
||||
}
|
||||
|
||||
static int ufs_intel_mcq_config_resource(struct ufs_hba *hba)
|
||||
{
|
||||
hba->mcq_base = hba->mmio_base + ufshcd_mcq_queue_cfg_addr(hba);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* This Intel UFS4.0 controller maps MCQ doorbell and interrupt-status
|
||||
* registers into the same PCI BAR as the legacy HCI space, at this
|
||||
* fixed offset/stride.
|
||||
*/
|
||||
#define UFS_INTEL_SQDAO0 0x2800
|
||||
#define UFS_INTEL_SQISAO0 0x2814
|
||||
#define UFS_INTEL_CQDAO0 0x281C
|
||||
#define UFS_INTEL_CQISAO0 0x2824
|
||||
#define UFS_INTEL_MCQ_STRIDE 0x30
|
||||
|
||||
static int ufs_intel_op_runtime_config(struct ufs_hba *hba)
|
||||
{
|
||||
struct ufshcd_mcq_opr_info_t *opr;
|
||||
int i;
|
||||
|
||||
hba->mcq_opr[OPR_SQD].offset = UFS_INTEL_SQDAO0;
|
||||
hba->mcq_opr[OPR_SQIS].offset = UFS_INTEL_SQISAO0;
|
||||
hba->mcq_opr[OPR_CQD].offset = UFS_INTEL_CQDAO0;
|
||||
hba->mcq_opr[OPR_CQIS].offset = UFS_INTEL_CQISAO0;
|
||||
|
||||
for (i = 0; i < OPR_MAX; i++) {
|
||||
opr = &hba->mcq_opr[i];
|
||||
opr->stride = UFS_INTEL_MCQ_STRIDE;
|
||||
opr->base = hba->mmio_base + opr->offset;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ufs_qemu_get_hba_mac(struct ufs_hba *hba)
|
||||
{
|
||||
return MAX_SUPP_MAC;
|
||||
|
|
@ -527,6 +583,9 @@ static struct ufs_hba_variant_ops ufs_intel_mtl_hba_vops = {
|
|||
.exit = ufs_intel_common_exit,
|
||||
.hce_enable_notify = ufs_intel_hce_enable_notify,
|
||||
.link_startup_notify = ufs_intel_link_startup_notify,
|
||||
.pwr_change_notify = ufs_intel_nvl_pwr_change_notify,
|
||||
.mcq_config_resource = ufs_intel_mcq_config_resource,
|
||||
.op_runtime_config = ufs_intel_op_runtime_config,
|
||||
.resume = ufs_intel_resume,
|
||||
.device_reset = ufs_intel_device_reset,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user