Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  MMC: Do not set unsupported bits in OCR response
  MMC: Poll card status after rescanning cards
  • Loading branch information
Linus Torvalds committed Nov 13, 2006
2 parents 0f66c08 + 63ef731 commit 0579e30
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)
if (bit) {
bit -= 1;

ocr = 3 << bit;
ocr &= 3 << bit;

host->ios.vdd = bit;
mmc_set_ios(host);
Expand Down Expand Up @@ -1178,14 +1178,29 @@ static void mmc_rescan(void *data)
{
struct mmc_host *host = data;
struct list_head *l, *n;
unsigned char power_mode;

mmc_claim_host(host);

if (host->ios.power_mode == MMC_POWER_ON)
/*
* Check for removed cards and newly inserted ones. We check for
* removed cards first so we can intelligently re-select the VDD.
*/
power_mode = host->ios.power_mode;
if (power_mode == MMC_POWER_ON)
mmc_check_cards(host);

mmc_setup(host);

/*
* Some broken cards process CMD1 even in stand-by state. There is
* no reply, but an ILLEGAL_COMMAND error is cached and returned
* after next command. We poll for card status here to clear any
* possibly pending error.
*/
if (power_mode == MMC_POWER_ON)
mmc_check_cards(host);

if (!list_empty(&host->cards)) {
/*
* (Re-)calculate the fastest clock rate which the
Expand Down

0 comments on commit 0579e30

Please sign in to comment.