Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156161
b: refs/heads/master
c: eb32bae
h: refs/heads/master
i:
  156159: dc27219
v: v3
  • Loading branch information
unsik Kim authored and Jens Axboe committed Jul 28, 2009
1 parent 6a8baee commit 2fffd81
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 48f5690d45b79ffeedc5ab24243b576056f1d2ff
refs/heads/master: eb32baec15c38ae6f06cb898a9f791578c5f8c79
10 changes: 10 additions & 0 deletions trunk/drivers/block/mg_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ static unsigned int mg_wait(struct mg_host *host, u32 expect, u32 msec)
host->error = MG_ERR_NONE;
expire = jiffies + msecs_to_jiffies(msec);

/* These 2 times dummy status read prevents reading invalid
* status. A very little time (3 times of mflash operating clk)
* is required for busy bit is set. Use dummy read instead of
* busy wait, because mflash's PLL is machine dependent.
*/
if (prv_data->use_polling) {
status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
}

status = inb((unsigned long)host->dev_base + MG_REG_STATUS);

do {
Expand Down

0 comments on commit 2fffd81

Please sign in to comment.