patch-2.1.23 linux/drivers/block/ide.c
Next file: linux/drivers/block/loop.c
Previous file: linux/drivers/block/ide-tape.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Sun Jan 26 12:07:10 1997
- Orig file:
v2.1.22/linux/drivers/block/ide.c
- Orig date:
Mon Dec 30 15:39:04 1996
diff -u --recursive --new-file v2.1.22/linux/drivers/block/ide.c linux/drivers/block/ide.c
@@ -1,7 +1,7 @@
/*
- * linux/drivers/block/ide.c Version 6.00 Dec 4, 1996
+ * linux/drivers/block/ide.c Version 6.01 Jan 26, 1997
*
- * Copyright (C) 1994-1996 Linus Torvalds & authors (see below)
+ * Copyright (C) 1994-1997 Linus Torvalds & authors (see below)
*/
#define _IDE_C /* needed by <linux/blk.h> */
@@ -276,6 +276,8 @@
* fix bug in ide_error()
* fix bug in the first ide_get_lock() call for Atari
* don't flush leftover data for ATAPI devices
+ * Version 6.01 clear hwgroup->active while the hwgroup sleeps
+ * support HDIO_GETGEO for floppies
*
* Some additional driver compile-time options are in ide.h
*
@@ -1240,10 +1242,9 @@
sleep = jiffies + WAIT_MIN_SLEEP;
hwgroup->timer.expires = sleep;
add_timer(&hwgroup->timer);
- } else { /* Ugly, but how can we sleep for the lock otherwise? perhaps from tq_scheduler? */
+ } else /* Ugly, but how can we sleep for the lock otherwise? perhaps from tq_scheduler? */
ide_release_lock(&ide_lock);
- hwgroup->active = 0;
- }
+ hwgroup->active = 0;
}
/*
@@ -1876,7 +1877,7 @@
case HDIO_GETGEO:
{
struct hd_geometry *loc = (struct hd_geometry *) arg;
- if (!loc || drive->media != ide_disk) return -EINVAL;
+ if (!loc || (drive->media != ide_disk && drive->media != ide_floppy)) return -EINVAL;
if (put_user(drive->bios_head, (byte *) &loc->heads)) return -EFAULT;
if (put_user(drive->bios_sect, (byte *) &loc->sectors)) return -EFAULT;
if (put_user(drive->bios_cyl, (unsigned short *) &loc->cylinders)) return -EFAULT;
@@ -2817,7 +2818,7 @@
block_read, /* read - general block-dev read */
block_write, /* write - general block-dev write */
NULL, /* readdir - bad */
- NULL, /* select */
+ NULL, /* poll */
ide_ioctl, /* ioctl */
NULL, /* mmap */
ide_open, /* open */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov