MMC core:

- Limit retries when analyse of SDIO tuples fails
 
 MMC host:
  - sdhci: Fix linking err for sdhci-brcmstb
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmAdSuMXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCkvWg/+Ks9PCp4taJxGcmFSHh2gu2kK
 xVIcLLQG41XTZqlKZhkM2Lud3bQt/vOVnI10Gwq8xrbyMwNqAKRseGMIEBKd2yH8
 WifyKOt2H9O3QRIBufL4OID/9YPdsz+w7yz5wj5MxmXjezCvOAmQCqgqDd7FIp3Q
 IoHjsGcTxypJtzbFtcMCcwYc4bYlTIY/QLaiiYsv7s3ehHfoMXYkcfNgQQvSQtN4
 g6nOIAuN4MqRm5WtfGc9GKvZOjMLuWW2ae2MLDPNwLLKLDH2KCQgpSd0kdo5QmUE
 4SMvuOeAns6BnggbJUIlJBN6cI10iimU/HrZvZ3qncuTsudX/2d9GsYPF03EcPfj
 8Y8/M7Nq05Co9Xm2QMN5cFlmWRjwaxLnKA+iytij7KcVki9HmH3Qm+HdyTzN9k6l
 pLxgwu96EdBnx8bSIWDkYuDnBd65CvCedN1JgYIEP/zb5nqbv9n/3eDPGjgHv7MJ
 enEgczc/MrEXdj6Yhzdgb/dBiElUcO/OjqgAN6/eS82FbdCK476JrtYacsaA0KYs
 JLjP2fQJ+h+J32afVBoDCvaFSUek6wylyMT41HTQL+ZkewZjsSTDBjesXw+JqU77
 lFD+yL0TDPxBqegRFNEFg+blpA/vOw/eLU5tCvT1AQ9aiFHUA2sd7OizKT8XvdzW
 7b0NPTplBwa5B0NVAek=
 =ftQ/
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Limit retries when analyse of SDIO tuples fails

  MMC host:
   - sdhci: Fix linking err for sdhci-brcmstb"

* tag 'mmc-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-pltfm: Fix linking err for sdhci-brcmstb
  mmc: core: Limit retries when analyse of SDIO tuples fails
This commit is contained in:
Linus Torvalds 2021-02-05 09:53:11 -08:00
commit 2d8bdf5906
2 changed files with 12 additions and 1 deletions

View File

@ -20,6 +20,8 @@
#include "sdio_cis.h" #include "sdio_cis.h"
#include "sdio_ops.h" #include "sdio_ops.h"
#define SDIO_READ_CIS_TIMEOUT_MS (10 * 1000) /* 10s */
static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func, static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
const unsigned char *buf, unsigned size) const unsigned char *buf, unsigned size)
{ {
@ -274,6 +276,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
do { do {
unsigned char tpl_code, tpl_link; unsigned char tpl_code, tpl_link;
unsigned long timeout = jiffies +
msecs_to_jiffies(SDIO_READ_CIS_TIMEOUT_MS);
ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code); ret = mmc_io_rw_direct(card, 0, 0, ptr++, 0, &tpl_code);
if (ret) if (ret)
@ -326,6 +330,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
prev = &this->next; prev = &this->next;
if (ret == -ENOENT) { if (ret == -ENOENT) {
if (time_after(jiffies, timeout))
break;
/* warn about unknown tuples */ /* warn about unknown tuples */
pr_warn_ratelimited("%s: queuing unknown" pr_warn_ratelimited("%s: queuing unknown"
" CIS tuple 0x%02x (%u bytes)\n", " CIS tuple 0x%02x (%u bytes)\n",

View File

@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
return host->private; return host->private;
} }
extern const struct dev_pm_ops sdhci_pltfm_pmops;
#ifdef CONFIG_PM_SLEEP
int sdhci_pltfm_suspend(struct device *dev); int sdhci_pltfm_suspend(struct device *dev);
int sdhci_pltfm_resume(struct device *dev); int sdhci_pltfm_resume(struct device *dev);
extern const struct dev_pm_ops sdhci_pltfm_pmops; #else
static inline int sdhci_pltfm_suspend(struct device *dev) { return 0; }
static inline int sdhci_pltfm_resume(struct device *dev) { return 0; }
#endif
#endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */ #endif /* _DRIVERS_MMC_SDHCI_PLTFM_H */