mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
FROMLIST: ufs: introduce a callback to get info of command completion
Some SoC specific might need command history for various reasons, such as stacking command contexts in system memory to check for debugging in the future or scaling some DVFS knobs to boost IO throughput. What you would do with the information could be variant per SoC vendor. Bug: 163100341 Link: https://lore.kernel.org/linux-scsi/159530290480.22526.15318134249960762889.b4-ty@oracle.com/T/#t Change-Id: I39a30ff742d3a2eebb66decb651e4cf5b990c1eb Signed-off-by: Kiwoong Kim <kwmad.kim@samsung.com> Acked-by: Stanley Chu <stanley.chu@mediatek.com> Reviewed-by: Avri Altman <avri.altman@wdc.com>
This commit is contained in:
parent
54413c4243
commit
a417e45928
2 changed files with 9 additions and 0 deletions
|
|
@ -5103,6 +5103,7 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
|
|||
for_each_set_bit(index, &completed_reqs, hba->nutrs) {
|
||||
lrbp = &hba->lrb[index];
|
||||
cmd = lrbp->cmd;
|
||||
ufshcd_vops_compl_xfer_req(hba, index, (cmd) ? true : false);
|
||||
if (cmd) {
|
||||
ufshcd_add_command_trace(hba, index, "complete");
|
||||
result = ufshcd_transfer_rsp_status(hba, lrbp);
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ struct ufs_hba_variant_ops {
|
|||
struct ufs_pa_layer_attr *,
|
||||
struct ufs_pa_layer_attr *);
|
||||
void (*setup_xfer_req)(struct ufs_hba *, int, bool);
|
||||
void (*compl_xfer_req)(struct ufs_hba *hba, int tag, bool is_scsi);
|
||||
void (*setup_task_mgmt)(struct ufs_hba *, int, u8);
|
||||
void (*hibern8_notify)(struct ufs_hba *, enum uic_cmd_dme,
|
||||
enum ufs_notify_change_status);
|
||||
|
|
@ -1198,6 +1199,13 @@ static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
|
|||
return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
|
||||
}
|
||||
|
||||
static inline void ufshcd_vops_compl_xfer_req(struct ufs_hba *hba,
|
||||
int tag, bool is_scsi)
|
||||
{
|
||||
if (hba->vops && hba->vops->compl_xfer_req)
|
||||
hba->vops->compl_xfer_req(hba, tag, is_scsi);
|
||||
}
|
||||
|
||||
static inline void ufshcd_vops_setup_task_mgmt(struct ufs_hba *hba,
|
||||
int tag, u8 tm_function)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue