Commit de0d207b authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.99pre4

parent 1d3f1e5e
......@@ -1381,7 +1381,7 @@ S: 370 01 Ceske Budejovice
S: Czech Republic
N: Bas Laarhoven
E: bas@vimec.nl
E: sjml@xs4all.nl
D: Loadable modules and ftape driver
S: J. Obrechtstr 23
S: NL-5216 GP 's-Hertogenbosch
......
......@@ -10227,11 +10227,10 @@ CONFIG_NFSD
The module is called nfsd.o. If you want to compile it as a module,
say M here and read Documentation/modules.txt. If unsure, say N.
Provide NFSv3 server support (EXPERIMENTAL)
Provide NFSv3 server support
CONFIG_NFSD_V3
If you would like to include the NFSv3 server as well as the NFSv2
server, say Y here. File locking, via the NLMv4 protocol, is not
supported yet. If unsure, say N.
server, say Y here. In unsure, say Y.
OS/2 HPFS file system support
CONFIG_HPFS_FS
......@@ -10263,11 +10262,13 @@ CONFIG_NTFS_FS
NTFS write support (DANGEROUS)
CONFIG_NTFS_RW
If you say Y here, you will (hopefully) be able to write to NTFS
file systems as well as read from them. The read-write support
in NTFS is far from being complete and is not well tested. If you
If you say Y here, you will (maybe) be able to write to NTFS file
systems as well as read from them. The read-write support in
NTFS is far from being complete and is not well tested. If you
enable this, back up your NTFS volume first since it may get
damaged.
damaged. Also, make sure to run chkdsk from within Microsoft
Windows NT after having performed any writes to a NTFS partition
from Linux to detect any problems as early as possible.
If unsure, say N.
......@@ -14424,12 +14425,44 @@ CONFIG_MULTIFACE_III_TTY
If you want to compile it as a module, say M here and read
Documentation/modules.txt.
Amiga or Atari DMA sound support
CONFIG_DMASOUND
If you want to use the internal audio of your Atari or Amiga in
Linux, answer Y to this question. This will provide a Sun-like
/dev/audio, compatible with the Linux/i386 sound system. Otherwise,
say N.
Atari DMA sound support
CONFIG_DMASOUND_ATARI
If you want to use the internal audio of your Atari in Linux, answer
Y to this question. This will provide a Sun-like /dev/audio,
compatible with the Linux/i386 sound system. Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you
want). If you want to compile it as a module, say M here and read
Documentation/modules.txt.
PowerMac DMA sound support
CONFIG_DMASOUND_AWACS
If you want to use the internal audio of your PowerMac in Linux,
answer Y to this question. This will provide a Sun-like /dev/audio,
compatible with the Linux/i386 sound system. Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you
want). If you want to compile it as a module, say M here and read
Documentation/modules.txt.
Amiga DMA sound support
CONFIG_DMASOUND_PAULA
If you want to use the internal audio of your Amiga in Linux, answer
Y to this question. This will provide a Sun-like /dev/audio,
compatible with the Linux/i386 sound system. Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you
want). If you want to compile it as a module, say M here and read
Documentation/modules.txt.
Q40 sound support
CONFIG_DMASOUND_Q40
If you want to use the internal audio of your Q40 in Linux, answer
Y to this question. This will provide a Sun-like /dev/audio,
compatible with the Linux/i386 sound system. Otherwise, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you
......
......@@ -4,10 +4,13 @@ NTFS Overview
To mount an NTFS volume, use the filesystem type 'ntfs'. The driver
currently works only in read-only mode, with no fault-tolerance
supported. If you enable the experimental write support, make sure
you can recover from a complete loss of data. For ftdisk support,
limited success was reported with volume sets on top of the md driver,
although mirror and stripe sets should work as well - if the md
driver can be talked into using the same layout as Windows NT.
you can recover from a complete loss of data and also always run
chkdsk from within Microsoft Windows NT after performing a write to
a NTFS partition from Linux to detect any problems as early as
possible. For ftdisk support, limited success was reported with
volume sets on top of the md driver, although mirror and stripe
sets should work as well - if the md driver can be talked into
using the same layout as Windows NT.
The ntfs driver supports the following mount options:
iocharset=name Character set to use when returning file names.
......
MAGIC SYSRQ KEY DOCUMENTATION v1.31
MAGIC SYSRQ KEY DOCUMENTATION v1.32
------------------------------------
[Mon Mar 13 21:45:48 EST 2000]
[Sat Apr 8 22:15:03 CEST 2000]
* What is the magic SysRQ key?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -113,13 +113,13 @@ virtual console (ALT+Fn) and then back again should also help.
* I hit SysRQ, but nothing seems to happen, what's wrong?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are some keyboards which do not support 'SysRQ', you can try running
'showkey -s' and pressing SysRQ or alt-SysRQ to see if it generates any
0x54 codes. If it doesn't, you may define the magic sysrq sequence to a
different key. Find the keycode with showkey, and change the define of
'#define SYSRQ_KEY 0x54' in [/usr/src/linux/]include/asm/keyboard.h to
the keycode of the key you wish to use, then recompile. Oh, and by the way,
you exit 'showkey' by not typing anything for ten seconds.
There are some keyboards that send different scancodes for SysRQ than the
pre-defined 0x54. So if SysRQ doesn't work out of the box for a certain
keyboard, run 'showkey -s' to find out the proper scancode sequence. Then
use 'setkeycodes <sequence> 84' to define this sequence to the usual SysRQ
code (84 is decimal for 0x54). It's probably best to put this command in a
boot script. Oh, and by the way, you exit 'showkey' by not typing anything
for ten seconds.
* I have more questions, who can I ask?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -740,6 +740,12 @@ M: emoenke@gwdg.de
L: linux-kernel@vger.rutgers.edu
S: Maintained
NTFS FILESYSTEM
P: Anton Altaparmakov
M: aia21@cus.cam.ac.uk
L: linux-kernel@vger.rutgers.edu
S: Odd Fixes
NVIDIA (RIVA) FRAMEBUFFER DRIVER
P: Jeff Garzik
M: jgarzik@mandrakesoft.com
......
......@@ -384,6 +384,7 @@ CONFIG_PCMCIA_PCNET=y
# CONFIG_PCMCIA_SMC91C92 is not set
# CONFIG_PCMCIA_XIRC2PS is not set
# CONFIG_ARCNET_COM20020_CS is not set
# CONFIG_PCMCIA_IBMTR is not set
# CONFIG_PCMCIA_3C575 is not set
# CONFIG_PCMCIA_XIRTULIP is not set
CONFIG_NET_PCMCIA_RADIO=y
......@@ -492,6 +493,7 @@ CONFIG_AUTOFS4_FS=y
# CONFIG_VFAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
CONFIG_ISO9660_FS=y
# CONFIG_JOLIET is not set
# CONFIG_MINIX_FS is not set
......
......@@ -70,22 +70,28 @@ startup_32:
*/
#define cr4_bits mmu_cr4_features-__PAGE_OFFSET
cmpl $0,cr4_bits
je 1f
movl %cr4,%eax # Turn on 4Mb pages
je 3f
movl %cr4,%eax # Turn on paging options (PSE,PAE,..)
orl cr4_bits,%eax
movl %eax,%cr4
jmp 3f
1:
#endif
/*
* Setup paging (intialize tables, then switch them on)
* Initialize page tables
*/
1:
movl $pg0-__PAGE_OFFSET,%edi /* initialize page tables */
movl $007,%eax /* "007" doesn't mean with right to kill, but
PRESENT+RW+USER */
1: stosl
2: stosl
add $0x1000,%eax
cmp $empty_zero_page-__PAGE_OFFSET,%edi
jne 1b
jne 2b
/*
* Enable paging
*/
3:
movl $swapper_pg_dir-__PAGE_OFFSET,%eax
movl %eax,%cr3 /* set the page table pointer.. */
movl %cr0,%eax
......
......@@ -727,7 +727,7 @@ void __init setup_arch(char **cmdline_p)
#ifdef CONFIG_BLK_DEV_INITRD
if (LOADER_TYPE && INITRD_START) {
if (INITRD_START + INITRD_SIZE < (max_low_pfn << PAGE_SHIFT)) {
if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
reserve_bootmem(INITRD_START, INITRD_SIZE);
initrd_start =
INITRD_START ? INITRD_START + PAGE_OFFSET : 0;
......
......@@ -484,7 +484,7 @@ comment 'Sound support'
tristate 'Sound support' CONFIG_SOUND
if [ "$CONFIG_SOUND" != "n" ]; then
dep_tristate ' Amiga or Atari DMA sound support' CONFIG_DMASOUND $CONFIG_SOUND
source drivers/sound/dmasound/Config.in
fi
endmenu
......
......@@ -256,7 +256,7 @@ mainmenu_option next_comment
comment 'Sound'
tristate 'Sound card support' CONFIG_SOUND
if [ "$CONFIG_SOUND" != "n" ]; then
dep_tristate 'Amiga or PowerMac DMA sound support' CONFIG_DMASOUND $CONFIG_SOUND
source drivers/sound/dmasound/Config.in
source drivers/sound/Config.in
fi
......
......@@ -184,14 +184,14 @@ feature_init(void)
if (controller_count)
printk(KERN_INFO "Registered %d feature controller(s)\n", controller_count);
#ifdef CONFIG_PMAC_PBOOK
#ifdef CONFIG_DMASOUND_MODULE
/* On PowerBooks, we disable the sound chip when dmasound is a module */
#if defined(CONFIG_PMAC_PBOOK) && !defined(CONFIG_DMASOUND_AWACS)
/* On PowerBooks, we disable the sound chip when dmasound is a module
* or not used at all
*/
if (controller_count && find_devices("via-pmu") != NULL) {
feature_clear(controllers[0].device, FEATURE_Sound_power);
feature_clear(controllers[0].device, FEATURE_Sound_CLK_enable);
}
#endif
#endif
}
......
......@@ -46,9 +46,9 @@ dep_tristate ' Linear (append) mode' CONFIG_MD_LINEAR $CONFIG_BLK_DEV_MD
dep_tristate ' RAID-0 (striping) mode' CONFIG_MD_STRIPED $CONFIG_BLK_DEV_MD
#dep_tristate ' RAID-1 (mirroring) mode' CONFIG_MD_MIRRORING $CONFIG_BLK_DEV_MD
#dep_tristate ' RAID-4/RAID-5 mode' CONFIG_MD_RAID5 $CONFIG_BLK_DEV_MD
#if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_STRIPED" = "y" ]; then
# bool ' Boot support (linear, striped)' CONFIG_MD_BOOT
#fi
if [ "$CONFIG_MD_LINEAR" = "y" -o "$CONFIG_MD_STRIPED" = "y" ]; then
bool ' Boot support (linear, striped)' CONFIG_MD_BOOT
fi
tristate 'RAM disk support' CONFIG_BLK_DEV_RAM
dep_bool ' Initial RAM disk (initrd) support' CONFIG_BLK_DEV_INITRD $CONFIG_BLK_DEV_RAM
......
......@@ -1805,6 +1805,136 @@ static int do_md_stop (mddev_t * mddev, int ro)
#undef OUT
/* support old ioctls/init - cold add only */
int do_md_add(mddev_t *mddev, kdev_t dev)
{
int err;
mdk_rdev_t *rdev;
if (mddev->sb || mddev->pers)
return -EBUSY;
err = md_import_device(dev, 0);
if (err) return err;
rdev = find_rdev_all(dev);
if (!rdev) {
MD_BUG();
return -EINVAL;
}
rdev->old_dev = dev;
rdev->desc_nr = mddev->nb_dev;
bind_rdev_to_array(rdev, mddev);
return 0;
}
#define SET_SB(x,v) mddev->sb->x = v
#define SET_RSB(x,y) mddev->sb->disks[nr].x = y
static void autorun_array (mddev_t *mddev);
int do_md_start(mddev_t *mddev, int info)
{
int pers = (info & 0xFF0000UL)>>16;
// int fault= (info & 0x00FF00UL)>>8;
int factor=(info & 0x0000FFUL);
struct md_list_head *tmp;
mdk_rdev_t *rdev, *rdev0=NULL;
int err = 0;
if (mddev->sb) {
printk("array md%d already has superbloc!!\n",
mdidx(mddev));
return -EBUSY;
}
if (pers==1 || pers==2) {
/* non-persistant super block */
int devs = mddev->nb_dev;
if (alloc_array_sb(mddev))
return -ENOMEM;
mddev->sb->major_version = MD_MAJOR_VERSION;
mddev->sb->minor_version = MD_MINOR_VERSION;
mddev->sb->patch_version = MD_PATCHLEVEL_VERSION;
mddev->sb->ctime = CURRENT_TIME;
SET_SB(level,pers_to_level(pers));
SET_SB(size,0);
SET_SB(nr_disks, devs);
SET_SB(raid_disks, devs);
SET_SB(md_minor,mdidx(mddev));
SET_SB(not_persistent, 1);
SET_SB(state, 1<<MD_SB_CLEAN);
SET_SB(active_disks, devs);
SET_SB(working_disks, devs);
SET_SB(failed_disks, 0);
SET_SB(spare_disks, 0);
SET_SB(layout,0);
SET_SB(chunk_size, 1<<(factor+PAGE_SHIFT));
mddev->sb->md_magic = MD_SB_MAGIC;
/*
* Generate a 128 bit UUID
*/
get_random_bytes(&mddev->sb->set_uuid0, 4);
get_random_bytes(&mddev->sb->set_uuid1, 4);
get_random_bytes(&mddev->sb->set_uuid2, 4);
get_random_bytes(&mddev->sb->set_uuid3, 4);
/* add each disc */
ITERATE_RDEV(mddev,rdev,tmp) {
int nr, size;
nr = rdev->desc_nr;
SET_RSB(number,nr);
SET_RSB(major,MAJOR(rdev->dev));
SET_RSB(minor,MINOR(rdev->dev));
SET_RSB(raid_disk,nr);
SET_RSB(state,6); /* ACTIVE|SYNC */
size = calc_dev_size(rdev->dev, mddev, 0);
rdev->sb_offset = calc_dev_sboffset(rdev->dev, mddev, 0);
if (!mddev->sb->size || (mddev->sb->size > size))
mddev->sb->size = size;
}
sync_sbs(mddev);
err = do_md_run(mddev);
if (err)
do_md_stop(mddev, 0);
} else {
/* persistant super block - ignore the info and read the superblocks */
ITERATE_RDEV(mddev,rdev,tmp) {
if ((err = read_disk_sb(rdev))) {
printk("md: could not read %s's sb, not importing!\n",
partition_name(rdev->dev));
break;
}
if ((err = check_disk_sb(rdev))) {
printk("md: %s has invalid sb, not importing!\n",
partition_name(rdev->dev));
break;
}
rdev->desc_nr = rdev->sb->this_disk.number;
if (!rdev0) rdev0=rdev;
if (!uuid_equal(rdev0, rdev)) {
printk("%s has different UUID to %s .. dropping\n",
partition_name(rdev->dev),
partition_name(rdev0->dev));
err = -EINVAL;
break;
}
if (!sb_equal(rdev0->sb, rdev->sb)) {
printk("%s has same UUID as %s, but superblocks differ ...\n", partition_name(rdev->dev), partition_name(rdev0->dev));
err = -EINVAL;
break;
}
}
if (!err)
autorun_array(mddev);
}
return err;
}
#undef SET_SB
#undef SET_RSB
/*
* We have to safely support old arrays too.
*/
......@@ -2573,6 +2703,58 @@ static int md_ioctl (struct inode *inode, struct file *file,
}
default:
}
/* handle "old style" ioctls */
switch (cmd)
{
case START_MD:
if (!mddev)
return -ENODEV;
err = lock_mddev(mddev);
if (err) {
printk("ioctl lock interrupted, reason %d, cmd %d\n",err, cmd);
goto abort;
}
err = do_md_start(mddev, (int) arg);
if (err) {
printk("couldn't mdstart\n");
goto abort_unlock;
}
goto done_unlock;
case STOP_MD:
if (!mddev)
return -ENODEV;
err = lock_mddev(mddev);
if (err) {
printk("ioctl lock interrupted, reason %d, cmd %d\n",err, cmd);
goto abort_unlock;
}
err = do_md_stop(mddev, 0);
if (err) {
printk("couldn't mdstop\n");
goto abort_unlock;
}
goto done_unlock;
case REGISTER_DEV:
/* add this device to an unstarted array,
* create the array if needed */
if (!mddev)
mddev = alloc_mddev(dev);
if (!mddev) {
err = -ENOMEM;
goto abort;
}
err = lock_mddev(mddev);
if (err) {
printk("ioctl, reason %d, cmd %d\n", err, cmd);
goto abort;
}
err = do_md_add(mddev, to_kdev_t((dev_t) arg));
if (err) {
printk("do_md_add failed %d\n", err);
goto abort_unlock;
}
goto done_unlock;
}
switch (cmd)
{
......@@ -2593,7 +2775,7 @@ static int md_ioctl (struct inode *inode, struct file *file,
err = set_array_info(mddev, (void *)arg);
if (err) {
printk("couldnt set array info. %d\n", err);
goto abort;
goto abort_unlock;
}
goto done_unlock;
......@@ -3188,10 +3370,11 @@ void md__init raid_setup(char *str, int *ints)
}
#ifdef CONFIG_MD_BOOT
#define MAX_MD_BOOT_DEVS 16
struct {
unsigned long set;
int pers[MAX_MD_DEVS];
kdev_t devices[MAX_MD_DEVS][MAX_REAL];
int pers[MAX_MD_BOOT_DEVS];
kdev_t devices[MAX_MD_BOOT_DEVS][MAX_REAL];
} md_setup_args md__initdata = {
0,{0},{{0}}
};
......@@ -3219,7 +3402,7 @@ static int __init md_setup(char *str)
get_option(&str, &fault) != 2) {
printk("md: Too few arguments supplied to md=.\n");
return 0;
} else if (minor >= MAX_MD_DEVS) {
} else if (minor >= MAX_MD_BOOT_DEVS) {
printk ("md: Minor device number too high.\n");
return 0;
} else if (md_setup_args.set & (1 << minor)) {
......@@ -3229,13 +3412,13 @@ static int __init md_setup(char *str)
switch(level) {
#ifdef CONFIG_MD_LINEAR
case -1:
level = LINEAR;
level = LINEAR<<16;
pername = "linear";
break;
#endif
#ifdef CONFIG_MD_STRIPED
case 0:
level = STRIPED;
level = STRIPED<<16;
pername = "striped";
break;
#endif
......@@ -3263,7 +3446,7 @@ static int __init md_setup(char *str)
printk ("md: Will configure md%d (%s) from %s, below.\n",
minor, pername, devnames);
md_setup_args.devices[minor][i] = (kdev_t) 0;
md_setup_args.pers[minor] = level | factor | (fault << FAULT_SHIFT);
md_setup_args.pers[minor] = level | factor | (fault << 8);
md_setup_args.set |= (1 << minor);
return 1;
}
......@@ -3273,7 +3456,7 @@ static void md_geninit (void)
{
int i;
for(i = 0; i < MAX_MD_DEVS; i++) {
for(i = 0; i < MAX_MD_BOOT_DEVS; i++) {
md_blocksizes[i] = 1024;
md_size[i] = 0;
md_maxreadahead[i] = MD_READAHEAD;
......@@ -3344,20 +3527,20 @@ int md__init md_init (void)
}
#ifdef CONFIG_MD_BOOT
static void __init md_setup_drive(void)
void __init md_setup_drive(void)
{
if(md_setup_args.set)
do_md_setup(md_setup_args.str, md_setup_args.ints);
int minor, i;
kdev_t dev;
mddev_t*mddev;
for (minor = 0; minor < MAX_MD_DEVS; minor++) {
for (minor = 0; minor < MAX_MD_BOOT_DEVS; minor++) {
if ((md_setup_args.set & (1 << minor)) == 0)
continue;
printk("md: Loading md%d.\n", minor);
mddev = alloc_mddev(MKDEV(MD_MAJOR,minor));
for (i = 0; (dev = md_setup_args.devices[minor][i]); i++)
do_md_add (minor, dev);
do_md_run (minor, md_setup_args.pers[minor]);
do_md_add (mddev, dev);
do_md_start (mddev, md_setup_args.pers[minor]);
}
}
......
......@@ -350,6 +350,7 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
{
struct nbd_device *lo;
int dev, error, temp;
struct request sreq ;
/* Anyone capable of this syscall can do *real bad* things */
......@@ -363,6 +364,13 @@ static int nbd_ioctl(struct inode *inode, struct file *file,
lo = &nbd_dev[dev];
switch (cmd) {
case NBD_DISCONNECT:
printk("NBD_DISCONNECT\n") ;
sreq.cmd=2 ; /* shutdown command */
if (!lo->sock) return -EINVAL ;
nbd_send_req(lo->sock,&sreq) ;
return 0 ;
case NBD_CLEAR_SOCK:
down(&lo->queue_lock);
nbd_clear_que(lo);
......
......@@ -333,7 +333,8 @@ static int rd_open(struct inode * inode, struct file * filp)
* Immunize device against invalidate_buffers() and prune_icache().
*/
if (rd_inode[DEVICE_NR(inode->i_rdev)] == NULL) {
if((rd_inode[DEVICE_NR(inode->i_rdev)] = igrab(inode)) != NULL)
if (!inode->i_bdev) return -ENXIO;
if ((rd_inode[DEVICE_NR(inode->i_rdev)] = igrab(inode)) != NULL)
atomic_inc(&rd_inode[DEVICE_NR(inode->i_rdev)]->i_bdev->bd_openers);
}
......
......@@ -1764,6 +1764,30 @@ static struct {
#endif /* CONFIG_AGP_INTEL */
#ifdef CONFIG_AGP_SIS
{ PCI_DEVICE_ID_SI_630,
PCI_VENDOR_ID_SI,
SIS_GENERIC,
"SiS",
"Generic",
sis_generic_setup },
{ PCI_DEVICE_ID_SI_540,
PCI_VENDOR_ID_SI,
SIS_GENERIC,
"SiS",
"Generic",
sis_generic_setup },
{ PCI_DEVICE_ID_SI_620,
PCI_VENDOR_ID_SI,
SIS_GENERIC,
"SiS",
"Generic",
sis_generic_setup },
{ PCI_DEVICE_ID_SI_530,
PCI_VENDOR_ID_SI,
SIS_GENERIC,
"SiS",
"Generic",
sis_generic_setup },
{ 0,
PCI_VENDOR_ID_SI,
SIS_GENERIC,
......
......@@ -34,9 +34,6 @@ void soundcore_init(void);
#ifdef CONFIG_SOUND_OSS
void soundcard_init(void);
#endif
#ifdef CONFIG_DMASOUND
void dmasound_init(void);
#endif
#endif
#ifdef CONFIG_SPARCAUDIO
extern int sparcaudio_init(void);
......@@ -634,9 +631,6 @@ int __init chr_dev_init(void)
#ifdef CONFIG_SOUND_OSS
soundcard_init();
#endif
#ifdef CONFIG_DMASOUND
dmasound_init();
#endif
#endif
#ifdef CONFIG_SPARCAUDIO
sparcaudio_init();
......
......@@ -216,7 +216,6 @@ static const char *version = "defxx.c:v1.05 2000/03/26 Lawrence V. Stefani (ste
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/module.h>
#include <asm/byteorder.h>
#include <asm/bitops.h>
#include <asm/io.h>
......
......@@ -119,9 +119,11 @@ ppp_asynctty_open(struct tty_struct *tty)
struct asyncppp *ap;
int err;
MOD_INC_USE_COUNT;
err = -ENOMEM;
ap = kmalloc(sizeof(*ap), GFP_KERNEL);
if (ap == 0)
return -ENOMEM;
goto out;
/* initialize the asyncppp structure */
memset(ap, 0, sizeof(*ap));
......@@ -140,15 +142,18 @@ ppp_asynctty_open(struct tty_struct *tty)
ap->chan.ops = &async_ops;
ap->chan.mtu = PPP_MRU;
err = ppp_register_channel(&ap->chan);
if (err) {
kfree(ap);
return err;
}
if (err)
goto out_free;
tty->disc_data = ap;
MOD_INC_USE_COUNT;
return 0;
out_free:
kfree(ap);
out:
MOD_DEC_USE_COUNT;
return err;
}
/*
......
......@@ -19,7 +19,7 @@
* PPP driver, written by Michael Callahan and Al Longyear, and
* subsequently hacked by Paul Mackerras.
*
* ==FILEVERSION 20000323==
* ==FILEVERSION 20000406==
*/
#include <linux/config.h>
......@@ -125,12 +125,13 @@ struct ppp {
/*
* Bits in flags: SC_NO_TCP_CCID, SC_CCP_OPEN, SC_CCP_UP, SC_LOOP_TRAFFIC,
* SC_MULTILINK, SC_MP_SHORTSEQ, SC_MP_XSHORTSEQ.
* SC_MULTILINK, SC_MP_SHORTSEQ, SC_MP_XSHORTSEQ, SC_COMP_TCP, SC_REJ_COMP_TCP.
* Bits in rstate: SC_DECOMP_RUN, SC_DC_ERROR, SC_DC_FERROR.
* Bits in xstate: SC_COMP_RUN
*/
#define SC_FLAG_BITS (SC_NO_TCP_CCID|SC_CCP_OPEN|SC_CCP_UP|SC_LOOP_TRAFFIC \
|SC_MULTILINK|SC_MP_SHORTSEQ|SC_MP_XSHORTSEQ)
|SC_MULTILINK|SC_MP_SHORTSEQ|SC_MP_XSHORTSEQ \
|SC_COMP_TCP|SC_REJ_COMP_TCP)
/*
* Private data structure for each channel.
......@@ -182,6 +183,14 @@ static int last_channel_index;
/* We limit the length of ppp->file.rq to this (arbitrary) value */
#define PPP_MAX_RQLEN 32
/*
* Maximum number of multilink fragments queued up.
* This has to be large enough to cope with the maximum latency of
* the slowest channel relative to the others. Strictly it should
* depend on the number of channels and their characteristics.
*/
#define PPP_MP_MAX_QLEN 128
/* Multilink header bits. */
#define B 0x80 /* this fragment begins a packet */
#define E 0x40 /* this fragment ends a packet */
......@@ -770,6 +779,7 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev)
outf:
kfree_skb(skb);
++ppp->stats.tx_dropped;
return 0;
}
......@@ -1039,7 +1049,8 @@ ppp_push(struct ppp *ppp)
static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
{
int nch, len, fragsize;
int i, bits, hdrlen;
int i, bits, hdrlen, mtu;
int flen, fnb;
unsigned char *p, *q;
struct list_head *list;
struct channel *pch;
......@@ -1047,6 +1058,7 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
struct ppp_channel *chan;
nch = 0;
hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
list = &ppp->channels;
while ((list = list->next) != &ppp->channels) {
pch = list_entry(list, struct channel, clist);
......@@ -1097,8 +1109,6 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
/* create a fragment for each channel */
bits = B;
hdrlen = (ppp->flags & SC_MP_XSHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
/* XXX gotta do A/C and prot compression here */
do {
list = list->next;
if (list == &ppp->channels) {
......@@ -1109,13 +1119,34 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
++i;
if (!pch->avail)
continue;
if (fragsize >= len) {
fragsize = len;
bits |= E;
/* check the channel's mtu and whether it is still attached. */
spin_lock_bh(&pch->downl);
if (pch->chan == 0 || (mtu = pch->chan->mtu) < hdrlen) {
/* can't use this channel */
spin_unlock_bh(&pch->downl);
pch->avail = 0;
if (--nch == 0)
break;
continue;
}
frag = alloc_skb(fragsize + hdrlen, GFP_ATOMIC);
if (frag != 0) {
q = skb_put(frag, fragsize + hdrlen);
/*
* We have to create multiple fragments for this channel
* if fragsize is greater than the channel's mtu.
*/
if (fragsize > len)
fragsize = len;
for (flen = fragsize; flen > 0; flen -= fnb) {
fnb = flen;
if (fnb > mtu + 2 - hdrlen)
fnb = mtu + 2 - hdrlen;
if (fnb >= len)
bits |= E;
frag = alloc_skb(fnb + hdrlen, GFP_ATOMIC);
if (frag == 0)
goto noskb;
q = skb_put(frag, fnb + hdrlen);
/* make the MP header */
q[0] = PPP_MP >> 8;
q[1] = PPP_MP;
......@@ -1130,29 +1161,31 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
}
/* copy the data in */
memcpy(q + hdrlen, p, fragsize);
memcpy(q + hdrlen, p, fnb);
/* try to send it down the channel */
spin_lock_bh(&pch->downl);
chan = pch->chan;
if (chan != 0) {
if (!chan->ops->start_xmit(chan, frag))
skb_queue_tail(&pch->file.xq, frag);
} else {
/* channel got unregistered, too bad */
kfree_skb(skb);
}
spin_unlock_bh(&pch->downl);
if (!chan->ops->start_xmit(chan, frag))
skb_queue_tail(&pch->file.xq, frag);
pch->had_frag = 1;
p += fnb;
len -= fnb;
++ppp->nxseq;
bits = 0;
}
p += fragsize;
len -= fragsize;
++ppp->nxseq;
bits = 0;
spin_unlock_bh(&pch->downl);
} while (len > 0);
ppp->nxchan = i;
return 1;
noskb:
spin_unlock_bh(&pch->downl);
if (ppp->debug & 1)
printk(KERN_ERR "PPP: no memory (fragment)\n");
++ppp->stats.tx_errors;
++ppp->nxseq;
return 1; /* abandon the frame */
}
#endif /* CONFIG_PPP_MULTILINK */
......@@ -1434,7 +1467,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
static void
ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
{
u32 mask, seq, minseq;
u32 mask, seq;
struct list_head *l;
int mphdrlen = (ppp->flags & SC_MP_SHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
......@@ -1452,19 +1485,35 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
skb->BEbits = skb->data[2];
skb_pull(skb, mphdrlen); /* pull off PPP and MP headers */
/* Expand sequence number to 32 bits */
seq |= pch->lastseq & ~mask;
if (seq_before(seq, pch->lastseq)) {
if (seq_after(seq, pch->lastseq - 100)) {
printk(KERN_DEBUG "PPP: MP fragments out of order"
" (%u, %u)\n", pch->lastseq, seq);
goto err;
}
/*
* Do protocol ID decompression on the first fragment of each packet.
*/
if ((skb->BEbits & B) && (skb->data[0] & 1))
*skb_push(skb, 1) = 0;
/*
* Expand sequence number to 32 bits, making it as close
* as possible to ppp->minseq.
*/
seq |= ppp->minseq & ~mask;
if ((int)(ppp->minseq - seq) > (int)(mask >> 1))
seq += mask + 1;
}
else if ((int)(seq - ppp->minseq) > (int)(mask >> 1))
seq -= mask + 1; /* should never happen */
skb->sequence = seq;
pch->lastseq = seq;
/*
* If this packet comes before the next one we were expecting,
* drop it.
*/
if (seq_before(seq, ppp->nextseq)) {
kfree_skb(skb);
++ppp->stats.rx_dropped;
ppp_receive_error(ppp);
return;
}
/*
* Reevaluate minseq, the minimum over all channels of the
* last sequence number received on each channel. Because of
......@@ -1473,17 +1522,23 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
* The list of channels can't change because we have the receive
* side of the ppp unit locked.
*/
minseq = seq;
for (l = ppp->channels.next; l != &ppp->channels; l = l->next) {
struct channel *ch = list_entry(l, struct channel, clist);
if (seq_before(ch->lastseq, minseq))
minseq = ch->lastseq;
if (seq_before(ch->lastseq, seq))
seq = ch->lastseq;
}
ppp->minseq = minseq;
if (seq_before(ppp->minseq, seq))
ppp->minseq = seq;
/* Put the fragment on the reconstruction queue */
ppp_mp_insert(ppp, skb);
/* If the queue is getting long, don't wait any longer for packets
before the start of the queue. */
if (skb_queue_len(&ppp->mrq) >= PPP_MP_MAX_QLEN
&& seq_before(ppp->minseq, ppp->mrq.next->sequence))
ppp->minseq = ppp->mrq.next->sequence;
/* Pull completed packets off the queue and receive them. */
while ((skb = ppp_mp_reconstruct(ppp)) != 0)
ppp_receive_nonmp_frame(ppp, skb);
......@@ -1531,16 +1586,17 @@ ppp_mp_reconstruct(struct ppp *ppp)
struct sk_buff *skb = NULL;
int lost = 0, len = 0;
if (ppp->mrru == 0) /* do nothing until mrru is set */
return NULL;
head = list->next;
tail = NULL;
for (p = head; p != (struct sk_buff *) list; p = next) {
next = p->next;
if (seq_before(p->sequence, seq)) {
/* this can't happen, anyway toss the skb */
/* this can't happen, anyway ignore the skb */
printk(KERN_ERR "ppp_mp_reconstruct bad seq %u < %u\n",
p->sequence, seq);
__skb_unlink(p, list);
kfree_skb(p);
head = next;
continue;
}
if (p->sequence != seq) {
......@@ -1568,8 +1624,7 @@ ppp_mp_reconstruct(struct ppp *ppp)
if (p->BEbits & B) {
head = p;
lost = 0;
/* reset len, allow for protocol ID compression */
len = p->data[0] & 1;
len = 0;
}
len += p->len;
......@@ -1580,6 +1635,11 @@ ppp_mp_reconstruct(struct ppp *ppp)
++ppp->stats.rx_length_errors;
printk(KERN_DEBUG "PPP: reconstructed packet"
" is too long (%d)\n", len);
} else if (p == head) {
/* fragment is complete packet - reuse skb */
tail = p;
skb = skb_get(p);
break;
} else if ((skb = dev_alloc_skb(len)) == NULL) {
++ppp->stats.rx_missed_errors;
printk(KERN_DEBUG "PPP: no memory for "
......@@ -1610,19 +1670,14 @@ ppp_mp_reconstruct(struct ppp *ppp)
if (ppp->debug & 1)
printk(KERN_DEBUG " missed pkts %u..%u\n",
ppp->nextseq, head->sequence-1);
++ppp->stats.rx_dropped;
ppp_receive_error(ppp);
}
/* uncompress protocol ID */
if (head->data[0] & 1)
*skb_put(skb, 1) = 0;
p = head;
for (;;) {
memcpy(skb_put(skb, p->len), p->data, p->len);
if (p == tail)
break;
p = p->next;
}
if (head != tail)
/* copy to a single skb */
for (p = head; p != tail->next; p = p->next)
memcpy(skb_put(skb, p->len), p->data, p->len);
ppp->nextseq = tail->sequence + 1;
head = tail->next;
}
......@@ -2206,6 +2261,9 @@ static void ppp_destroy_interface(struct ppp *ppp)
}
skb_queue_purge(&ppp->file.xq);
skb_queue_purge(&ppp->file.rq);
#ifdef CONFIG_PPP_MULTILINK
skb_queue_purge(&ppp->mrq);
#endif /* CONFIG_PPP_MULTILINK */
dev = ppp->dev;
ppp->dev = 0;
ppp_unlock(ppp);
......@@ -2290,7 +2348,9 @@ ppp_connect_channel(struct channel *pch, int unit)
if (pch->chan == 0) /* need to check this?? */
goto outr;
hdrlen = pch->chan->hdrlen + PPP_HDRLEN;
if (pch->file.hdrlen > ppp->file.hdrlen)
ppp->file.hdrlen = pch->file.hdrlen;
hdrlen = pch->file.hdrlen + 2; /* for protocol bytes */
if (ppp->dev && hdrlen > ppp->dev->hard_header_len)
ppp->dev->hard_header_len = hdrlen;
list_add_tail(&pch->clist, &ppp->channels);
......
......@@ -176,9 +176,11 @@ ppp_sync_open(struct tty_struct *tty)
struct syncppp *ap;
int err;
MOD_INC_USE_COUNT;
ap = kmalloc(sizeof(*ap), GFP_KERNEL);
err = -ENOMEM;
if (ap == 0)
return -ENOMEM;
goto out;
/* initialize the syncppp structure */
memset(ap, 0, sizeof(*ap));
......@@ -193,16 +195,20 @@ ppp_sync_open(struct tty_struct *tty)
ap->chan.private = ap;
ap->chan.ops = &sync_ops;
ap->chan.mtu = PPP_MRU;
ap->chan.hdrlen = 2; /* for A/C bytes */
err = ppp_register_channel(&ap->chan);
if (err) {
kfree(ap);
return err;
}
if (err)
goto out_free;
tty->disc_data = ap;
MOD_INC_USE_COUNT;
return 0;
out_free:
kfree(ap);
out:
MOD_DEC_USE_COUNT;
return err;
}
/*
......
......@@ -35,7 +35,6 @@ obj- :=
# Each configuration option enables a list of files.
obj-$(CONFIG_SOUND) += soundcore.o
obj-$(CONFIG_DMASOUND) += dmasound.o
obj-$(CONFIG_SOUND_OSS) += sound.o
obj-$(CONFIG_SOUND_CS4232) += cs4232.o ad1848.o
......@@ -81,6 +80,17 @@ obj-$(CONFIG_SOUND_ESSSOLO1) += esssolo1.o
obj-$(CONFIG_SOUND_MAESTRO) += maestro.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o
ifeq ($(CONFIG_DMASOUND),y)
SUB_DIRS += dmasound
MOD_SUB_DIRS += dmasound
obj-y += dmasound/dmasound.o
else
ifeq ($(CONFIG_DMASOUND),m)
MOD_SUB_DIRS += dmasound
endif
endif
# Declare multi-part drivers.
list-multi := sound.o gus.o pas2.o sb.o sb_lib.o softoss2.o vidc_mod.o \
......
This diff is collapsed.
/* linux/drivers/sound/dmasound.h */
/*
* Minor numbers for the sound driver.
*
* Unfortunately Creative called the codec chip of SB as a DSP. For this
* reason the /dev/dsp is reserved for digitized audio use. There is a
* device for true DSP processors but it will be called something else.
* In v3.0 it's /dev/sndproc but this could be a temporary solution.
*/
#define SND_NDEVS 256 /* Number of supported devices */
#define SND_DEV_CTL 0 /* Control port /dev/mixer */
#define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM
synthesizer and MIDI output) */
#define SND_DEV_MIDIN 2 /* Raw midi access */
#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
#define SND_DEV_STATUS 6 /* /dev/sndstat */
/* #7 not in use now. Was in 2.4. Free for use after v3.0. */
#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
#define DSP_DEFAULT_SPEED 8000
#define ON 1
#define OFF 0
#define MAX_AUDIO_DEV 5
#define MAX_MIXER_DEV 2
#define MAX_SYNTH_DEV 3
#define MAX_MIDI_DEV 6
#define MAX_TIMER_DEV 3
# drivers/sound/dmasound/Config.in
if [ "$CONFIG_ATARI" = "y" ]; then
dep_tristate ' Atari DMA sound support' CONFIG_DMASOUND_ATARI $CONFIG_SOUND
fi
if [ "$CONFIG_ALL_PPC" = "y" ]; then
dep_tristate ' PowerMac DMA sound support' CONFIG_DMASOUND_AWACS $CONFIG_SOUND
fi
if [ "$CONFIG_AMIGA" = "y" -o "$CONFIG_APUS" = "y" ]; then
dep_tristate ' Amiga DMA sound support' CONFIG_DMASOUND_PAULA $CONFIG_SOUND
fi
if [ "$CONFIG_Q40" = "y" ]; then
dep_tristate ' Q40 sound support' CONFIG_DMASOUND_Q40 $CONFIG_SOUND
fi
if [ "$CONFIG_DMASOUND_ATARI" = "y" -o \
"$CONFIG_DMASOUND_AWACS" = "y" -o \
"$CONFIG_DMASOUND_PAULA" = "y" -o \
"$CONFIG_DMASOUND_Q40" = "y" ]; then
define_tristate CONFIG_DMASOUND y
else
if [ "$CONFIG_DMASOUND_ATARI" = "m" -o \
"$CONFIG_DMASOUND_AWACS" = "m" -o \
"$CONFIG_DMASOUND_PAULA" = "m" -o \
"$CONFIG_DMASOUND_Q40" = "m" ]; then
define_tristate CONFIG_DMASOUND m
fi
fi
#
# Makefile for the DMA sound driver
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
#
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET :=
O_OBJS :=
OX_OBJS :=
M_OBJS :=
MX_OBJS :=
export-objs := dmasound_core.o
obj-$(CONFIG_DMASOUND_ATARI) += dmasound_core.o dmasound_atari.o
obj-$(CONFIG_DMASOUND_AWACS) += dmasound_core.o dmasound_awacs.o
obj-$(CONFIG_DMASOUND_PAULA) += dmasound_core.o dmasound_paula.o
obj-$(CONFIG_DMASOUND_Q40) += dmasound_core.o dmasound_q40.o
# Files that are both resident and modular: remove from modular.
obj-m := $(filter-out $(obj-y), $(obj-m))
# Translate to Rules.make lists.
O_OBJS := $(filter-out $(export-objs), $(obj-y))
OX_OBJS := $(filter $(export-objs), $(obj-y))
M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m)))
MX_OBJS := $(sort $(filter $(export-objs), $(obj-m)))
ifeq ($(CONFIG_DMASOUND),y)
O_TARGET = dmasound.o
endif
include $(TOPDIR)/Rules.make
/*
* linux/drivers/sound/dmasound.h
*
*
* Minor numbers for the sound driver.
*
* Unfortunately Creative called the codec chip of SB as a DSP. For this
* reason the /dev/dsp is reserved for digitized audio use. There is a
* device for true DSP processors but it will be called something else.
* In v3.0 it's /dev/sndproc but this could be a temporary solution.
*/
#include <linux/config.h>
#define SND_NDEVS 256 /* Number of supported devices */
#define SND_DEV_CTL 0 /* Control port /dev/mixer */
#define SND_DEV_SEQ 1 /* Sequencer output /dev/sequencer (FM
synthesizer and MIDI output) */
#define SND_DEV_MIDIN 2 /* Raw midi access */
#define SND_DEV_DSP 3 /* Digitized voice /dev/dsp */
#define SND_DEV_AUDIO 4 /* Sparc compatible /dev/audio */
#define SND_DEV_DSP16 5 /* Like /dev/dsp but 16 bits/sample */
#define SND_DEV_STATUS 6 /* /dev/sndstat */
/* #7 not in use now. Was in 2.4. Free for use after v3.0. */
#define SND_DEV_SEQ2 8 /* /dev/sequencer, level 2 interface */
#define SND_DEV_SNDPROC 9 /* /dev/sndproc for programmable devices */
#define SND_DEV_PSS SND_DEV_SNDPROC
#define DSP_DEFAULT_SPEED 8000
#define ON 1
#define OFF 0
#define MAX_AUDIO_DEV 5
#define MAX_MIXER_DEV 2
#define MAX_SYNTH_DEV 3
#define MAX_MIDI_DEV 6
#define MAX_TIMER_DEV 3
#define MAX_CATCH_RADIUS 10
#define MIN_BUFFERS 4
#define MIN_BUFSIZE 4 /* in KB */
#define MAX_BUFSIZE 128 /* Limit for Amiga in KB */
#define arraysize(x) (sizeof(x)/sizeof(*(x)))
#define min(x, y) ((x) < (y) ? (x) : (y))
#define le2be16(x) (((x)<<8 & 0xff00) | ((x)>>8 & 0x00ff))
#define le2be16dbl(x) (((x)<<8 & 0xff00ff00) | ((x)>>8 & 0x00ff00ff))
#define IOCTL_IN(arg, ret) \
do { int error = get_user(ret, (int *)(arg)); \
if (error) return error; \
} while (0)
#define IOCTL_OUT(arg, ret) ioctl_return((int *)(arg), ret)
static inline int ioctl_return(int *addr, int value)
{
return value < 0 ? value : put_user(value, addr);
}
/*
* Configuration
*/
#undef HAS_8BIT_TABLES
#undef HAS_14BIT_TABLES
#undef HAS_16BIT_TABLES
#undef HAS_RECORD
#if defined(CONFIG_DMASOUND_ATARI) || defined(CONFIG_DMASOUND_ATARI_MODULE) ||\
defined(CONFIG_DMASOUND_PAULA) || defined(CONFIG_DMASOUND_PAULA_MODULE) ||\
defined(CONFIG_DMASOUND_Q40) || defined(CONFIG_DMASOUND_Q40_MODULE)
#define HAS_8BIT_TABLES
#endif
#if defined(CONFIG_DMASOUND_AWACS) || defined(CONFIG_DMASOUND_AWACS_MODULE)
#define HAS_16BIT_TABLES
#define HAS_RECORD
#endif
/*
* Initialization
*/
extern int dmasound_init(void);
extern void dmasound_deinit(void);
/*
* Machine definitions
*/
typedef struct {
const char *name;
const char *name2;
void (*open)(void);
void (*release)(void);
void *(*dma_alloc)(unsigned int, int);
void (*dma_free)(void *, unsigned int);
int (*irqinit)(void);
#ifdef MODULE
void (*irqcleanup)(void);
#endif /* MODULE */
void (*init)(void);
void (*silence)(void);
int (*setFormat)(int);
int (*setVolume)(int);
int (*setBass)(int);
int (*setTreble)(int);
int (*setGain)(int);
void (*play)(void);
void (*record)(void); /* optional */
void (*mixer_init)(void); /* optional */
int (*mixer_ioctl)(u_int, u_long); /* optional */
void (*write_sq_setup)(void); /* optional */
void (*read_sq_setup)(void); /* optional */
void (*sq_open)(void); /* optional */
int (*state_info)(char *); /* optional */
void (*abort_read)(void); /* optional */
int min_dsp_speed;
} MACHINE;
/*
* Low level stuff
*/
typedef struct {
int format; /* AFMT_* */
int stereo; /* 0 = mono, 1 = stereo */
int size; /* 8/16 bit*/
int speed; /* speed */
} SETTINGS;
typedef struct {
ssize_t (*ct_ulaw)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_alaw)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_s8)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_u8)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_s16be)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_u16be)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_s16le)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
ssize_t (*ct_u16le)(const u_char *, size_t, u_char *, ssize_t *, ssize_t);
} TRANS;
struct sound_settings {
MACHINE mach; /* machine dependent things */
SETTINGS hard; /* hardware settings */
SETTINGS soft; /* software settings */
SETTINGS dsp; /* /dev/dsp default settings */
TRANS *trans_write; /* supported translations */
#ifdef HAS_RECORD
TRANS *trans_read; /* supported translations */
#endif
int volume_left; /* volume (range is machine dependent) */
int volume_right;
int bass; /* tone (range is machine dependent) */
int treble;
int gain;
int minDev; /* minor device number currently open */
};
extern struct sound_settings dmasound;
extern char dmasound_ulaw2dma8[];
extern char dmasound_alaw2dma8[];
extern short dmasound_ulaw2dma16[];
extern short dmasound_alaw2dma16[];
/*
* Mid level stuff
*/
static inline int dmasound_set_volume(int volume)
{
return dmasound.mach.setVolume(volume);
}
static inline int dmasound_set_bass(int bass)
{
return dmasound.mach.setBass ? dmasound.mach.setBass(bass) : 50;
}
static inline int dmasound_set_treble(int treble)
{
return dmasound.mach.setTreble ? dmasound.mach.setTreble(treble) : 50;
}
static inline int dmasound_set_gain(int gain)
{
return dmasound.mach.setGain ? dmasound.mach.setGain(gain) : 100;
}
/*
* Sound queue stuff, the heart of the driver
*/
struct sound_queue {
/* buffers allocated for this queue */
int numBufs;
int bufSize; /* in bytes */
char **buffers;
/* current parameters */
int max_count;
int block_size; /* in bytes */
int max_active;
/* it shouldn't be necessary to declare any of these volatile */
int front, rear, count;
int rear_size;
/*
* The use of the playing field depends on the hardware
*
* Atari, PMac: The number of frames that are loaded/playing
*
* Amiga: Bit 0 is set: a frame is loaded
* Bit 1 is set: a frame is playing
*/
int active;
wait_queue_head_t action_queue, open_queue, sync_queue;
int open_mode;
int busy, syncing;
};
#define SLEEP(queue) interruptible_sleep_on_timeout(&queue, HZ)
#define WAKE_UP(queue) (wake_up_interruptible(&queue))
extern struct sound_queue dmasound_write_sq;
extern struct sound_queue dmasound_read_sq;
#define write_sq dmasound_write_sq
#define read_sq dmasound_read_sq
extern int dmasound_catchRadius;
#define catchRadius dmasound_catchRadius
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -66,12 +66,8 @@ comment 'USB HID'
dep_tristate ' Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_USB
dep_tristate ' Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_USB
if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
bool ' Mix all mice into one device' CONFIG_INPUT_MOUSEDEV_MIX
bool ' Support for digitizers' CONFIG_INPUT_MOUSEDEV_DIGITIZER
if [ "$CONFIG_INPUT_MOUSEDEV_DIGITIZER" != "n" ]; then
int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
fi
int ' Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
int ' Vertical screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_Y 768
fi
dep_tristate ' Joystick support' CONFIG_INPUT_JOYDEV $CONFIG_USB
dep_tristate ' Event interface support' CONFIG_INPUT_EVDEV $CONFIG_USB
......
......@@ -54,10 +54,9 @@
#include <linux/slab.h>
#include <linux/poll.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <asm/uaccess.h>
#include "usbdevice_fs.h"
#define MAX_TOPO_LEVEL 6
/* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
......
......@@ -41,9 +41,9 @@
#include <linux/signal.h>
#include <linux/poll.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <asm/uaccess.h>
#include "usbdevice_fs.h"
struct async {
struct list_head asynclist;
......
......@@ -37,11 +37,9 @@
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <asm/uaccess.h>
#include "usbdevice_fs.h"
/*****************************************************************/
/*
......
This diff is collapsed.
This diff is collapsed.
......@@ -38,10 +38,9 @@
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/usb.h>
#include <linux/usbdevice_fs.h>
#include <asm/uaccess.h>
#include "usbdevice_fs.h"
/* --------------------------------------------------------------------- */
static LIST_HEAD(superlist);
......
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.
......@@ -46,7 +46,8 @@ obj-$(CONFIG_FONT_6x11) += font_6x11.o
obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o
obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o fbmon.o
# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x
obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o
obj-$(CONFIG_FB_COMPAT_XPMAC) += macmodes.o
obj-$(CONFIG_FB_ACORN) += acornfb.o
......
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