From: Ulf Hansson Date: Wed, 2 May 2018 11:55:17 +0000 (+0200) Subject: mmc: rtsx_usb: Use the provided busy timeout from the mmc core X-Git-Tag: v4.18-rc1~137^2~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec30f11e821f2dcf707d0c66e01e87fbe8b91a66;p=thirdparty%2Flinux.git mmc: rtsx_usb: Use the provided busy timeout from the mmc core Instead of using a fixed 3s timeout for commands with R1B responses, convert to use the per request calculated busy timeout from the mmc core. This is needed to cope with requests that requires longer timeout, for example erase/discard commands. Signed-off-by: Ulf Hansson Tested-by: MichaƂ Pecio --- diff --git a/drivers/mmc/host/rtsx_usb_sdmmc.c b/drivers/mmc/host/rtsx_usb_sdmmc.c index f9faa98c54651..560614c5934ec 100644 --- a/drivers/mmc/host/rtsx_usb_sdmmc.c +++ b/drivers/mmc/host/rtsx_usb_sdmmc.c @@ -342,7 +342,7 @@ static void sd_send_cmd_get_rsp(struct rtsx_usb_sdmmc *host, } if (rsp_type == SD_RSP_TYPE_R1b) - timeout = 3000; + timeout = cmd->busy_timeout ? cmd->busy_timeout : 3000; if (cmd->opcode == SD_SWITCH_VOLTAGE) { err = rtsx_usb_write_register(ucr, SD_BUS_STAT,