summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-01-21 22:34:01 +0000
commit9e30c3705aed9fbec4c3304570e4d6e707856bcb (patch)
treeb19e6acb5a67af31a4e7742e05c2166dc3f1444c /drivers/block
parent72919904796333a20c6a5d5c380091b42e407aa9 (diff)
Merge with Linux 2.3.22.
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/md.c2
-rw-r--r--drivers/block/paride/pcd.c4
-rw-r--r--drivers/block/paride/pf.c4
-rw-r--r--drivers/block/paride/pg.c2
-rw-r--r--drivers/block/paride/pt.c12
5 files changed, 13 insertions, 11 deletions
diff --git a/drivers/block/md.c b/drivers/block/md.c
index 69ff1813b..684b47c1b 100644
--- a/drivers/block/md.c
+++ b/drivers/block/md.c
@@ -553,6 +553,8 @@ static int do_md_add (int minor, kdev_t dev)
a better idea, please help ! */
realdev->inode=get_empty_inode ();
+ if (!realdev->inode)
+ return -ENOMEM;
realdev->inode->i_dev=dev; /* don't care about other fields */
insert_inode_hash (realdev->inode);
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 13b5f1b6a..027517320 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -571,7 +571,7 @@ static int pcd_reset( int unit )
WR(0,6,0xa0 + 0x10*PCD.drive);
WR(0,7,8);
- pcd_sleep(2); /* delay a bit */
+ pcd_sleep(20*HZ/1000); /* delay a bit */
k = 0;
while ((k++ < PCD_RESET_TMO) && (RR(1,6)&IDE_BUSY))
@@ -609,7 +609,7 @@ static int pcd_ready_wait( int unit, int tmo )
if (!p) return 0;
if (!(((p & 0xffff) == 0x0402)||((p & 0xff) == 6))) return p;
k++;
- pcd_sleep(100);
+ pcd_sleep(HZ);
}
return 0x000020; /* timeout */
}
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index 58a747cb7..4dba8c8b5 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -666,11 +666,11 @@ static int pf_reset( int unit )
WR(0,6,DRIVE);
WR(0,7,8);
- pf_sleep(2);
+ pf_sleep(20*HZ/1000);
k = 0;
while ((k++ < PF_RESET_TMO) && (RR(1,6)&STAT_BUSY))
- pf_sleep(10);
+ pf_sleep(HZ/10);
flg = 1;
for(i=0;i<5;i++) flg &= (RR(0,i+1) == expect[i]);
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 89c83db65..42967b714 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -463,7 +463,7 @@ static int pg_reset( int unit )
WR(0,6,DRIVE);
WR(0,7,8);
- pg_sleep(2);
+ pg_sleep(20*HZ/1000);
k = 0;
while ((k++ < PG_RESET_TMO) && (RR(1,6)&STAT_BUSY))
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 2616319f7..81d5fe54b 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -498,7 +498,7 @@ static void pt_media_access_cmd( int unit, int tmo, char *cmd, char *fun)
return;
}
pi_disconnect(PI);
- pt_poll_dsc(unit,100,tmo,fun);
+ pt_poll_dsc(unit,HZ,tmo,fun);
}
static void pt_rewind( int unit )
@@ -526,11 +526,11 @@ static int pt_reset( int unit )
WR(0,6,DRIVE);
WR(0,7,8);
- pt_sleep(2);
+ pt_sleep(20*HZ/1000);
k = 0;
while ((k++ < PT_RESET_TMO) && (RR(1,6)&STAT_BUSY))
- pt_sleep(10);
+ pt_sleep(HZ/10);
flg = 1;
for(i=0;i<5;i++) flg &= (RR(0,i+1) == expect[i]);
@@ -559,7 +559,7 @@ static int pt_ready_wait( int unit, int tmo )
if (!p) return 0;
if (!(((p & 0xffff) == 0x0402)||((p & 0xff) == 6))) return p;
k++;
- pt_sleep(100);
+ pt_sleep(HZ);
}
return 0x000020; /* timeout */
}
@@ -809,7 +809,7 @@ static ssize_t pt_read(struct file * filp, char * buf,
while (count > 0) {
- if (!pt_poll_dsc(unit,1,PT_TMO,"read")) return -EIO;
+ if (!pt_poll_dsc(unit,HZ/100,PT_TMO,"read")) return -EIO;
n = count;
if (n > 32768) n = 32768; /* max per command */
@@ -895,7 +895,7 @@ static ssize_t pt_write(struct file * filp, const char * buf,
while (count > 0) {
- if (!pt_poll_dsc(unit,1,PT_TMO,"write")) return -EIO;
+ if (!pt_poll_dsc(unit,HZ/100,PT_TMO,"write")) return -EIO;
n = count;
if (n > 32768) n = 32768; /* max per command */