Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142807
b: refs/heads/master
c: 9d9f25c
h: refs/heads/master
i:
  142805: 3258a73
  142803: 1843f18
  142799: b9b74f0
v: v3
  • Loading branch information
Wolfgang Muees authored and Pierre Ossman committed Apr 8, 2009
1 parent 179e517 commit 93bdd8c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00adadc12196c7b3e8923729e728162267e98ff7
refs/heads/master: 9d9f25c036dd584db175552a7d162403d3ab54b3
21 changes: 12 additions & 9 deletions trunk/drivers/mmc/core/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,15 +362,6 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
if (err)
goto err;

/*
* For SPI, enable CRC as appropriate.
*/
if (mmc_host_is_spi(host)) {
err = mmc_spi_set_crc(host, use_spi_crc);
if (err)
goto err;
}

/*
* Fetch CID from card.
*/
Expand Down Expand Up @@ -457,6 +448,18 @@ static int mmc_sd_init_card(struct mmc_host *host, u32 ocr,
goto free_card;
}

/*
* For SPI, enable CRC as appropriate.
* This CRC enable is located AFTER the reading of the
* card registers because some SDHC cards are not able
* to provide valid CRCs for non-512-byte blocks.
*/
if (mmc_host_is_spi(host)) {
err = mmc_spi_set_crc(host, use_spi_crc);
if (err)
goto free_card;
}

/*
* Attempt to change to high-speed (if supported)
*/
Expand Down

0 comments on commit 93bdd8c

Please sign in to comment.