Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83342
b: refs/heads/master
c: b004223
h: refs/heads/master
v: v3
  • Loading branch information
Andrew Morton authored and Bartlomiej Zolnierkiewicz committed Feb 6, 2008
1 parent 8c3f67a commit 7d8b7c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 1dcfdf93f66375567ec563de74bbb8c295ac88df
refs/heads/master: b004223db7249d42db893df916457acecc22759c
9 changes: 6 additions & 3 deletions trunk/drivers/ide/legacy/hd.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,14 @@ static void bad_rw_intr(void)

static inline int wait_DRQ(void)
{
int retries = 100000, stat;
int retries;
int stat;

while (--retries > 0)
if ((stat = inb_p(HD_STATUS)) & DRQ_STAT)
for (retries = 0; retries < 100000; retries++) {
stat = inb_p(HD_STATUS);
if (stat & DRQ_STAT)
return 0;
}
dump_status("wait_DRQ", stat);
return -1;
}
Expand Down

0 comments on commit 7d8b7c4

Please sign in to comment.