Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270306
b: refs/heads/master
c: 2bf22b3
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley authored and Chris Ball committed Oct 27, 2011
1 parent bbe7670 commit 6c523fa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 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: b6ad726e3fe69e1ff3c3b2ad272ba3e4c376cd6a
refs/heads/master: 2bf22b39823c1d173dda31111a4eb2ce36daaf39
21 changes: 14 additions & 7 deletions trunk/drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,13 +1030,20 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
if (brq->data.blocks > card->host->max_blk_count)
brq->data.blocks = card->host->max_blk_count;

/*
* After a read error, we redo the request one sector at a time
* in order to accurately determine which sectors can be read
* successfully.
*/
if (disable_multi && brq->data.blocks > 1)
brq->data.blocks = 1;
if (brq->data.blocks > 1) {
/*
* After a read error, we redo the request one sector
* at a time in order to accurately determine which
* sectors can be read successfully.
*/
if (disable_multi)
brq->data.blocks = 1;

/* Some controllers can't do multiblock reads due to hw bugs */
if (card->host->caps2 & MMC_CAP2_NO_MULTI_READ &&
rq_data_dir(req) == READ)
brq->data.blocks = 1;
}

if (brq->data.blocks > 1 || do_rel_wr) {
/* SPI multiblock writes terminate using a special
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mmc/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ struct mmc_host {
#define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */
#define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */
#define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */
#define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */

mmc_pm_flag_t pm_caps; /* supported pm features */
unsigned int power_notify_type;
Expand Down

0 comments on commit 6c523fa

Please sign in to comment.