Skip to content

Commit

Permalink
mmc: rtsx_pci: Use the provided busy timeout from the mmc core
Browse files Browse the repository at this point in the history
The rtsx_pci driver is using a fixed 3s timeout for R1B responses, which
in some cases isn't suffient. For example, erase/discard requests may
require longer timeouts.

Instead of always using a fixed timeout, let's use the per request
calculated busy timeout from the mmc core.

Cc: Micky Ching <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Tested-by: Mauro Santos <[email protected]>
  • Loading branch information
storulf committed Jul 29, 2016
1 parent fa243f6 commit 27f4bf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/rtsx_pci_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ static void sd_send_cmd_get_rsp(struct realtek_pci_sdmmc *host,
stat_idx = sd_status_index(rsp_type);

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_pci_write_register(pcr, SD_BUS_STAT,
Expand Down

0 comments on commit 27f4bf7

Please sign in to comment.