Skip to content

Commit

Permalink
Merge branch 'fixes' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
storulf committed Feb 1, 2021
2 parents 3feb459 + d7fb9c2 commit fdb7ef5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions drivers/mmc/core/sdio_cis.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "sdio_cis.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,
const unsigned char *buf, unsigned size)
{
Expand Down Expand Up @@ -274,6 +276,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)

do {
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);
if (ret)
Expand Down Expand Up @@ -326,6 +330,8 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
prev = &this->next;

if (ret == -ENOENT) {
if (time_after(jiffies, timeout))
break;
/* warn about unknown tuples */
pr_warn_ratelimited("%s: queuing unknown"
" CIS tuple 0x%02x (%u bytes)\n",
Expand Down
7 changes: 6 additions & 1 deletion drivers/mmc/host/sdhci-pltfm.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,13 @@ static inline void *sdhci_pltfm_priv(struct sdhci_pltfm_host *host)
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_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 */

0 comments on commit fdb7ef5

Please sign in to comment.