Comment 39 for bug 1579748

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

That's unfortunate.

I found that sd_change_phase() and sd_set_timing() in rtsx_usb_sdmmc.c do not have rtsx_usb_get_rsp(), which can be found in rts5139 as rts51x_get_rsp().

That's all I got.

Here's the diff I use:

diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c
index 12d2fbe9c520..30cb98272158 100644
--- a/drivers/mmc/host/rtsx_usb_sdmmc.c
+++ b/drivers/mmc/host/rtsx_usb_sdmmc.c
@@ -616,7 +616,7 @@ static int sd_change_phase(struct rtsx_usb_sdmmc *host, u8 sample_point, int tx)
        if (err)
                return err;

- return 0;
+ return rtsx_usb_get_rsp(ucr, 1, 500);
 }

 static inline u32 get_phase_point(u32 phase_map, unsigned int idx)
@@ -1126,8 +1126,10 @@ static int sd_set_timing(struct rtsx_usb_sdmmc *host,
        }

        err = rtsx_usb_send_cmd(ucr, MODE_C, 100);
+ if (err)
+ return err;

- return err;
+ return rtsx_usb_get_rsp(ucr, 6, 1000);
 }

 static void sdmmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)