Message ID | 1468241345-17980-1-git-send-email-l.majewski@samsung.com |
---|---|
State | Deferred |
Delegated to: | Łukasz Majewski |
Headers | show |
On Mon, Jul 11, 2016 at 02:49:03PM +0200, Lukasz Majewski wrote: > This change gives common prefix for SDHCI_READ_STATUS_TIMEOUT. > > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Hang on, didn't we just intentionally not CONFIG_ this option and not add it to Kconfig? If we're making these tunable they need to be in Kconfig and if needed, non-asked questions, ie: int SDHCI_READ_STATUS_TIMEOUT default 100 if FOO_PLATFORM default 500 if BAR_PLATFORM default 1000 Thanks!
Hi Tom, > On Mon, Jul 11, 2016 at 02:49:03PM +0200, Lukasz Majewski wrote: > > > This change gives common prefix for SDHCI_READ_STATUS_TIMEOUT. > > > > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> > > Hang on, didn't we just intentionally not CONFIG_ this option and not > add it to Kconfig? Apparently, I was not aware of such intentions :-). I do agree that we should add new options to Kconfig, so with second thoughts I think that this patch was not so good idea... > If we're making these tunable they need to be in > Kconfig and if needed, non-asked questions, ie: > int SDHCI_READ_STATUS_TIMEOUT > default 100 if FOO_PLATFORM > default 500 if BAR_PLATFORM > default 1000 > > Thanks! > BTW: I'm testing Jeahoon's patches for fixing this issue, so probably this patch series could be dropped.
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 604f18d..aa4cd4f 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -127,7 +127,7 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data, #define CONFIG_SDHCI_CMD_MAX_TIMEOUT 3200 #endif #define CONFIG_SDHCI_CMD_DEFAULT_TIMEOUT 100 -#define SDHCI_READ_STATUS_TIMEOUT 1000 +#define CONFIG_SDHCI_READ_STATUS_TIMEOUT 1000 static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data) @@ -244,9 +244,9 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd, if (stat & SDHCI_INT_ERROR) break; } while (((stat & mask) != mask) && - (get_timer(start) < SDHCI_READ_STATUS_TIMEOUT)); + (get_timer(start) < CONFIG_SDHCI_READ_STATUS_TIMEOUT)); - if (get_timer(start) >= SDHCI_READ_STATUS_TIMEOUT) { + if (get_timer(start) >= CONFIG_SDHCI_READ_STATUS_TIMEOUT) { if (host->quirks & SDHCI_QUIRK_BROKEN_R1B) return 0; else {
This change gives common prefix for SDHCI_READ_STATUS_TIMEOUT. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> --- drivers/mmc/sdhci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)