mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
Merge "scsi: ufs-qcom: Remove unnecessary devm_kfree"
This commit is contained in:
commit
1b86a92815
2 changed files with 42 additions and 19 deletions
|
|
@ -2314,7 +2314,6 @@ out_disable_vddp:
|
|||
out_phy_exit:
|
||||
phy_exit(host->generic_phy);
|
||||
out_variant_clear:
|
||||
devm_kfree(dev, host);
|
||||
ufshcd_set_variant(hba, NULL);
|
||||
out:
|
||||
return err;
|
||||
|
|
@ -2781,14 +2780,17 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
|
|||
|
||||
/* sleep a bit intermittently as we are dumping too much data */
|
||||
ufs_qcom_print_hw_debug_reg_all(hba, NULL, ufs_qcom_dump_regs_wrapper);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_testbus_read(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_print_unipro_testbus(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_print_utp_hci_testbus(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_phy_dbg_register_dump(phy);
|
||||
|
||||
if (in_task()) {
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_testbus_read(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_print_unipro_testbus(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_print_utp_hci_testbus(hba);
|
||||
usleep_range(1000, 1100);
|
||||
ufs_qcom_phy_dbg_register_dump(phy);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -450,8 +450,6 @@ static void ufshcd_print_host_regs(struct ufs_hba *hba)
|
|||
|
||||
ufshcd_print_clk_freqs(hba);
|
||||
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
|
||||
ufshcd_crypto_debug(hba);
|
||||
}
|
||||
|
||||
|
|
@ -1880,6 +1878,8 @@ static void ufshcd_init_clk_gating(struct ufs_hba *hba)
|
|||
if (!ufshcd_is_clkgating_allowed(hba))
|
||||
return;
|
||||
|
||||
hba->clk_gating.state = CLKS_ON;
|
||||
|
||||
hba->clk_gating.delay_ms = 150;
|
||||
INIT_DELAYED_WORK(&hba->clk_gating.gate_work, ufshcd_gate_work);
|
||||
INIT_WORK(&hba->clk_gating.ungate_work, ufshcd_ungate_work);
|
||||
|
|
@ -2568,7 +2568,8 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
|
|||
clear_bit_unlock(tag, &hba->lrb_in_use);
|
||||
goto out;
|
||||
}
|
||||
WARN_ON(hba->clk_gating.state != CLKS_ON);
|
||||
if (ufshcd_is_clkgating_allowed(hba))
|
||||
WARN_ON(hba->clk_gating.state != CLKS_ON);
|
||||
|
||||
lrbp = &hba->lrb[tag];
|
||||
|
||||
|
|
@ -3948,6 +3949,7 @@ out:
|
|||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
|
|
@ -4659,6 +4661,7 @@ out:
|
|||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -5015,8 +5018,10 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
|
|||
dev_err(hba->dev,
|
||||
"OCS error from controller = %x for tag %d\n",
|
||||
ocs, lrbp->task_tag);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
break;
|
||||
} /* end of switch */
|
||||
|
||||
|
|
@ -5731,6 +5736,11 @@ static void ufshcd_err_handler(struct work_struct *work)
|
|||
if (!ret)
|
||||
goto skip_err_handling;
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(hba->host->host_lock, flags);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
spin_lock_irqsave(hba->host->host_lock, flags);
|
||||
|
||||
if ((hba->saved_err & INT_FATAL_ERRORS) ||
|
||||
(hba->saved_err & UFSHCD_UIC_HIBERN8_MASK) ||
|
||||
((hba->saved_err & UIC_ERROR) &&
|
||||
|
|
@ -5978,8 +5988,9 @@ static irqreturn_t ufshcd_check_errors(struct ufs_hba *hba)
|
|||
__func__, hba->saved_err,
|
||||
hba->saved_uic_err);
|
||||
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_tmrs(hba, hba->outstanding_tasks);
|
||||
ufshcd_print_trs(hba, hba->outstanding_reqs,
|
||||
pr_prdt);
|
||||
|
|
@ -6556,10 +6567,11 @@ static int ufshcd_abort(struct scsi_cmnd *cmd)
|
|||
scsi_print_command(hba->lrb[tag].cmd);
|
||||
if (!hba->req_abort_count) {
|
||||
ufshcd_update_reg_hist(&hba->ufs_stats.task_abort, 0);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_trs(hba, 1 << tag, true);
|
||||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_pwr_info(hba);
|
||||
ufshcd_print_trs(hba, 1 << tag, true);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
} else {
|
||||
ufshcd_print_trs(hba, 1 << tag, false);
|
||||
}
|
||||
|
|
@ -8436,8 +8448,11 @@ disable_clks:
|
|||
/* If link is active, device ref_clk can't be switched off */
|
||||
__ufshcd_setup_clocks(hba, false, true);
|
||||
|
||||
hba->clk_gating.state = CLKS_OFF;
|
||||
trace_ufshcd_clk_gating(dev_name(hba->dev), hba->clk_gating.state);
|
||||
if (ufshcd_is_clkgating_allowed(hba)) {
|
||||
hba->clk_gating.state = CLKS_OFF;
|
||||
trace_ufshcd_clk_gating(dev_name(hba->dev),
|
||||
hba->clk_gating.state);
|
||||
}
|
||||
|
||||
/* Put the host controller in low power mode if possible */
|
||||
ufshcd_hba_vreg_set_lpm(hba);
|
||||
|
|
@ -8575,6 +8590,11 @@ disable_irq_and_vops_clks:
|
|||
if (hba->clk_scaling.is_allowed)
|
||||
ufshcd_suspend_clkscaling(hba);
|
||||
ufshcd_setup_clocks(hba, false);
|
||||
if (ufshcd_is_clkgating_allowed(hba)) {
|
||||
hba->clk_gating.state = CLKS_OFF;
|
||||
trace_ufshcd_clk_gating(dev_name(hba->dev),
|
||||
hba->clk_gating.state);
|
||||
}
|
||||
out:
|
||||
hba->pm_op_in_progress = 0;
|
||||
if (ret)
|
||||
|
|
@ -8993,8 +9013,9 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
|
|||
err = ufshcd_hba_enable(hba);
|
||||
if (err) {
|
||||
dev_err(hba->dev, "Host controller enable failed\n");
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_print_host_state(hba);
|
||||
ufshcd_print_host_regs(hba);
|
||||
ufshcd_vops_dbg_register_dump(hba);
|
||||
goto out_remove_scsi_host;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue