Commit 3ec6551a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge home.transmeta.com:/home/torvalds/v2.5/dalecki

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 5191903e 72083826
......@@ -613,8 +613,8 @@ void help(void)
printf("READ d READ RAW w READ AUDIO A\n");
printf("MS-INFO M TOC T START S\n");
printf("SET EJECTSW X DEVICE D DEBUG Y\n");
printf("AUDIO_BUFSIZ Z RESET R BLKRASET B\n");
printf("SET VOLUME v GET VOLUME V\n");
printf("AUDIO_BUFSIZ Z RESET R SET VOLUME v\n");
printf("GET VOLUME V\n");
}
/*
......@@ -882,12 +882,6 @@ main(int argc, char *argv[])
rc=ioctl(drive,CDROMRESET);
if (rc<0) printf("CDROMRESET: rc=%d.\n",rc);
break;
case 'B': /* set the driver's (?) read ahead value */
printf("enter read-ahead size: ? ");
scanf("%d",&i);
rc=ioctl(drive,BLKRASET,i);
if (rc<0) printf("BLKRASET: rc=%d.\n",rc);
break;
#ifdef AZT_PRIVATE_IOCTLS /*not supported by every CDROM driver*/
case 'd':
printf("Address (min:sec:frm) ");
......
......@@ -760,10 +760,6 @@ static struct ioctl32_list ioctl32_handler_table[] = {
IOCTL32_HANDLER(BLKGETSIZE, w_long),
IOCTL32_DEFAULT(BLKFLSBUF),
IOCTL32_DEFAULT(BLKRASET),
IOCTL32_HANDLER(BLKRAGET, w_long),
IOCTL32_DEFAULT(BLKFRASET),
IOCTL32_HANDLER(BLKFRAGET, w_long),
IOCTL32_DEFAULT(BLKSECTSET),
IOCTL32_HANDLER(BLKSECTGET, w_long),
IOCTL32_DEFAULT(BLKSSZGET),
......
......@@ -3997,8 +3997,6 @@ COMPATIBLE_IOCTL(BLKROSET)
COMPATIBLE_IOCTL(BLKROGET)
COMPATIBLE_IOCTL(BLKRRPART)
COMPATIBLE_IOCTL(BLKFLSBUF)
COMPATIBLE_IOCTL(BLKRASET)
COMPATIBLE_IOCTL(BLKFRASET)
COMPATIBLE_IOCTL(BLKSECTSET)
COMPATIBLE_IOCTL(BLKSSZGET)
COMPATIBLE_IOCTL(BLKBSZGET)
......@@ -4626,10 +4624,8 @@ HANDLE_IOCTL(SIOCDELRT, routing_ioctl)
HANDLE_IOCTL(SIOCRTMSG, ret_einval)
HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo)
HANDLE_IOCTL(BLKRAGET, w_long)
HANDLE_IOCTL(BLKGETSIZE, w_long)
HANDLE_IOCTL(0x1260, broken_blkgetsize)
HANDLE_IOCTL(BLKFRAGET, w_long)
HANDLE_IOCTL(BLKSECTGET, w_long)
HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
......
......@@ -1208,15 +1208,6 @@ static int mfm_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long a
return -EFAULT;
return 0;
case BLKFRASET:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
max_readahead[major][minor] = arg;
return 0;
case BLKFRAGET:
return put_user(max_readahead[major][minor], (long *) arg);
case BLKSECTGET:
return put_user(max_sectors[major][minor], (long *) arg);
......@@ -1230,8 +1221,6 @@ static int mfm_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long a
case BLKFLSBUF:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKPG:
return blk_ioctl(dev, cmd, arg);
......@@ -1442,7 +1431,6 @@ int mfm_init (void)
hdc63463_irqpollmask = irqmask;
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB?) read ahread */
add_gendisk(&mfm_gendisk);
......
......@@ -1963,10 +1963,6 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
Controller->GenericDiskInfo.part = Controller->DiskPartitions;
Controller->GenericDiskInfo.sizes = Controller->PartitionSizes;
blksize_size[MajorNumber] = Controller->BlockSizes;
/*
Initialize Read Ahead to 128 sectors.
*/
read_ahead[MajorNumber] = 128;
/*
Complete initialization of the Generic Disk Information structure.
*/
......@@ -5399,8 +5395,6 @@ static int DAC960_IOCTL(Inode_T *Inode, File_T *File,
sizeof(DiskGeometry_T)) ? -EFAULT : 0);
case BLKGETSIZE:
case BLKGETSIZE64:
case BLKRAGET:
case BLKRASET:
case BLKFLSBUF:
case BLKBSZGET:
case BLKBSZSET:
......
......@@ -1785,7 +1785,6 @@ int acsi_init( void )
STramMask = ATARIHW_PRESENT(EXTD_DMA) ? 0x00000000 : 0xff000000;
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &acsi_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read-ahead */
add_gendisk(&acsi_gendisk);
#ifdef CONFIG_ATARI_SLM
......
......@@ -1573,8 +1573,6 @@ static int fd_ioctl(struct inode *inode, struct file *filp,
switch (cmd) {
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKFLSBUF:
return blk_ioctl(device, cmd, param);
}
......
......@@ -29,7 +29,7 @@
*/
#include <linux/errno.h>
#include <linux/fs.h> /* for BLKRASET, ... */
#include <linux/fs.h> /* for BLKROSET, ... */
#include <linux/sched.h> /* for capable() */
#include <linux/blk.h> /* for set_device_ro() */
#include <linux/blkpg.h>
......@@ -227,31 +227,6 @@ int blk_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg)
intval = (is_read_only(dev) != 0);
return put_user(intval, (int *)(arg));
case BLKRASET:
if(!capable(CAP_SYS_ADMIN))
return -EACCES;
if(arg > 0xff)
return -EINVAL;
read_ahead[major(dev)] = arg;
return 0;
case BLKRAGET:
if (!arg)
return -EINVAL;
return put_user(read_ahead[major(dev)], (long *) arg);
case BLKFRASET:
if (!capable(CAP_SYS_ADMIN))
return -EACCES;
if (!(iptr = max_readahead[major(dev)]))
return -EINVAL;
iptr[minor(dev)] = arg;
return 0;
case BLKFRAGET:
if (!(iptr = max_readahead[major(dev)]))
return -EINVAL;
return put_user(iptr[minor(dev)], (long *) arg);
case BLKSECTGET:
if ((q = blk_get_queue(dev)) == NULL)
return -EINVAL;
......
......@@ -468,8 +468,6 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
case BLKBSZGET:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKPG:
return blk_ioctl(inode->i_rdev, cmd, arg);
case CCISS_GETPCIINFO:
......@@ -2543,7 +2541,6 @@ static int __init cciss_init_one(struct pci_dev *pdev,
/* fill in the other Kernel structs */
blksize_size[MAJOR_NR+i] = hba[i]->blocksizes;
read_ahead[MAJOR_NR+i] = READ_AHEAD;
/* Fill in the gendisk data */
hba[i]->gendisk.major = MAJOR_NR + i;
......
......@@ -481,7 +481,6 @@ int __init cpqarray_init(void)
blk_queue_max_phys_segments(q, SG_MAX);
blksize_size[MAJOR_NR+i] = ida_blocksizes + (i*256);
read_ahead[MAJOR_NR+i] = READ_AHEAD;
ida_gendisk[i].major = MAJOR_NR + i;
ida_gendisk[i].major_name = "ida";
......@@ -1179,8 +1178,6 @@ static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
case BLKBSZGET:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKPG:
return blk_ioctl(inode->i_rdev, cmd, arg);
......
......@@ -3448,8 +3448,6 @@ static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
switch (cmd) {
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKFLSBUF:
return blk_ioctl(device, cmd, param);
}
......
......@@ -54,10 +54,6 @@ static kmem_cache_t *request_cachep;
*/
DECLARE_TASK_QUEUE(tq_disk);
/* This specifies how many sectors to read ahead on the disk. */
int read_ahead[MAX_BLKDEV];
/* blk_dev_struct is:
* request_queue
* *queue
......@@ -83,11 +79,6 @@ int * blk_size[MAX_BLKDEV];
*/
int * blksize_size[MAX_BLKDEV];
/*
* The following tunes the read-ahead algorithm in mm/filemap.c
*/
int * max_readahead[MAX_BLKDEV];
/*
* How many reqeusts do we allocate per queue,
* and how many do we "batch" on freeing them?
......@@ -1685,7 +1676,6 @@ int __init blk_dev_init(void)
dev->queue = NULL;
memset(ro_bits,0,sizeof(ro_bits));
memset(max_readahead, 0, sizeof(max_readahead));
total_ram = nr_free_pages() << (PAGE_SHIFT - 10);
......
......@@ -358,7 +358,6 @@ int pcd_init (void) /* preliminary initialisation */
}
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &pcd_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
for (i=0;i<PCD_UNITS;i++) pcd_blocksizes[i] = 1024;
blksize_size[MAJOR_NR] = pcd_blocksizes;
......
......@@ -397,7 +397,6 @@ int pd_init (void)
q = BLK_DEFAULT_QUEUE(MAJOR_NR);
blk_init_queue(q, DEVICE_REQUEST, &pd_lock);
blk_queue_max_sectors(q, cluster);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
pd_gendisk.major = major;
pd_gendisk.major_name = name;
......@@ -480,8 +479,6 @@ static int pd_ioctl(struct inode *inode,struct file *file,
case BLKGETSIZE64:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKFLSBUF:
case BLKPG:
return blk_ioctl(inode->i_rdev, cmd, arg);
......
......@@ -363,7 +363,6 @@ int pf_init (void) /* preliminary initialisation */
blk_init_queue(q, DEVICE_REQUEST, &pf_spin_lock);
blk_queue_max_phys_segments(q, cluster);
blk_queue_max_hw_segments(q, cluster);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
for (i=0;i<PF_UNITS;i++) pf_blocksizes[i] = 1024;
blksize_size[MAJOR_NR] = pf_blocksizes;
......@@ -433,8 +432,6 @@ static int pf_ioctl(struct inode *inode,struct file *file,
return put_user((u64)PF.capacity << 9,(u64 *)arg);
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKFLSBUF:
return blk_ioctl(inode->i_rdev, cmd, arg);
default:
......
......@@ -177,7 +177,6 @@ int __init ps2esdi_init(void)
}
/* set up some global information - indicating device specific info */
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &ps2esdi_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
/* some minor housekeeping - setup the global gendisk structure */
add_gendisk(&ps2esdi_gendisk);
......@@ -1108,8 +1107,6 @@ static int ps2esdi_ioctl(struct inode *inode,
case BLKGETSIZE64:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKFLSBUF:
case BLKBSZGET:
case BLKBSZSET:
......
......@@ -171,7 +171,6 @@ int __init xd_init (void)
}
devfs_handle = devfs_mk_dir (NULL, xd_gendisk.major_name, NULL);
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &xd_lock);
read_ahead[MAJOR_NR] = 8; /* 8 sector (4kB) read ahead */
add_gendisk(&xd_gendisk);
xd_geninit();
......@@ -355,8 +354,6 @@ static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg)
case BLKFLSBUF:
case BLKROSET:
case BLKROGET:
case BLKRASET:
case BLKRAGET:
case BLKPG:
return blk_ioctl(inode->i_rdev, cmd, arg);
......
......@@ -1927,7 +1927,6 @@ int __init aztcd_init(void)
}
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST, &aztSpin);
blksize_size[MAJOR_NR] = aztcd_blocksizes;
read_ahead[MAJOR_NR] = 4;
register_disk(NULL, mk_kdev(MAJOR_NR, 0), 1, &azt_fops, 0);
if ((azt_port == 0x1f0) || (azt_port == 0x170))
......
......@@ -3442,7 +3442,6 @@ int __init cdu31a_init(void)
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR),
DEVICE_REQUEST,
&cdu31a_lock);
read_ahead[MAJOR_NR] = CDU31A_READAHEAD;
cdu31a_block_size = 1024; /* 1kB default block size */
/* use 'mount -o block=2048' */
blksize_size[MAJOR_NR] = &cdu31a_block_size;
......
......@@ -1503,7 +1503,6 @@ int __init cm206_init(void)
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST,
&cm206_lock);
blksize_size[MAJOR_NR] = cm206_blocksizes;
read_ahead[MAJOR_NR] = 16; /* reads ahead what? */
init_bh(CM206_BH, cm206_bh);
memset(cd, 0, sizeof(*cd)); /* give'm some reasonable value */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment