Commit de0e0ad9 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.4.0-test2pre7

parent eea87ac9
This diff is collapsed.
...@@ -1533,3 +1533,38 @@ Work sponsored by SGI ...@@ -1533,3 +1533,38 @@ Work sponsored by SGI
- Updated Documentation/filesystems/devfs/README - Updated Documentation/filesystems/devfs/README
- Updated sample modules.conf - Updated sample modules.conf
===============================================================================
Changes for patch v168
Work sponsored by SGI
- Disabled multi-mount capability (use VFS bindings instead)
- Updated README from master HTML file
===============================================================================
Changes for patch v169
Work sponsored by SGI
- Removed multi-mount code
- Removed compatibility macros: VFS has changed too much
===============================================================================
Changes for patch v170
Work sponsored by SGI
- Updated README from master HTML file
- Merged devfs inode into devfs entry
===============================================================================
Changes for patch v171
Work sponsored by SGI
- Updated sample modules.conf
- Removed dead code in <devfs_register> which used to call
<free_dentries>
- Ported to kernel 2.4.0-test2-pre3
...@@ -3,7 +3,7 @@ Devfs (Device File System) FAQ ...@@ -3,7 +3,7 @@ Devfs (Device File System) FAQ
Linux Devfs (Device File System) FAQ Linux Devfs (Device File System) FAQ
Richard Gooch Richard Gooch
1-MAY-2000 14-JUN-2000
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
...@@ -797,13 +797,15 @@ which must exist *before* init starts. Once again, you need to ...@@ -797,13 +797,15 @@ which must exist *before* init starts. Once again, you need to
mount devfs and then create the named pipe *before* init mount devfs and then create the named pipe *before* init
starts. starts.
The default behaviour now is not to mount devfs onto /dev at boot time. The default behaviour now is not to mount devfs onto /dev at boot time
You can correct this with the "devfs=mount" boot option. This solves for 2.3.x and later kernels. You can correct this with the
any problems with init, and also prevents the dreaded: "devfs=mount" boot option. This solves any problems with init,
and also prevents the dreaded:
Cannot open initial console Cannot open initial console
message. message. For 2.2.x kernels where you need to apply the devfs patch,
the default is to mount.
If you have automatic mounting of devfs onto /dev then you may need to If you have automatic mounting of devfs onto /dev then you may need to
create /dev/initctl in your boot scripts. The following lines should create /dev/initctl in your boot scripts. The following lines should
...@@ -1460,9 +1462,19 @@ Other resources ...@@ -1460,9 +1462,19 @@ Other resources
Douglas Gilbert has written a useful document at Douglas Gilbert has written a useful document at
http://www.torque.net/sg/devfs_scsi.html which http://www.torque.net/sg/devfs_scsi.html which
explores the SCSI subsystem and how it interacts with devfs. explores the SCSI subsystem and how it interacts with devfs
Douglas Gilbert has written another useful document at
http://www.torque.net/scsi/scsihosts.html which
discusses the scsihosts= boot option
Douglas Gilbert has written yet another useful document at
http://www.torque.net/scsi/linux_scsi_24 which
discusses the Linux SCSI subsystem in 2.4.
# Sample entries for /etc/modules.conf for devfs # Sample entries for /etc/modules.conf for devfs
############################################################################### ###############################################################################
# Configuration section: change to suit # Configuration section: change to suit your hardware
# #
alias /dev/sound sb alias /dev/sound sb
alias /dev/v4l bttv alias /dev/v4l bttv
......
This diff is collapsed.
This diff is collapsed.
...@@ -36,8 +36,6 @@ fi ...@@ -36,8 +36,6 @@ fi
dep_tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA $CONFIG_PCI dep_tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA $CONFIG_PCI
dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI dep_tristate 'Mylex DAC960/DAC1100 PCI RAID Controller support' CONFIG_BLK_DEV_DAC960 $CONFIG_PCI
comment 'Additional Block Devices'
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET dep_tristate 'Network block device support' CONFIG_BLK_DEV_NBD $CONFIG_NET
...@@ -49,14 +47,16 @@ fi ...@@ -49,14 +47,16 @@ fi
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
dep_tristate ' Linear (append) mode' CONFIG_MD_LINEAR $CONFIG_BLK_DEV_MD dep_tristate ' Linear (append) mode' CONFIG_MD_LINEAR $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-0 (striping) mode' CONFIG_MD_RAID0 $CONFIG_BLK_DEV_MD dep_tristate ' RAID-0 (striping) mode' CONFIG_MD_RAID0 $CONFIG_BLK_DEV_MD
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD
bool ' RAID-1/RAID-5 code (DANGEROUS)' CONFIG_RAID15_DANGEROUS dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
if [ "$CONFIG_RAID15_DANGEROUS" = "y" ]; then if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_RAID0" = "y" -o "$CONFIG_MD_RAID1" = "y" -o "$CONFIG_MD_RAID5" = "y" ]; then
dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_RAID1 $CONFIG_BLK_DEV_MD bool ' Boot support' CONFIG_MD_BOOT
dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD bool ' Auto Detect support' CONFIG_AUTODETECT_RAID
fi
fi fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
if [ "$CONFIG_BLK_DEV_RAM" = "y" -o "$CONFIG_BLK_DEV_RAM" = "m" ]; then
int ' Default RAM disk size' CONFIG_BLK_DEV_RAM_SIZE 4096
fi
dep_bool ' Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM dep_bool ' Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
endmenu endmenu
...@@ -148,7 +148,7 @@ static int linear_make_request (request_queue_t *q, mddev_t *mddev, ...@@ -148,7 +148,7 @@ static int linear_make_request (request_queue_t *q, mddev_t *mddev,
return -1; return -1;
} }
bh->b_rdev = tmp_dev->dev; bh->b_rdev = tmp_dev->dev;
bh->b_rsector = (block - tmp_dev->offset) << 1; bh->b_rsector = ((block - tmp_dev->offset) << 1) + (bh->b_rsector & 1);
return 1; return 1;
} }
...@@ -183,17 +183,11 @@ static int linear_status (char *page, mddev_t *mddev) ...@@ -183,17 +183,11 @@ static int linear_status (char *page, mddev_t *mddev)
static mdk_personality_t linear_personality= static mdk_personality_t linear_personality=
{ {
"linear", name: "linear",
linear_make_request, make_request: linear_make_request,
NULL, run: linear_run,
linear_run, stop: linear_stop,
linear_stop, status: linear_status,
linear_status,
0,
NULL,
NULL,
NULL,
NULL
}; };
#ifndef MODULE #ifndef MODULE
......
...@@ -238,7 +238,8 @@ static int lo_read_actor(read_descriptor_t * desc, struct page *page, unsigned l ...@@ -238,7 +238,8 @@ static int lo_read_actor(read_descriptor_t * desc, struct page *page, unsigned l
kaddr = (char*)kmap(page); kaddr = (char*)kmap(page);
if ((lo->transfer)(lo,READ,kaddr+offset,p->data,size,IV)) { if ((lo->transfer)(lo,READ,kaddr+offset,p->data,size,IV)) {
size = 0; size = 0;
printk(KERN_ERR "loop: transfer error block %ld\n",page->index); printk(KERN_ERR "loop: transfer error block %ld\n",
page->index);
desc->error = -EINVAL; desc->error = -EINVAL;
} }
kunmap(page); kunmap(page);
...@@ -345,9 +346,11 @@ static void do_lo_request(request_queue_t * q) ...@@ -345,9 +346,11 @@ static void do_lo_request(request_queue_t * q)
} }
} }
if ((lo->transfer)(lo, current_request->cmd, bh->b_data + offset, if ((lo->transfer)(lo, current_request->cmd,
bh->b_data + offset,
dest_addr, size, block)) { dest_addr, size, block)) {
printk(KERN_ERR "loop: transfer error block %d\n", block); printk(KERN_ERR "loop: transfer error block %d\n",
block);
brelse(bh); brelse(bh);
goto error_out_lock; goto error_out_lock;
} }
...@@ -469,7 +472,7 @@ static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg) ...@@ -469,7 +472,7 @@ static int loop_set_fd(struct loop_device *lo, kdev_t dev, unsigned int arg)
lo->lo_backing_file->f_owner = file->f_owner; lo->lo_backing_file->f_owner = file->f_owner;
lo->lo_backing_file->f_dentry = file->f_dentry; lo->lo_backing_file->f_dentry = file->f_dentry;
lo->lo_backing_file->f_vfsmnt = mntget(file->f_vfsmnt); lo->lo_backing_file->f_vfsmnt = mntget(file->f_vfsmnt);
lo->lo_backing_file->f_op = file->f_op; lo->lo_backing_file->f_op = fops_get(file->f_op);
lo->lo_backing_file->private_data = file->private_data; lo->lo_backing_file->private_data = file->private_data;
file_moveto(lo->lo_backing_file, file); file_moveto(lo->lo_backing_file, file);
...@@ -539,8 +542,10 @@ static int loop_clr_fd(struct loop_device *lo, kdev_t dev) ...@@ -539,8 +542,10 @@ static int loop_clr_fd(struct loop_device *lo, kdev_t dev)
lo->lo_dentry = NULL; lo->lo_dentry = NULL;
if (lo->lo_backing_file != NULL) { if (lo->lo_backing_file != NULL) {
put_write_access(lo->lo_backing_file->f_dentry->d_inode); struct file *filp = lo->lo_backing_file;
fput(lo->lo_backing_file); if ((filp->f_mode & FMODE_WRITE) == 0)
put_write_access(filp->f_dentry->d_inode);
fput(filp);
lo->lo_backing_file = NULL; lo->lo_backing_file = NULL;
} else { } else {
dput(dentry); dput(dentry);
...@@ -636,7 +641,8 @@ static int lo_ioctl(struct inode * inode, struct file * file, ...@@ -636,7 +641,8 @@ static int lo_ioctl(struct inode * inode, struct file * file,
if (!inode) if (!inode)
return -EINVAL; return -EINVAL;
if (MAJOR(inode->i_rdev) != MAJOR_NR) { if (MAJOR(inode->i_rdev) != MAJOR_NR) {
printk(KERN_WARNING "lo_ioctl: pseudo-major != %d\n", MAJOR_NR); printk(KERN_WARNING "lo_ioctl: pseudo-major != %d\n",
MAJOR_NR);
return -ENODEV; return -ENODEV;
} }
dev = MINOR(inode->i_rdev); dev = MINOR(inode->i_rdev);
...@@ -698,7 +704,8 @@ static int lo_release(struct inode *inode, struct file *file) ...@@ -698,7 +704,8 @@ static int lo_release(struct inode *inode, struct file *file)
if (!inode) if (!inode)
return 0; return 0;
if (MAJOR(inode->i_rdev) != MAJOR_NR) { if (MAJOR(inode->i_rdev) != MAJOR_NR) {
printk(KERN_WARNING "lo_release: pseudo-major != %d\n", MAJOR_NR); printk(KERN_WARNING "lo_release: pseudo-major != %d\n",
MAJOR_NR);
return 0; return 0;
} }
dev = MINOR(inode->i_rdev); dev = MINOR(inode->i_rdev);
...@@ -706,7 +713,8 @@ static int lo_release(struct inode *inode, struct file *file) ...@@ -706,7 +713,8 @@ static int lo_release(struct inode *inode, struct file *file)
return 0; return 0;
lo = &loop_dev[dev]; lo = &loop_dev[dev];
if (lo->lo_refcnt <= 0) if (lo->lo_refcnt <= 0)
printk(KERN_ERR "lo_release: refcount(%d) <= 0\n", lo->lo_refcnt); printk(KERN_ERR "lo_release: refcount(%d) <= 0\n",
lo->lo_refcnt);
else { else {
int type = lo->lo_encrypt_type; int type = lo->lo_encrypt_type;
--lo->lo_refcnt; --lo->lo_refcnt;
...@@ -761,6 +769,10 @@ int loop_unregister_transfer(int number) ...@@ -761,6 +769,10 @@ int loop_unregister_transfer(int number)
EXPORT_SYMBOL(loop_register_transfer); EXPORT_SYMBOL(loop_register_transfer);
EXPORT_SYMBOL(loop_unregister_transfer); EXPORT_SYMBOL(loop_unregister_transfer);
static void no_plug_device(request_queue_t *q, kdev_t device)
{
}
int __init loop_init(void) int __init loop_init(void)
{ {
int i; int i;
...@@ -806,6 +818,7 @@ int __init loop_init(void) ...@@ -806,6 +818,7 @@ int __init loop_init(void)
} }
blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST); blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), DEVICE_REQUEST);
blk_queue_pluggable(BLK_DEFAULT_QUEUE(MAJOR_NR), no_plug_device);
blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0); blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
for (i=0; i < max_loop; i++) { for (i=0; i < max_loop; i++) {
memset(&loop_dev[i], 0, sizeof(struct loop_device)); memset(&loop_dev[i], 0, sizeof(struct loop_device));
...@@ -828,6 +841,7 @@ void cleanup_module(void) ...@@ -828,6 +841,7 @@ void cleanup_module(void)
if (devfs_unregister_blkdev(MAJOR_NR, "loop") != 0) if (devfs_unregister_blkdev(MAJOR_NR, "loop") != 0)
printk(KERN_WARNING "loop: cannot unregister blkdev\n"); printk(KERN_WARNING "loop: cannot unregister blkdev\n");
blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR));
kfree (loop_dev); kfree (loop_dev);
kfree (loop_sizes); kfree (loop_sizes);
kfree (loop_blksizes); kfree (loop_blksizes);
......
This diff is collapsed.
...@@ -325,17 +325,11 @@ static int raid0_status (char *page, mddev_t *mddev) ...@@ -325,17 +325,11 @@ static int raid0_status (char *page, mddev_t *mddev)
static mdk_personality_t raid0_personality= static mdk_personality_t raid0_personality=
{ {
"raid0", name: "raid0",
raid0_make_request, make_request: raid0_make_request,
NULL, /* no special end_request */ run: raid0_run,
raid0_run, stop: raid0_stop,
raid0_stop, status: raid0_status,
raid0_status,
0,
NULL, /* no error_handler */
NULL, /* no diskop */
NULL, /* no stop resync */
NULL /* no restart resync */
}; };
#ifndef MODULE #ifndef MODULE
......
This diff is collapsed.
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
*/ */
#include <linux/config.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/locks.h> #include <linux/locks.h>
#include <linux/malloc.h> #include <linux/malloc.h>
...@@ -41,16 +42,19 @@ static mdk_personality_t raid5_personality; ...@@ -41,16 +42,19 @@ static mdk_personality_t raid5_personality;
*/ */
#define RAID5_DEBUG 0 #define RAID5_DEBUG 0
#define RAID5_PARANOIA 1 #define RAID5_PARANOIA 1
#define CHECK_DEVLOCK() if (!spin_is_locked(&conf->device_lock)) BUG() #if RAID5_PARANOIA && CONFIG_SMP
#define CHECK_SHLOCK(sh) if (!stripe_locked(sh)) BUG() # define CHECK_DEVLOCK() if (!spin_is_locked(&conf->device_lock)) BUG()
# define CHECK_SHLOCK(sh) if (!stripe_locked(sh)) BUG()
#else
# define CHECK_DEVLOCK()
# define CHECK_SHLOCK(unused)
#endif
#if RAID5_DEBUG #if RAID5_DEBUG
#define PRINTK(x...) printk(x) #define PRINTK(x...) printk(x)
#define inline #define inline
#define __inline__ #define __inline__
#else #else
#define inline
#define __inline__
#define PRINTK(x...) do { } while (0) #define PRINTK(x...) do { } while (0)
#endif #endif
...@@ -570,7 +574,7 @@ static void raid5_end_buffer_io (struct stripe_head *sh, int i, int uptodate) ...@@ -570,7 +574,7 @@ static void raid5_end_buffer_io (struct stripe_head *sh, int i, int uptodate)
{ {
struct buffer_head *bh = sh->bh_new[i]; struct buffer_head *bh = sh->bh_new[i];
PRINTK("raid5_end_buffer_io %lu, uptodate: %d.\n", bh->b_rsector, uptodate); PRINTK("raid5_end_buffer_io %lu, uptodate: %d.\n", bh->b_blocknr, uptodate);
sh->bh_new[i] = NULL; sh->bh_new[i] = NULL;
raid5_free_bh(sh, sh->bh_req[i]); raid5_free_bh(sh, sh->bh_req[i]);
sh->bh_req[i] = NULL; sh->bh_req[i] = NULL;
...@@ -578,7 +582,9 @@ static void raid5_end_buffer_io (struct stripe_head *sh, int i, int uptodate) ...@@ -578,7 +582,9 @@ static void raid5_end_buffer_io (struct stripe_head *sh, int i, int uptodate)
bh->b_end_io(bh, uptodate); bh->b_end_io(bh, uptodate);
if (!uptodate) if (!uptodate)
printk(KERN_ALERT "raid5: %s: unrecoverable I/O error for " printk(KERN_ALERT "raid5: %s: unrecoverable I/O error for "
"block %lu\n", partition_name(bh->b_dev), bh->b_blocknr); "block %lu\n",
partition_name(mddev_to_kdev(sh->raid_conf->mddev)),
bh->b_blocknr);
} }
static inline void raid5_mark_buffer_uptodate (struct buffer_head *bh, int uptodate) static inline void raid5_mark_buffer_uptodate (struct buffer_head *bh, int uptodate)
...@@ -600,14 +606,14 @@ static void raid5_end_request (struct buffer_head * bh, int uptodate) ...@@ -600,14 +606,14 @@ static void raid5_end_request (struct buffer_head * bh, int uptodate)
md_spin_lock_irqsave(&sh->stripe_lock, flags); md_spin_lock_irqsave(&sh->stripe_lock, flags);
raid5_mark_buffer_uptodate(bh, uptodate); raid5_mark_buffer_uptodate(bh, uptodate);
if (!uptodate) if (!uptodate)
md_error(bh->b_dev, bh->b_rdev); md_error(mddev_to_kdev(conf->mddev), bh->b_dev);
if (conf->failed_disks) { if (conf->failed_disks) {
for (i = 0; i < disks; i++) { for (i = 0; i < disks; i++) {
if (conf->disks[i].operational) if (conf->disks[i].operational)
continue; continue;
if (bh != sh->bh_old[i] && bh != sh->bh_req[i] && bh != sh->bh_copy[i]) if (bh != sh->bh_old[i] && bh != sh->bh_req[i] && bh != sh->bh_copy[i])
continue; continue;
if (bh->b_rdev != conf->disks[i].dev) if (bh->b_dev != conf->disks[i].dev)
continue; continue;
set_bit(STRIPE_ERROR, &sh->state); set_bit(STRIPE_ERROR, &sh->state);
} }
...@@ -623,10 +629,8 @@ static void raid5_end_request (struct buffer_head * bh, int uptodate) ...@@ -623,10 +629,8 @@ static void raid5_end_request (struct buffer_head * bh, int uptodate)
static void raid5_build_block (struct stripe_head *sh, struct buffer_head *bh, int i) static void raid5_build_block (struct stripe_head *sh, struct buffer_head *bh, int i)
{ {
raid5_conf_t *conf = sh->raid_conf; raid5_conf_t *conf = sh->raid_conf;
mddev_t *mddev = conf->mddev;
char *b_data; char *b_data;
struct page *b_page; struct page *b_page;
kdev_t dev = mddev_to_kdev(mddev);
int block = sh->sector / (sh->size >> 9); int block = sh->sector / (sh->size >> 9);
b_data = bh->b_data; b_data = bh->b_data;
...@@ -634,7 +638,7 @@ static void raid5_build_block (struct stripe_head *sh, struct buffer_head *bh, i ...@@ -634,7 +638,7 @@ static void raid5_build_block (struct stripe_head *sh, struct buffer_head *bh, i
memset (bh, 0, sizeof (struct buffer_head)); memset (bh, 0, sizeof (struct buffer_head));
init_waitqueue_head(&bh->b_wait); init_waitqueue_head(&bh->b_wait);
init_buffer(bh, raid5_end_request, sh); init_buffer(bh, raid5_end_request, sh);
bh->b_dev = dev; bh->b_dev = conf->disks[i].dev;
bh->b_blocknr = block; bh->b_blocknr = block;
bh->b_data = b_data; bh->b_data = b_data;
...@@ -770,15 +774,6 @@ static unsigned long raid5_compute_sector(int r_sector, unsigned int raid_disks, ...@@ -770,15 +774,6 @@ static unsigned long raid5_compute_sector(int r_sector, unsigned int raid_disks,
* Finally, compute the new sector number * Finally, compute the new sector number
*/ */
new_sector = stripe * sectors_per_chunk + chunk_offset; new_sector = stripe * sectors_per_chunk + chunk_offset;
#if 0
if ( *dd_idx > data_disks || *pd_idx > data_disks ||
chunk_offset + bh->b_size / 512 > sectors_per_chunk )
printk ("raid5: bug: dd_idx == %d, pd_idx == %d, chunk_offset == %d\n",
*dd_idx, *pd_idx, chunk_offset);
#endif
return new_sector; return new_sector;
} }
...@@ -849,9 +844,8 @@ static void compute_block(struct stripe_head *sh, int dd_idx) ...@@ -849,9 +844,8 @@ static void compute_block(struct stripe_head *sh, int dd_idx)
count = 1; count = 1;
} }
} }
if(count != 1) { if (count != 1)
xor_block(count, &bh_ptr[0]); xor_block(count, &bh_ptr[0]);
}
raid5_mark_buffer_uptodate(sh->bh_old[dd_idx], 1); raid5_mark_buffer_uptodate(sh->bh_old[dd_idx], 1);
} }
...@@ -1092,20 +1086,20 @@ static void handle_stripe_write (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1092,20 +1086,20 @@ static void handle_stripe_write (mddev_t *mddev , raid5_conf_t *conf,
if (!operational[i] && !conf->resync_parity) { if (!operational[i] && !conf->resync_parity) {
PRINTK("writing spare %d\n", i); PRINTK("writing spare %d\n", i);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
bh->b_rdev = conf->spare->dev; bh->b_dev = bh->b_rdev = conf->spare->dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, WRITERAW, bh); generic_make_request(q, WRITERAW, bh);
} else { } else {
#if 0 #if 0
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
bh->b_rdev = conf->disks[i].dev; bh->b_dev = bh->b_rdev = conf->disks[i].dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, WRITERAW, bh); generic_make_request(q, WRITERAW, bh);
#else #else
if (!allclean || (i==sh->pd_idx)) { if (!allclean || (i==sh->pd_idx)) {
PRINTK("writing dirty %d\n", i); PRINTK("writing dirty %d\n", i);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
bh->b_rdev = conf->disks[i].dev; bh->b_dev = bh->b_rdev = conf->disks[i].dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, WRITERAW, bh); generic_make_request(q, WRITERAW, bh);
} else { } else {
...@@ -1151,7 +1145,7 @@ static void handle_stripe_write (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1151,7 +1145,7 @@ static void handle_stripe_write (mddev_t *mddev , raid5_conf_t *conf,
continue; continue;
lock_get_bh(sh->bh_old[i]); lock_get_bh(sh->bh_old[i]);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
sh->bh_old[i]->b_rdev = conf->disks[i].dev; sh->bh_old[i]->b_dev = sh->bh_old[i]->b_rdev = conf->disks[i].dev;
q = blk_get_queue(sh->bh_old[i]->b_rdev); q = blk_get_queue(sh->bh_old[i]->b_rdev);
generic_make_request(q, READ, sh->bh_old[i]); generic_make_request(q, READ, sh->bh_old[i]);
atomic_dec(&sh->bh_old[i]->b_count); atomic_dec(&sh->bh_old[i]->b_count);
...@@ -1198,7 +1192,7 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1198,7 +1192,7 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf,
raid5_build_block(sh, sh->bh_old[i], i); raid5_build_block(sh, sh->bh_old[i], i);
lock_get_bh(sh->bh_old[i]); lock_get_bh(sh->bh_old[i]);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
sh->bh_old[i]->b_rdev = conf->disks[i].dev; sh->bh_old[i]->b_dev = sh->bh_old[i]->b_rdev = conf->disks[i].dev;
q = blk_get_queue(sh->bh_old[i]->b_rdev); q = blk_get_queue(sh->bh_old[i]->b_rdev);
generic_make_request(q, READ, sh->bh_old[i]); generic_make_request(q, READ, sh->bh_old[i]);
atomic_dec(&sh->bh_old[i]->b_count); atomic_dec(&sh->bh_old[i]->b_count);
...@@ -1228,7 +1222,7 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1228,7 +1222,7 @@ static void handle_stripe_read (mddev_t *mddev , raid5_conf_t *conf,
#endif #endif
lock_get_bh(sh->bh_req[i]); lock_get_bh(sh->bh_req[i]);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
sh->bh_req[i]->b_rdev = conf->disks[i].dev; sh->bh_req[i]->b_dev = sh->bh_req[i]->b_rdev = conf->disks[i].dev;
q = blk_get_queue(sh->bh_req[i]->b_rdev); q = blk_get_queue(sh->bh_req[i]->b_rdev);
generic_make_request(q, READ, sh->bh_req[i]); generic_make_request(q, READ, sh->bh_req[i]);
atomic_dec(&sh->bh_req[i]->b_count); atomic_dec(&sh->bh_req[i]->b_count);
...@@ -1252,8 +1246,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1252,8 +1246,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf,
* in bh_old * in bh_old
*/ */
PRINTK("handle_stripe_sync: sec=%lu disks=%d nr_cache=%d\n", sh->sector, disks, nr_cache); PRINTK("handle_stripe_sync: sec=%lu disks=%d nr_cache=%d\n", sh->sector, disks, nr_cache);
if (nr_cache < disks-1 if ((nr_cache < disks-1) || ((nr_cache == disks-1) && !(parity_failed+nr_failed_other+nr_failed_overwrite))
|| (nr_cache==disks-1 && !(parity_failed+nr_failed_other+nr_failed_overwrite))
) { ) {
sh->phase = PHASE_READ_OLD; sh->phase = PHASE_READ_OLD;
for (i = 0; i < disks; i++) { for (i = 0; i < disks; i++) {
...@@ -1267,7 +1260,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1267,7 +1260,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf,
raid5_build_block(sh, bh, i); raid5_build_block(sh, bh, i);
lock_get_bh(bh); lock_get_bh(bh);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
bh->b_rdev = conf->disks[i].dev; bh->b_dev = bh->b_rdev = conf->disks[i].dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, READ, bh); generic_make_request(q, READ, bh);
drive_stat_acct(bh->b_rdev, READ, -bh->b_size/512, 0); drive_stat_acct(bh->b_rdev, READ, -bh->b_size/512, 0);
...@@ -1297,7 +1290,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1297,7 +1290,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf,
} }
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
lock_get_bh(bh); lock_get_bh(bh);
bh->b_rdev = conf->spare->dev; bh->b_dev = bh->b_rdev = conf->spare->dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, WRITERAW, bh); generic_make_request(q, WRITERAW, bh);
drive_stat_acct(bh->b_rdev, WRITE, -bh->b_size/512, 0); drive_stat_acct(bh->b_rdev, WRITE, -bh->b_size/512, 0);
...@@ -1324,7 +1317,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf, ...@@ -1324,7 +1317,7 @@ static void handle_stripe_sync (mddev_t *mddev , raid5_conf_t *conf,
atomic_set_buffer_dirty(bh); atomic_set_buffer_dirty(bh);
lock_get_bh(bh); lock_get_bh(bh);
atomic_inc(&sh->nr_pending); atomic_inc(&sh->nr_pending);
bh->b_rdev = conf->disks[pd_idx].dev; bh->b_dev = bh->b_rdev = conf->disks[pd_idx].dev;
q = blk_get_queue(bh->b_rdev); q = blk_get_queue(bh->b_rdev);
generic_make_request(q, WRITERAW, bh); generic_make_request(q, WRITERAW, bh);
drive_stat_acct(bh->b_rdev, WRITE, -bh->b_size/512, 0); drive_stat_acct(bh->b_rdev, WRITE, -bh->b_size/512, 0);
...@@ -1508,7 +1501,7 @@ static int raid5_make_request (request_queue_t *q, mddev_t *mddev, int rw, struc ...@@ -1508,7 +1501,7 @@ static int raid5_make_request (request_queue_t *q, mddev_t *mddev, int rw, struc
if (rw == READA) if (rw == READA)
rw = READ; rw = READ;
new_sector = raid5_compute_sector(bh->b_blocknr*(bh->b_size>>9), new_sector = raid5_compute_sector(bh->b_rsector,
raid_disks, data_disks, &dd_idx, &pd_idx, conf); raid_disks, data_disks, &dd_idx, &pd_idx, conf);
PRINTK("raid5_make_request, sector %lu\n", new_sector); PRINTK("raid5_make_request, sector %lu\n", new_sector);
...@@ -1571,9 +1564,8 @@ static int raid5_sync_request (mddev_t *mddev, unsigned long block_nr) ...@@ -1571,9 +1564,8 @@ static int raid5_sync_request (mddev_t *mddev, unsigned long block_nr)
redone = block_nr% (bufsize>>10); redone = block_nr% (bufsize>>10);
block_nr -= redone; block_nr -= redone;
sh = get_lock_stripe(conf, block_nr<<1, bufsize); sh = get_lock_stripe(conf, block_nr<<1, bufsize);
first_sector = raid5_compute_sector(stripe*data_disks*sectors_per_chunk+chunk_offset, first_sector = raid5_compute_sector(stripe*data_disks*sectors_per_chunk
raid_disks, data_disks, + chunk_offset, raid_disks, data_disks, &dd_idx, &pd_idx, conf);
&dd_idx, &pd_idx, conf);
sh->pd_idx = pd_idx; sh->pd_idx = pd_idx;
sh->cmd = STRIPE_SYNC; sh->cmd = STRIPE_SYNC;
sh->phase = PHASE_BEGIN; sh->phase = PHASE_BEGIN;
...@@ -2380,18 +2372,16 @@ static int raid5_diskop(mddev_t *mddev, mdp_disk_t **d, int state) ...@@ -2380,18 +2372,16 @@ static int raid5_diskop(mddev_t *mddev, mdp_disk_t **d, int state)
static mdk_personality_t raid5_personality= static mdk_personality_t raid5_personality=
{ {
"raid5", name: "raid5",
raid5_make_request, make_request: raid5_make_request,
raid5_end_request, run: raid5_run,
raid5_run, stop: raid5_stop,
raid5_stop, status: raid5_status,
raid5_status, error_handler: raid5_error,
0, diskop: raid5_diskop,
raid5_error, stop_resync: raid5_stop_resync,
raid5_diskop, restart_resync: raid5_restart_resync,
raid5_stop_resync, sync_request: raid5_sync_request
raid5_restart_resync,
raid5_sync_request
}; };
int raid5_init (void) int raid5_init (void)
......
...@@ -693,6 +693,9 @@ static void __init rd_load_image(kdev_t device, int offset, int unit) ...@@ -693,6 +693,9 @@ static void __init rd_load_image(kdev_t device, int offset, int unit)
iput(inode); iput(inode);
} }
#ifdef CONFIG_MAC_FLOPPY
int swim3_fd_eject(int devnum);
#endif
static void __init rd_load_disk(int n) static void __init rd_load_disk(int n)
{ {
...@@ -713,6 +716,12 @@ static void __init rd_load_disk(int n) ...@@ -713,6 +716,12 @@ static void __init rd_load_disk(int n)
if (rd_prompt) { if (rd_prompt) {
#ifdef CONFIG_BLK_DEV_FD #ifdef CONFIG_BLK_DEV_FD
floppy_eject(); floppy_eject();
#endif
#ifdef CONFIG_MAC_FLOPPY
if(MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
swim3_fd_eject(MINOR(ROOT_DEV));
else if(MAJOR(real_root_dev) == FLOPPY_MAJOR)
swim3_fd_eject(MINOR(real_root_dev));
#endif #endif
printk(KERN_NOTICE printk(KERN_NOTICE
"VFS: Insert root floppy disk to be loaded into RAM disk and press ENTER\n"); "VFS: Insert root floppy disk to be loaded into RAM disk and press ENTER\n");
......
...@@ -1814,7 +1814,7 @@ static inline void pick_fastest_function(void) ...@@ -1814,7 +1814,7 @@ static inline void pick_fastest_function(void)
fastest = f; fastest = f;
} }
#ifdef CONFIG_X86_XMM #ifdef CONFIG_X86_XMM
if (boot_cpu_data.mmu_cr4_features & X86_CR4_OSXMMEXCPT) { if (cpu_has_xmm) {
fastest = &t_xor_block_pIII_kni; fastest = &t_xor_block_pIII_kni;
} }
#endif #endif
...@@ -1849,7 +1849,7 @@ void calibrate_xor_block(void) ...@@ -1849,7 +1849,7 @@ void calibrate_xor_block(void)
#endif #endif
#ifdef CONFIG_X86_XMM #ifdef CONFIG_X86_XMM
if (boot_cpu_data.mmu_cr4_features & X86_CR4_OSXMMEXCPT) { if (cpu_has_xmm) {
printk(KERN_INFO printk(KERN_INFO
"raid5: KNI detected, trying cache-avoiding KNI checksum routine\n"); "raid5: KNI detected, trying cache-avoiding KNI checksum routine\n");
/* we force the use of the KNI xor block because it /* we force the use of the KNI xor block because it
...@@ -1892,4 +1892,3 @@ void calibrate_xor_block(void) ...@@ -1892,4 +1892,3 @@ void calibrate_xor_block(void)
#endif /* __sparc_v9__ */ #endif /* __sparc_v9__ */
MD_EXPORT_SYMBOL(xor_block); MD_EXPORT_SYMBOL(xor_block);
...@@ -110,8 +110,7 @@ void busmouse_add_movementbuttons(int mousedev, int dx, int dy, int buttons) ...@@ -110,8 +110,7 @@ void busmouse_add_movementbuttons(int mousedev, int dx, int dy, int buttons)
if (changed) { if (changed) {
wake_up(&mse->wait); wake_up(&mse->wait);
if (mse->fasyncptr) kill_fasync(&mse->fasyncptr, SIGIO, POLL_IN);
kill_fasync(mse->fasyncptr, SIGIO, POLL_IN);
} }
} }
......
...@@ -39,6 +39,17 @@ else ...@@ -39,6 +39,17 @@ else
endif endif
endif endif
ifeq ($(CONFIG_DRM_FFB),y)
OX_OBJS += ffb_drv.o
O_OBJS += ffb_context.o
else
ifeq ($(CONFIG_DRM_FFB),m)
MIX_OBJC += ffb_drv.o
MI_OBJS += ffb_context.o
M_OBJS += ffb.o
endif
endif
O_OBJS += $(L_OBJS) O_OBJS += $(L_OBJS)
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
...@@ -48,3 +59,6 @@ gamma.o : gamma_drv.o gamma_dma.o $(L_OBJS) ...@@ -48,3 +59,6 @@ gamma.o : gamma_drv.o gamma_dma.o $(L_OBJS)
tdfx.o: tdfx_drv.o tdfx_context.o $(L_OBJS) tdfx.o: tdfx_drv.o tdfx_context.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o $(L_OBJS) $(LD) $(LD_RFLAG) -r -o $@ tdfx_drv.o tdfx_context.o $(L_OBJS)
ffb.o: ffb_drv.o ffb_context.o $(L_OBJS)
$(LD) $(LD_RFLAG) -r -o $@ ffb_drv.o ffb_context.o $(L_OBJS)
...@@ -72,11 +72,13 @@ int drm_addmap(struct inode *inode, struct file *filp, unsigned int cmd, ...@@ -72,11 +72,13 @@ int drm_addmap(struct inode *inode, struct file *filp, unsigned int cmd,
switch (map->type) { switch (map->type) {
case _DRM_REGISTERS: case _DRM_REGISTERS:
case _DRM_FRAME_BUFFER: case _DRM_FRAME_BUFFER:
#ifndef __sparc__
if (map->offset + map->size < map->offset if (map->offset + map->size < map->offset
|| map->offset < virt_to_phys(high_memory)) { || map->offset < virt_to_phys(high_memory)) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS); drm_free(map, sizeof(*map), DRM_MEM_MAPS);
return -EINVAL; return -EINVAL;
} }
#endif
#ifdef CONFIG_MTRR #ifdef CONFIG_MTRR
if (map->type == _DRM_FRAME_BUFFER if (map->type == _DRM_FRAME_BUFFER
|| (map->flags & _DRM_WRITE_COMBINING)) { || (map->flags & _DRM_WRITE_COMBINING)) {
...@@ -478,8 +480,10 @@ int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, ...@@ -478,8 +480,10 @@ int drm_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd,
-EFAULT); -EFAULT);
if (request.count >= dma->buf_count) { if (request.count >= dma->buf_count) {
down(&current->mm->mmap_sem);
virtual = do_mmap(filp, 0, dma->byte_count, virtual = do_mmap(filp, 0, dma->byte_count,
PROT_READ|PROT_WRITE, MAP_SHARED, 0); PROT_READ|PROT_WRITE, MAP_SHARED, 0);
up(&current->mm->mmap_sem);
if (virtual > -1024UL) { if (virtual > -1024UL) {
/* Real error */ /* Real error */
retcode = (signed long)virtual; retcode = (signed long)virtual;
......
...@@ -433,9 +433,9 @@ typedef struct drm_device { ...@@ -433,9 +433,9 @@ typedef struct drm_device {
/* Context support */ /* Context support */
int irq; /* Interrupt used by board */ int irq; /* Interrupt used by board */
__volatile__ int context_flag; /* Context swapping flag */ __volatile__ long context_flag; /* Context swapping flag */
__volatile__ int interrupt_flag;/* Interruption handler flag */ __volatile__ long interrupt_flag;/* Interruption handler flag */
__volatile__ int dma_flag; /* DMA dispatch flag */ __volatile__ long dma_flag; /* DMA dispatch flag */
struct timer_list timer; /* Timer for delaying ctx switch */ struct timer_list timer; /* Timer for delaying ctx switch */
wait_queue_head_t context_wait; /* Processes waiting on ctx switch */ wait_queue_head_t context_wait; /* Processes waiting on ctx switch */
int last_checked; /* Last context checked for DMA */ int last_checked; /* Last context checked for DMA */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -92,7 +92,8 @@ int drm_release(struct inode *inode, struct file *filp) ...@@ -92,7 +92,8 @@ int drm_release(struct inode *inode, struct file *filp)
DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n", DRM_DEBUG("pid = %d, device = 0x%x, open_count = %d\n",
current->pid, dev->device, dev->open_count); current->pid, dev->device, dev->open_count);
if (_DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock) if (dev->lock.hw_lock != NULL
&& _DRM_LOCK_IS_HELD(dev->lock.hw_lock->lock)
&& dev->lock.pid == current->pid) { && dev->lock.pid == current->pid) {
DRM_ERROR("Process %d dead, freeing lock for context %d\n", DRM_ERROR("Process %d dead, freeing lock for context %d\n",
current->pid, current->pid,
...@@ -216,7 +217,7 @@ int drm_write_string(drm_device_t *dev, const char *s) ...@@ -216,7 +217,7 @@ int drm_write_string(drm_device_t *dev, const char *s)
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO); if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
#else #else
/* Parameter added in 2.3.21 */ /* Parameter added in 2.3.21 */
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN); kill_fasync(&dev->buf_async, SIGIO, POLL_IN);
#endif #endif
DRM_DEBUG("waking\n"); DRM_DEBUG("waking\n");
wake_up_interruptible(&dev->buf_readers); wake_up_interruptible(&dev->buf_readers);
......
...@@ -103,6 +103,10 @@ int drm_cpu_valid(void) ...@@ -103,6 +103,10 @@ int drm_cpu_valid(void)
{ {
#if defined(__i386__) #if defined(__i386__)
if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */ if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
#endif
#if defined(__sparc__) && !defined(__sparc_v9__)
if (1)
return 0; /* No cmpxchg before v9 sparc. */
#endif #endif
return 1; return 1;
} }
...@@ -512,9 +512,9 @@ static int _drm_histo_info(char *buf, char **start, off_t offset, int len, ...@@ -512,9 +512,9 @@ static int _drm_histo_info(char *buf, char **start, off_t offset, int len,
} else { } else {
DRM_PROC_PRINT("lock none\n"); DRM_PROC_PRINT("lock none\n");
} }
DRM_PROC_PRINT("context_flag 0x%08x\n", dev->context_flag); DRM_PROC_PRINT("context_flag 0x%08lx\n", dev->context_flag);
DRM_PROC_PRINT("interrupt_flag 0x%08x\n", dev->interrupt_flag); DRM_PROC_PRINT("interrupt_flag 0x%08lx\n", dev->interrupt_flag);
DRM_PROC_PRINT("dma_flag 0x%08x\n", dev->dma_flag); DRM_PROC_PRINT("dma_flag 0x%08lx\n", dev->dma_flag);
DRM_PROC_PRINT("queue_count %10d\n", dev->queue_count); DRM_PROC_PRINT("queue_count %10d\n", dev->queue_count);
DRM_PROC_PRINT("last_context %10d\n", dev->last_context); DRM_PROC_PRINT("last_context %10d\n", dev->last_context);
......
# #
# Joystick driver # Joystick driver configuration
# #
mainmenu_option next_comment mainmenu_option next_comment
comment 'Joysticks' comment 'Joysticks'
tristate 'Joystick support' CONFIG_JOYSTICK tristate 'Joystick support' CONFIG_JOYSTICK
if [ "$CONFIG_JOYSTICK" != "n" ]; then if [ "$CONFIG_JOYSTICK" != "n" ]; then
dep_tristate ' Classic PC analog' CONFIG_JOY_ANALOG $CONFIG_JOYSTICK
dep_tristate ' FPGaming and MadCatz A3D' CONFIG_JOY_ASSASSIN $CONFIG_JOYSTICK define_tristate CONFIG_USB $CONFIG_JOYSTICK
dep_tristate ' Gravis GrIP' CONFIG_JOY_GRAVIS $CONFIG_JOYSTICK define_tristate CONFIG_INPUT_JOYDEV $CONFIG_JOYSTICK
dep_tristate ' Logitech ADI' CONFIG_JOY_LOGITECH $CONFIG_JOYSTICK
dep_tristate ' Microsoft SideWinder' CONFIG_JOY_SIDEWINDER $CONFIG_JOYSTICK comment 'Game port support'
dep_tristate ' ThrustMaster DirectConnect' CONFIG_JOY_THRUSTMASTER $CONFIG_JOYSTICK dep_tristate ' ns558 gameports' CONFIG_INPUT_NS558 $CONFIG_JOYSTICK
dep_tristate ' Creative Labs Blaster' CONFIG_JOY_CREATIVE $CONFIG_JOYSTICK dep_tristate ' PDPI Lightning 4 gamecard' CONFIG_INPUT_LIGHTNING $CONFIG_JOYSTICK
dep_tristate ' PDPI Lightning 4 card' CONFIG_JOY_LIGHTNING $CONFIG_JOYSTICK dep_tristate ' Aureal Vortex and Trident 4DWave gameports' CONFIG_INPUT_PCIGAME $CONFIG_JOYSTICK
dep_tristate ' Trident 4DWave and Aureal Vortex gameport' CONFIG_JOY_PCI $CONFIG_JOYSTICK
dep_tristate ' Magellan and Space Mouse' CONFIG_JOY_MAGELLAN $CONFIG_JOYSTICK comment 'Gameport joysticks'
dep_tristate ' SpaceTec SpaceOrb 360 and SpaceBall Avenger' CONFIG_JOY_SPACEORB $CONFIG_JOYSTICK dep_tristate ' Classic PC analog joysticks and gamepads' CONFIG_INPUT_ANALOG $CONFIG_JOYSTICK
dep_tristate ' SpaceTec SpaceBall 4000 FLX' CONFIG_JOY_SPACEBALL $CONFIG_JOYSTICK dep_tristate ' Assasin 3D and MadCatz Panther devices' CONFIG_INPUT_A3D $CONFIG_JOYSTICK
dep_tristate ' Logitech WingMan Warrior' CONFIG_JOY_WARRIOR $CONFIG_JOYSTICK dep_tristate ' Logitech ADI digital joysticks and gamepads' CONFIG_INPUT_ADI $CONFIG_JOYSTICK
dep_tristate ' Creative Labs Blaster Cobra gamepad' CONFIG_INPUT_COBRA $CONFIG_JOYSTICK
dep_tristate ' Genius Flight2000 Digital joysticks and gamepads' CONFIG_INPUT_GF2K $CONFIG_JOYSTICK
dep_tristate ' Gravis GrIP joysticks and gamepads' CONFIG_INPUT_GRIP $CONFIG_JOYSTICK
dep_tristate ' InterAct digital joysticks and gamepads' CONFIG_INPUT_INTERACT $CONFIG_JOYSTICK
dep_tristate ' ThrustMaster DirectConnect joysticks and gamepads' CONFIG_INPUT_TMDC $CONFIG_JOYSTICK
dep_tristate ' Microsoft SideWinder digital joysticks and gamepads' CONFIG_INPUT_SIDEWINDER $CONFIG_JOYSTICK
comment 'Serial port support'
dep_tristate ' Serial port input line discipline' CONFIG_INPUT_SERPORT $CONFIG_JOYSTICK
comment 'Serial port joysticks'
dep_tristate ' Logitech WingMan Warrior joystick' CONFIG_INPUT_WARRIOR $CONFIG_JOYSTICK
dep_tristate ' LogiCad3d Magellan/SpaceMouse 6dof controller' CONFIG_INPUT_MAGELLAN $CONFIG_JOYSTICK
dep_tristate ' SpaceTec SpaceOrb/Avenger 6dof controller' CONFIG_INPUT_SPACEORB $CONFIG_JOYSTICK
dep_tristate ' SpaceTec SpaceBall 4000 FLX 6dof controller' CONFIG_INPUT_SPACEBALL $CONFIG_JOYSTICK
dep_tristate ' I-Force joysticks/wheels' CONFIG_INPUT_IFORCE_232 $CONFIG_JOYSTICK
if [ "$CONFIG_INPUT_IFORCE_232" != "n" ]; then
define_tristate CONFIG_INPUT_IFORCE $CONFIG_INPUT_IFORCE_232
fi
if [ "$CONFIG_PARPORT" != "n" ]; then if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' NES, SNES, PSX, N64, Multi' CONFIG_JOY_CONSOLE $CONFIG_JOYSTICK $CONFIG_PARPORT comment 'Parallel port joysticks'
dep_tristate ' Sega, Multi' CONFIG_JOY_DB9 $CONFIG_JOYSTICK $CONFIG_PARPORT dep_tristate ' Multisystem, Sega Genesis, Saturn joysticks and gamepads' CONFIG_INPUT_DB9 $CONFIG_JOYSTICK
dep_tristate ' TurboGraFX interface' CONFIG_JOY_TURBOGRAFX $CONFIG_JOYSTICK $CONFIG_PARPORT dep_tristate ' Multisystem, NES, SNES, N64, PSX joysticks and gamepads' CONFIG_INPUT_GAMECON $CONFIG_JOYSTICK
dep_tristate ' Multisystem joysticks via TurboGraFX device' CONFIG_INPUT_TURBOGRAFX $CONFIG_JOYSTICK
fi fi
if [ "$CONFIG_AMIGA" = "y" ]; then if [ "$CONFIG_AMIGA" = "y" ]; then
dep_tristate ' Amiga joysticks' CONFIG_JOY_AMIGA $CONFIG_JOYSTICK comment 'System joysticks'
dep_tristate ' Amiga joysticks' CONFIG_INPUT_AMIJOY $CONFIG_JOYSTICK
fi fi
fi fi
......
...@@ -2,154 +2,73 @@ ...@@ -2,154 +2,73 @@
# Makefile for the joystick drivers. # Makefile for the joystick drivers.
# #
# Subdirs.
SUB_DIRS :=
MOD_SUB_DIRS := $(SUB_DIRS)
MOD_IN_SUB_DIRS := $(SUB_DIRS)
ALL_SUB_DIRS := $(SUB_DIRS)
# The target object and module list name.
O_TARGET := js.o O_TARGET := js.o
OX_OBJS :=
O_OBJS :=
MX_OBJS :=
M_OBJS := M_OBJS :=
O_OBJS :=
#MOD_LIST_NAME := INPUT_MODULES
# Objects that export symbols.
export-objs := serio.o gameport.o
# Object file lists.
obj-y :=
obj-m :=
obj-n :=
obj- :=
# Each configuration option enables a list of files.
obj-$(CONFIG_INPUT_SERPORT) += serport.o serio.o
obj-$(CONFIG_INPUT_NS558) += ns558.o gameport.o
obj-$(CONFIG_INPUT_LIGHTNING) += lightning.o gameport.o
obj-$(CONFIG_INPUT_PCIGAME) += pcigame.o gameport.o
obj-$(CONFIG_INPUT_WARRIOR) += warrior.o serio.o
obj-$(CONFIG_INPUT_MAGELLAN) += magellan.o serio.o
obj-$(CONFIG_INPUT_SPACEORB) += spaceorb.o serio.o
obj-$(CONFIG_INPUT_SPACEBALL) += spaceball.o serio.o
obj-$(CONFIG_INPUT_IFORCE_232) += serio.o
obj-$(CONFIG_INPUT_ANALOG) += analog.o gameport.o
obj-$(CONFIG_INPUT_A3D) += a3d.o gameport.o
obj-$(CONFIG_INPUT_ADI) += adi.o gameport.o
obj-$(CONFIG_INPUT_COBRA) += cobra.o gameport.o
obj-$(CONFIG_INPUT_GF2K) += gf2k.o gameport.o
obj-$(CONFIG_INPUT_GRIP) += grip.o gameport.o
obj-$(CONFIG_INPUT_INTERACT) += interact.o gameport.o
obj-$(CONFIG_INPUT_TMDC) += tmdc.o gameport.o
obj-$(CONFIG_INPUT_SIDEWINDER) += sidewinder.o gameport.o
obj-$(CONFIG_INPUT_DB9) += db9.o
obj-$(CONFIG_INPUT_GAMECON) += gamecon.o
obj-$(CONFIG_INPUT_TURBOGRAFX) += turbografx.o
obj-$(CONFIG_INPUT_AMIJOY) += amijoy.o
# Files that are both resident and modular: remove from modular.
obj-m := $(filter-out $(obj-y), $(obj-m))
int-m := $(filter-out $(int-y), $(int-m))
# Translate to Rules.make lists.
O_OBJS := $(sort $(filter-out $(export-objs), $(obj-y)))
OX_OBJS := $(sort $(filter $(export-objs), $(obj-y)))
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
ifeq ($(CONFIG_JOYSTICK),y) # The global Rules.make.
OX_OBJS += joystick.o
else
ifeq ($(CONFIG_JOYSTICK),m)
MX_OBJS += joystick.o
endif
endif
ifeq ($(CONFIG_JOY_AMIGA),y)
O_OBJS += joy-amiga.o
else
ifeq ($(CONFIG_JOY_AMIGA),m)
M_OBJS += joy-amiga.o
endif
endif
ifeq ($(CONFIG_JOY_ANALOG),y)
O_OBJS += joy-analog.o
else
ifeq ($(CONFIG_JOY_ANALOG),m)
M_OBJS += joy-analog.o
endif
endif
ifeq ($(CONFIG_JOY_ASSASSIN),y)
O_OBJS += joy-assassin.o
else
ifeq ($(CONFIG_JOY_ASSASSIN),m)
M_OBJS += joy-assassin.o
endif
endif
ifeq ($(CONFIG_JOY_CONSOLE),y)
O_OBJS += joy-console.o
else
ifeq ($(CONFIG_JOY_CONSOLE),m)
M_OBJS += joy-console.o
endif
endif
ifeq ($(CONFIG_JOY_CREATIVE),y)
O_OBJS += joy-creative.o
else
ifeq ($(CONFIG_JOY_CREATIVE),m)
M_OBJS += joy-creative.o
endif
endif
ifeq ($(CONFIG_JOY_DB9),y)
O_OBJS += joy-db9.o
else
ifeq ($(CONFIG_JOY_DB9),m)
M_OBJS += joy-db9.o
endif
endif
ifeq ($(CONFIG_JOY_GRAVIS),y)
O_OBJS += joy-gravis.o
else
ifeq ($(CONFIG_JOY_GRAVIS),m)
M_OBJS += joy-gravis.o
endif
endif
ifeq ($(CONFIG_JOY_LIGHTNING),y)
O_OBJS += joy-lightning.o
else
ifeq ($(CONFIG_JOY_LIGHTNING),m)
M_OBJS += joy-lightning.o
endif
endif
ifeq ($(CONFIG_JOY_LOGITECH),y)
O_OBJS += joy-logitech.o
else
ifeq ($(CONFIG_JOY_LOGITECH),m)
M_OBJS += joy-logitech.o
endif
endif
ifeq ($(CONFIG_JOY_MAGELLAN),y)
O_OBJS += joy-magellan.o
else
ifeq ($(CONFIG_JOY_MAGELLAN),m)
M_OBJS += joy-magellan.o
endif
endif
ifeq ($(CONFIG_JOY_PCI),y)
O_OBJS += joy-pci.o
else
ifeq ($(CONFIG_JOY_PCI),m)
M_OBJS += joy-pci.o
endif
endif
ifeq ($(CONFIG_JOY_SIDEWINDER),y)
O_OBJS += joy-sidewinder.o
else
ifeq ($(CONFIG_JOY_SIDEWINDER),m)
M_OBJS += joy-sidewinder.o
endif
endif
ifeq ($(CONFIG_JOY_SPACEORB),y)
O_OBJS += joy-spaceorb.o
else
ifeq ($(CONFIG_JOY_SPACEORB),m)
M_OBJS += joy-spaceorb.o
endif
endif
ifeq ($(CONFIG_JOY_SPACEBALL),y)
O_OBJS += joy-spaceball.o
else
ifeq ($(CONFIG_JOY_SPACEBALL),m)
M_OBJS += joy-spaceball.o
endif
endif
ifeq ($(CONFIG_JOY_THRUSTMASTER),y)
O_OBJS += joy-thrustmaster.o
else
ifeq ($(CONFIG_JOY_THRUSTMASTER),m)
M_OBJS += joy-thrustmaster.o
endif
endif
ifeq ($(CONFIG_JOY_TURBOGRAFX),y)
O_OBJS += joy-turbografx.o
else
ifeq ($(CONFIG_JOY_TURBOGRAFX),m)
M_OBJS += joy-turbografx.o
endif
endif
ifeq ($(CONFIG_JOY_WARRIOR),y)
O_OBJS += joy-warrior.o
else
ifeq ($(CONFIG_JOY_WARRIOR),m)
M_OBJS += joy-warrior.o
endif
endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/mman.h> #include <linux/mman.h>
#include <linux/random.h> #include <linux/random.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/joystick.h>
#include <linux/raw.h> #include <linux/raw.h>
#include <linux/capability.h> #include <linux/capability.h>
...@@ -652,13 +651,6 @@ int __init chr_dev_init(void) ...@@ -652,13 +651,6 @@ int __init chr_dev_init(void)
#ifdef CONFIG_SPARCAUDIO #ifdef CONFIG_SPARCAUDIO
sparcaudio_init(); sparcaudio_init();
#endif #endif
#ifdef CONFIG_JOYSTICK
/*
* Some joysticks only appear when the sound card they are
* connected to is configured. Keep the sound/joystick ordering.
*/
js_init();
#endif
#if CONFIG_QIC02_TAPE #if CONFIG_QIC02_TAPE
qic02_tape_init(); qic02_tape_init();
#endif #endif
......
...@@ -663,7 +663,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, ...@@ -663,7 +663,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty,
#if LINUX_VERSION_CODE < VERSION(2,3,0) #if LINUX_VERSION_CODE < VERSION(2,3,0)
kill_fasync (n_hdlc->tty->fasync, SIGIO); kill_fasync (n_hdlc->tty->fasync, SIGIO);
#else #else
kill_fasync (n_hdlc->tty->fasync, SIGIO, POLL_IN); kill_fasync(&n_hdlc->tty->fasync, SIGIO, POLL_IN);
#endif #endif
} /* end of n_hdlc_tty_receive() */ } /* end of n_hdlc_tty_receive() */
......
...@@ -630,8 +630,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c) ...@@ -630,8 +630,7 @@ static inline void n_tty_receive_char(struct tty_struct *tty, unsigned char c)
put_tty_queue(c, tty); put_tty_queue(c, tty);
tty->canon_head = tty->read_head; tty->canon_head = tty->read_head;
tty->canon_data++; tty->canon_data++;
if (tty->fasync) kill_fasync(&tty->fasync, SIGIO, POLL_IN);
kill_fasync(tty->fasync, SIGIO, POLL_IN);
if (waitqueue_active(&tty->read_wait)) if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait); wake_up_interruptible(&tty->read_wait);
return; return;
...@@ -735,8 +734,7 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp, ...@@ -735,8 +734,7 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
} }
if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) { if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
if (tty->fasync) kill_fasync(&tty->fasync, SIGIO, POLL_IN);
kill_fasync(tty->fasync, SIGIO, POLL_IN);
if (waitqueue_active(&tty->read_wait)) if (waitqueue_active(&tty->read_wait))
wake_up_interruptible(&tty->read_wait); wake_up_interruptible(&tty->read_wait);
} }
......
...@@ -83,8 +83,7 @@ static struct semaphore reader_lock; ...@@ -83,8 +83,7 @@ static struct semaphore reader_lock;
static void wake_readers(void) static void wake_readers(void)
{ {
wake_up_interruptible(&queue); wake_up_interruptible(&queue);
if(asyncptr) kill_fasync(&asyncptr, SIGIO, POLL_IN);
kill_fasync(asyncptr, SIGIO, POLL_IN);
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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