Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8399
b: refs/heads/master
c: f6a2f34
h: refs/heads/master
i:
  8397: e9a8283
  8395: 9f5c474
  8391: d174abd
  8383: 6d6e7fb
v: v3
  • Loading branch information
Nishanth Aravamudan authored and Linus Torvalds committed Sep 10, 2005
1 parent cd88b76 commit 60a11a1
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 31a34571e5eed7cb1d70d5e7edd013261fe602e9
refs/heads/master: f6a2f3404a3b09281a264058fa8dd318bac51178
15 changes: 6 additions & 9 deletions trunk/drivers/block/xd.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <linux/wait.h>
#include <linux/blkdev.h>
#include <linux/blkpg.h>
#include <linux/delay.h>

#include <asm/system.h>
#include <asm/io.h>
Expand All @@ -62,7 +63,7 @@ static int xd[5] = { -1,-1,-1,-1, };

#define XD_DONT_USE_DMA 0 /* Initial value. may be overriden using
"nodma" module option */
#define XD_INIT_DISK_DELAY (30*HZ/1000) /* 30 ms delay during disk initialization */
#define XD_INIT_DISK_DELAY (30) /* 30 ms delay during disk initialization */

/* Above may need to be increased if a problem with the 2nd drive detection
(ST11M controller) or resetting a controller (WD) appears */
Expand Down Expand Up @@ -633,14 +634,12 @@ static u_char __init xd_initdrives (void (*init_drive)(u_char drive))
for (i = 0; i < XD_MAXDRIVES; i++) {
xd_build(cmdblk,CMD_TESTREADY,i,0,0,0,0,0);
if (!xd_command(cmdblk,PIO_MODE,NULL,NULL,NULL,XD_TIMEOUT*8)) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(XD_INIT_DISK_DELAY);
msleep_interruptible(XD_INIT_DISK_DELAY);

init_drive(count);
count++;

set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(XD_INIT_DISK_DELAY);
msleep_interruptible(XD_INIT_DISK_DELAY);
}
}
return (count);
Expand Down Expand Up @@ -761,8 +760,7 @@ static void __init xd_wd_init_controller (unsigned int address)

outb(0,XD_RESET); /* reset the controller */

set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(XD_INIT_DISK_DELAY);
msleep(XD_INIT_DISK_DELAY);
}

static void __init xd_wd_init_drive (u_char drive)
Expand Down Expand Up @@ -936,8 +934,7 @@ If you need non-standard settings use the xd=... command */
xd_maxsectors = 0x01;
outb(0,XD_RESET); /* reset the controller */

set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(XD_INIT_DISK_DELAY);
msleep(XD_INIT_DISK_DELAY);
}

static void __init xd_xebec_init_drive (u_char drive)
Expand Down

0 comments on commit 60a11a1

Please sign in to comment.