Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bbe67c78 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: sdhci: rate limit sdhci_dumpregs() prints"

parents 8933cba5 a65da33f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@

#define MAX_TUNING_LOOP 40

#define SDHCI_DBG_DUMP_RS_INTERVAL (10 * HZ)
#define SDHCI_DBG_DUMP_RS_BURST 2

static unsigned int debug_quirks = 0;
static unsigned int debug_quirks2;

@@ -2962,7 +2965,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
		} else {
			pr_msg = true;
		}
		if (pr_msg) {
		if (pr_msg && __ratelimit(&host->dbg_dump_rs)) {
			pr_err("%s: data txfr (0x%08x) error: %d after %lld ms\n",
			       mmc_hostname(host->mmc), intmask,
			       host->data->error, ktime_to_ms(ktime_sub(
@@ -3400,6 +3403,8 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev,

	spin_lock_init(&host->lock);
	mutex_init(&host->ios_mutex);
	ratelimit_state_init(&host->dbg_dump_rs, SDHCI_DBG_DUMP_RS_INTERVAL,
			SDHCI_DBG_DUMP_RS_BURST);

	return host;
}
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include <linux/io.h>
#include <linux/mmc/host.h>
#include <linux/pm_qos.h>
#include <linux/ratelimit.h>

struct sdhci_next {
	unsigned int sg_count;
@@ -276,6 +277,7 @@ struct sdhci_host {
	bool async_int_supp;  /* async support to rxv int, when clks are off */
	bool disable_sdio_irq_deferred; /* status of disabling sdio irq */
	u32 auto_cmd_err_sts;
	struct ratelimit_state dbg_dump_rs;
	unsigned long private[0] ____cacheline_aligned;
};
#endif /* LINUX_MMC_SDHCI_H */