mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
mmc: dw_mmc-rockchip: fix tuning return incorrect value in certain situations
When V2 tuning returns an error, it is necessary to reset
the ret to 0, otherwise the incorrect value will be returned.
log:
[ 4.935664] mmc0: tuning execution failed: -5
Fixes: 795e052cc8 ("mmc: dw_mmc-rockchip: add v2 tuning support")
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I54a77e02255d88114191e8abc434856b34768715
This commit is contained in:
@@ -174,7 +174,7 @@ static int dw_mci_v2_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
}
|
||||
|
||||
if (i == ARRAY_SIZE(degrees)) {
|
||||
dev_warn(host->dev, "All phases bad!");
|
||||
dev_warn(host->dev, "V2 All phases bad!");
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -208,8 +208,7 @@ static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode)
|
||||
}
|
||||
|
||||
if (priv->use_v2_tuning) {
|
||||
ret = dw_mci_v2_execute_tuning(slot, opcode);
|
||||
if (!ret)
|
||||
if (!dw_mci_v2_execute_tuning(slot, opcode))
|
||||
return 0;
|
||||
/* Otherwise we continue using fine tuning */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user