summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@heisenberg.transvirtual.com>2002-06-20 19:29:23 -0700
committerJames Simmons <jsimmons@heisenberg.transvirtual.com>2002-06-20 19:29:23 -0700
commit7f933b363840d138d022010a80807d1fb0c5ef18 (patch)
tree9081e4b9e92833c43a25ebc21803eb7258145591 /include
parent0d71c71674d9704fd36732b3fb0e12a2b8125a1d (diff)
parent2ffe5f2f17d6698d1b0e78c43a4b9eb91426340d (diff)
Merge heisenberg.transvirtual.com:/tmp/linus-2.5
into heisenberg.transvirtual.com:/tmp/fbdev-2.5
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/signal.h1
-rw-r--r--include/asm-alpha/unistd.h13
-rw-r--r--include/asm-i386/xor.h2
-rw-r--r--include/asm-ia64/delay.h3
-rw-r--r--include/asm-ia64/pgalloc.h15
-rw-r--r--include/asm-ia64/processor.h3
-rw-r--r--include/asm-ia64/signal.h1
-rw-r--r--include/asm-ia64/softirq.h4
-rw-r--r--include/asm-sparc64/hardirq.h7
-rw-r--r--include/asm-sparc64/signal.h1
-rw-r--r--include/asm-sparc64/smp.h31
-rw-r--r--include/linux/blk.h33
-rw-r--r--include/linux/elevator.h1
-rw-r--r--include/linux/futex.h1
-rw-r--r--include/linux/i2c-dev.h18
-rw-r--r--include/linux/i2c-id.h15
-rw-r--r--include/linux/i2c-proc.h5
-rw-r--r--include/linux/i2c.h23
-rw-r--r--include/linux/ide.h12
-rw-r--r--include/linux/if_tun.h4
-rw-r--r--include/linux/interrupt.h25
-rw-r--r--include/linux/proc_fs.h1
-rw-r--r--include/linux/sched.h28
-rw-r--r--include/net/ip6_route.h3
-rw-r--r--include/net/irda/af_irda.h82
-rw-r--r--include/net/irda/discovery.h15
-rw-r--r--include/net/irda/ircomm_core.h1
-rw-r--r--include/net/irda/ircomm_event.h2
-rw-r--r--include/net/irda/ircomm_tty.h1
-rw-r--r--include/net/irda/irda-usb.h3
-rw-r--r--include/net/irda/irda.h160
-rw-r--r--include/net/irda/irda_device.h39
-rw-r--r--include/net/irda/iriap.h5
-rw-r--r--include/net/irda/irlap.h31
-rw-r--r--include/net/irda/irlap_event.h34
-rw-r--r--include/net/irda/irlap_frame.h20
-rw-r--r--include/net/irda/irlmp.h6
-rw-r--r--include/net/irda/irlmp_event.h6
-rw-r--r--include/net/irda/irmod.h71
-rw-r--r--include/net/irda/irttp.h5
-rw-r--r--include/net/irda/timer.h16
-rw-r--r--include/net/irda/wrapper.h2
-rw-r--r--include/sound/ac97_codec.h11
-rw-r--r--include/sound/asound.h12
-rw-r--r--include/sound/core.h22
-rw-r--r--include/sound/emu10k1.h6
-rw-r--r--include/sound/emu8000.h4
-rw-r--r--include/sound/emux_synth.h9
-rw-r--r--include/sound/mixer_oss.h4
-rw-r--r--include/sound/opl3.h4
-rw-r--r--include/sound/pcm.h16
-rw-r--r--include/sound/soundfont.h1
-rw-r--r--include/sound/timer.h1
-rw-r--r--include/sound/version.h4
-rw-r--r--include/sound/ymfpci.h9
55 files changed, 500 insertions, 352 deletions
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 65101218d1df..8730c4b833fe 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -187,6 +187,7 @@ struct sigstack {
#include <asm/sigcontext.h>
#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
+#define HAVE_ARCH_SYS_PAUSE
#endif
diff --git a/include/asm-alpha/unistd.h b/include/asm-alpha/unistd.h
index 3f7bf95438a9..649d450973de 100644
--- a/include/asm-alpha/unistd.h
+++ b/include/asm-alpha/unistd.h
@@ -319,6 +319,19 @@
#define __NR_readahead 379
#define __NR_security 380 /* syscall for security modules */
#define __NR_tkill 381
+#define __NR_setxattr 382
+#define __NR_lsetxattr 383
+#define __NR_fsetxattr 384
+#define __NR_getxattr 385
+#define __NR_lgetxattr 386
+#define __NR_fgetxattr 387
+#define __NR_listxattr 388
+#define __NR_llistxattr 389
+#define __NR_flistxattr 390
+#define __NR_removexattr 391
+#define __NR_lremovexattr 392
+#define __NR_fremovexattr 393
+
#if defined(__GNUC__)
diff --git a/include/asm-i386/xor.h b/include/asm-i386/xor.h
index 888ac968bd27..854f76a2b9e6 100644
--- a/include/asm-i386/xor.h
+++ b/include/asm-i386/xor.h
@@ -550,7 +550,7 @@ static struct xor_block_template xor_block_p5_mmx = {
"movups %%xmm1,0x10(%1) ;\n\t" \
"movups %%xmm2,0x20(%1) ;\n\t" \
"movups %%xmm3,0x30(%1) ;\n\t" \
- : "=r" (cr0) \
+ : "=&r" (cr0) \
: "r" (xmm_save) \
: "memory")
diff --git a/include/asm-ia64/delay.h b/include/asm-ia64/delay.h
index ae608b4e3c13..5c283e8cd977 100644
--- a/include/asm-ia64/delay.h
+++ b/include/asm-ia64/delay.h
@@ -15,6 +15,7 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/compiler.h>
#include <asm/processor.h>
@@ -52,7 +53,7 @@ ia64_get_itc (void)
__asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
#ifdef CONFIG_ITANIUM
- while (__builtin_expect ((__s32) result == -1, 0))
+ while (unlikely ((__s32) result == -1)
__asm__ __volatile__("mov %0=ar.itc" : "=r"(result) :: "memory");
#endif
return result;
diff --git a/include/asm-ia64/pgalloc.h b/include/asm-ia64/pgalloc.h
index c8a1f77d89d0..c919520f9bcc 100644
--- a/include/asm-ia64/pgalloc.h
+++ b/include/asm-ia64/pgalloc.h
@@ -17,6 +17,7 @@
#include <linux/mm.h>
#include <linux/threads.h>
+#include <linux/compiler.h>
#include <asm/mmu_context.h>
#include <asm/processor.h>
@@ -37,7 +38,7 @@ pgd_alloc_one_fast (struct mm_struct *mm)
{
unsigned long *ret = pgd_quicklist;
- if (__builtin_expect(ret != NULL, 1)) {
+ if (likely(ret != NULL)) {
pgd_quicklist = (unsigned long *)(*ret);
ret[0] = 0;
--pgtable_cache_size;
@@ -52,9 +53,9 @@ pgd_alloc (struct mm_struct *mm)
/* the VM system never calls pgd_alloc_one_fast(), so we do it here. */
pgd_t *pgd = pgd_alloc_one_fast(mm);
- if (__builtin_expect(pgd == NULL, 0)) {
+ if (unlikely(pgd == NULL)) {
pgd = (pgd_t *)__get_free_page(GFP_KERNEL);
- if (__builtin_expect(pgd != NULL, 1))
+ if (likely(pgd != NULL))
clear_page(pgd);
}
return pgd;
@@ -80,7 +81,7 @@ pmd_alloc_one_fast (struct mm_struct *mm, unsigned long addr)
{
unsigned long *ret = (unsigned long *)pmd_quicklist;
- if (__builtin_expect(ret != NULL, 1)) {
+ if (likely(ret != NULL)) {
pmd_quicklist = (unsigned long *)(*ret);
ret[0] = 0;
--pgtable_cache_size;
@@ -93,7 +94,7 @@ pmd_alloc_one (struct mm_struct *mm, unsigned long addr)
{
pmd_t *pmd = (pmd_t *) __get_free_page(GFP_KERNEL);
- if (__builtin_expect(pmd != NULL, 1))
+ if (likely(pmd != NULL))
clear_page(pmd);
return pmd;
}
@@ -125,7 +126,7 @@ pte_alloc_one (struct mm_struct *mm, unsigned long addr)
{
struct page *pte = alloc_pages(GFP_KERNEL, 0);
- if (__builtin_expect(pte != NULL, 1))
+ if (likely(pte != NULL))
clear_page(page_address(pte));
return pte;
}
@@ -135,7 +136,7 @@ pte_alloc_one_kernel (struct mm_struct *mm, unsigned long addr)
{
pte_t *pte = (pte_t *) __get_free_page(GFP_KERNEL);
- if (__builtin_expect(pte != NULL, 1))
+ if (likely(pte != NULL))
clear_page(pte);
return pte;
}
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 67f72c0e8a8d..de35b88afcfe 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -16,6 +16,7 @@
#include <linux/config.h>
#include <linux/percpu.h>
+#include <linux/compiler.h>
#include <asm/ptrace.h>
#include <asm/kregs.h>
@@ -283,7 +284,7 @@ struct thread_struct {
regs->loadrs = 0; \
regs->r8 = current->mm->dumpable; /* set "don't zap registers" flag */ \
regs->r12 = new_sp - 16; /* allocate 16 byte scratch area */ \
- if (!__builtin_expect (current->mm->dumpable, 1)) { \
+ if (!likely (current->mm->dumpable)) { \
/* \
* Zap scratch regs to avoid leaking bits between processes with different \
* uid/privileges. \
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index f52c035391bd..42f30a918ae2 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -167,6 +167,7 @@ struct k_sigaction {
# include <asm/sigcontext.h>
#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
+#define HAVE_ARCH_SYS_PAUSE
#endif /* __KERNEL__ */
diff --git a/include/asm-ia64/softirq.h b/include/asm-ia64/softirq.h
index 3f3864bf42fe..1ab796be81fe 100644
--- a/include/asm-ia64/softirq.h
+++ b/include/asm-ia64/softirq.h
@@ -1,6 +1,8 @@
#ifndef _ASM_IA64_SOFTIRQ_H
#define _ASM_IA64_SOFTIRQ_H
+#include <linux/compiler.h>
+
/*
* Copyright (C) 1998-2001 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
@@ -13,7 +15,7 @@
#define local_bh_enable() \
do { \
__local_bh_enable(); \
- if (__builtin_expect(local_softirq_pending(), 0) && really_local_bh_count() == 0) \
+ if (unlikely(local_softirq_pending()) && really_local_bh_count() == 0) \
do_softirq(); \
} while (0)
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h
index d55bd01d7363..2f19dd915281 100644
--- a/include/asm-sparc64/hardirq.h
+++ b/include/asm-sparc64/hardirq.h
@@ -64,9 +64,12 @@ static __inline__ int irqs_running(void)
{
int i;
- for (i = 0; i < smp_num_cpus; i++)
- if (local_irq_count(cpu_logical_map(i)))
+ for (i = 0; i < NR_CPUS; i++) {
+ if (!cpu_online(i))
+ continue;
+ if (local_irq_count(i))
return 1;
+ }
return 0;
}
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index cc7a6dbc5d8b..b15544c92511 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -254,6 +254,7 @@ typedef struct sigaltstack32 {
} stack_t32;
#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER
+#define HAVE_ARCH_SYS_PAUSE
#endif
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index ae5307391893..580c08582c27 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -24,7 +24,8 @@ struct prom_cpuinfo {
};
extern int linux_num_cpus; /* number of CPUs probed */
-extern struct prom_cpuinfo linux_cpus[64];
+extern struct prom_cpuinfo linux_cpus[NR_CPUS];
+extern unsigned int prom_cpu_nodes[NR_CPUS];
#endif /* !(__ASSEMBLY__) */
@@ -60,9 +61,21 @@ extern cpuinfo_sparc cpu_data[NR_CPUS];
* Private routines/data
*/
+#include <asm/bitops.h>
+#include <asm/atomic.h>
+
extern unsigned char boot_cpu_id;
-extern unsigned long cpu_present_map;
-#define cpu_online_map cpu_present_map
+extern unsigned long cpu_online_map;
+#define cpu_online(cpu) (cpu_online_map & (1UL << (cpu)))
+extern atomic_t sparc64_num_cpus_online;
+#define num_online_cpus() (atomic_read(&sparc64_num_cpus_online))
+
+static inline int any_online_cpu(unsigned long mask)
+{
+ if ((mask &= cpu_online_map) != 0UL)
+ return __ffs(mask);
+ return -1;
+}
/*
* General functions that each host system must provide.
@@ -72,18 +85,6 @@ extern void smp_callin(void);
extern void smp_boot_cpus(void);
extern void smp_store_cpu_info(int id);
-extern __volatile__ int __cpu_number_map[NR_CPUS];
-extern __volatile__ int __cpu_logical_map[NR_CPUS];
-
-extern __inline__ int cpu_logical_map(int cpu)
-{
- return __cpu_logical_map[cpu];
-}
-extern __inline__ int cpu_number_map(int cpu)
-{
- return __cpu_number_map[cpu];
-}
-
extern __inline__ int hard_smp_processor_id(void)
{
if (tlb_type == cheetah) {
diff --git a/include/linux/blk.h b/include/linux/blk.h
index 69aa2fa94a97..7fbd3f6acae8 100644
--- a/include/linux/blk.h
+++ b/include/linux/blk.h
@@ -40,6 +40,7 @@ void initrd_init(void);
extern int end_that_request_first(struct request *, int, int);
extern void end_that_request_last(struct request *);
+struct request *elv_next_request(request_queue_t *q);
static inline void blkdev_dequeue_request(struct request *req)
{
@@ -49,38 +50,6 @@ static inline void blkdev_dequeue_request(struct request *req)
elv_remove_request(req->q, req);
}
-extern inline struct request *elv_next_request(request_queue_t *q)
-{
- struct request *rq;
-
- while ((rq = __elv_next_request(q))) {
- rq->flags |= REQ_STARTED;
-
- if (&rq->queuelist == q->last_merge)
- q->last_merge = NULL;
-
- if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn)
- break;
-
- /*
- * all ok, break and return it
- */
- if (!q->prep_rq_fn(q, rq))
- break;
-
- /*
- * prep said no-go, kill it
- */
- blkdev_dequeue_request(rq);
- if (end_that_request_first(rq, 0, rq->nr_sectors))
- BUG();
-
- end_that_request_last(rq);
- }
-
- return rq;
-}
-
#define _elv_add_request_core(q, rq, where, plug) \
do { \
if ((plug)) \
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 44cbb0e8e8fe..3bd08ecdaf0b 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -40,7 +40,6 @@ struct elevator_s
*/
extern void __elv_add_request(request_queue_t *, struct request *,
struct list_head *);
-extern struct request *__elv_next_request(request_queue_t *);
extern void elv_merge_cleanup(request_queue_t *, struct request *, int);
extern int elv_merge(request_queue_t *, struct request **, struct bio *);
extern void elv_merge_requests(request_queue_t *, struct request *,
diff --git a/include/linux/futex.h b/include/linux/futex.h
index d913c30590df..f0925a8e6a2e 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -4,5 +4,6 @@
/* Second argument to futex syscall */
#define FUTEX_WAIT (0)
#define FUTEX_WAKE (1)
+#define FUTEX_FD (2)
#endif
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 7134c8b8a18e..4c67640b9c91 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: i2c-dev.h,v 1.9 2001/08/15 03:04:58 mds Exp $ */
+/* $Id: i2c-dev.h,v 1.10 2001/11/19 19:01:46 mds Exp $ */
#ifndef I2C_DEV_H
#define I2C_DEV_H
@@ -162,6 +162,22 @@ static inline __s32 i2c_smbus_write_block_data(int file, __u8 command,
I2C_SMBUS_BLOCK_DATA, &data);
}
+/* Returns the number of read bytes */
+static inline __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command,
+ __u8 *values)
+{
+ union i2c_smbus_data data;
+ int i;
+ if (i2c_smbus_access(file,I2C_SMBUS_READ,command,
+ I2C_SMBUS_I2C_BLOCK_DATA,&data))
+ return -1;
+ else {
+ for (i = 1; i <= data.block[0]; i++)
+ values[i-1] = data.block[i];
+ return data.block[0];
+ }
+}
+
static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command,
__u8 length, __u8 *values)
{
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 74f4f23c1b09..039fb3640431 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -20,7 +20,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */
-/* $Id: i2c-id.h,v 1.35 2001/08/12 17:22:20 mds Exp $ */
+/* $Id: i2c-id.h,v 1.41 2002/03/11 07:18:55 simon Exp $ */
#ifndef I2C_ID_H
#define I2C_ID_H
@@ -90,6 +90,10 @@
#define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */
#define I2C_DRIVERID_SP5055 44 /* Satellite tuner */
#define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */
+#define I2C_DRIVERID_SAA7108 46 /* video decoder, image scaler */
+
+
+
#define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */
#define I2C_DRIVERID_EXP1 0xF1
@@ -127,6 +131,9 @@
#define I2C_DRIVERID_ADM1024 1025
#define I2C_DRIVERID_IT87 1026
#define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */
+#define I2C_DRIVERID_FSCPOS 1028
+#define I2C_DRIVERID_FSCSCY 1029
+#define I2C_DRIVERID_PCF8591 1030
/*
* ---- Adapter types ----------------------------------------------------
@@ -143,7 +150,8 @@
#define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */
#define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */
#define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */
-
+#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */
+#define I2C_ALGO_SAA7134 0x090000
#define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */
#define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */
@@ -189,6 +197,9 @@
/* --- MPC8xx PowerPC adapters */
#define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */
+/* --- ITE based algorithms */
+#define I2C_HW_I_IIC 0x00 /* controller on the ITE */
+
/* --- SMBus only adapters */
#define I2C_HW_SMBUS_PIIX4 0x00
#define I2C_HW_SMBUS_ALI15X3 0x01
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
index 364cfe77d4d6..4a4c33db48d5 100644
--- a/include/linux/i2c-proc.h
+++ b/include/linux/i2c-proc.h
@@ -1,6 +1,7 @@
/*
- sensors.h - Part of lm_sensors, Linux kernel modules for hardware
- monitoring
+ i2c-proc.h - Part of the i2c package
+ was originally sensors.h - Part of lm_sensors, Linux kernel modules
+ for hardware monitoring
Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
This program is free software; you can redistribute it and/or modify
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 256a7da0d845..7bb812551f6c 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,13 +23,13 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c.h,v 1.46 2001/08/31 00:04:07 phil Exp $ */
+/* $Id: i2c.h,v 1.50 2002/03/23 00:53:38 phil Exp $ */
#ifndef I2C_H
#define I2C_H
-#define I2C_DATE "20010830"
-#define I2C_VERSION "2.6.1"
+#define I2C_DATE "20020322"
+#define I2C_VERSION "2.6.3"
#include <linux/i2c-id.h> /* id values of adapters et. al. */
#include <linux/types.h>
@@ -48,11 +48,8 @@ struct i2c_msg;
#endif
#include <asm/page.h> /* for 2.2.xx */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,25)
#include <linux/sched.h>
-#else
#include <asm/semaphore.h>
-#endif
#include <linux/config.h>
/* --- General options ------------------------------------------------ */
@@ -123,6 +120,8 @@ extern s32 i2c_smbus_read_block_data(struct i2c_client * client,
extern s32 i2c_smbus_write_block_data(struct i2c_client * client,
u8 command, u8 length,
u8 *values);
+extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client,
+ u8 command, u8 *values);
extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client,
u8 command, u8 length,
u8 *values);
@@ -406,8 +405,10 @@ struct i2c_msg {
#define I2C_FUNC_SMBUS_PROC_CALL 0x00800000
#define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000
#define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000
-#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* New I2C-like block */
-#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* transfer */
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */
+#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */
+#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */
#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \
I2C_FUNC_SMBUS_WRITE_BYTE
@@ -419,13 +420,17 @@ struct i2c_msg {
I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
+#define I2C_FUNC_SMBUS_I2C_BLOCK_2 I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \
+ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2
#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \
I2C_FUNC_SMBUS_BYTE | \
I2C_FUNC_SMBUS_BYTE_DATA | \
I2C_FUNC_SMBUS_WORD_DATA | \
I2C_FUNC_SMBUS_PROC_CALL | \
- I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
+ I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \
+ I2C_FUNC_SMBUS_I2C_BLOCK | \
+ I2C_FUNC_SMBUS_I2C_BLOCK_2
/*
* Data for SMBus Messages
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 03c21c567ce4..98426a06e782 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -298,7 +298,6 @@ struct ata_device {
unsigned using_tcq : 1; /* disk is using queueing */
unsigned dsc_overlap : 1; /* flag: DSC overlap */
- unsigned waiting_for_dma: 1; /* dma currently in progress */
unsigned busy : 1; /* currently doing revalidate_disk() */
unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */
@@ -681,7 +680,8 @@ static inline void ide_unmap_rq(struct request *rq, char *to,
bio_kunmap_irq(to, flags);
}
-extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
+extern ide_startstop_t ata_special_intr(struct ata_device *, struct request *);
+extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *);
extern void ide_fix_driveid(struct hd_driveid *id);
extern int ide_config_drive_speed(struct ata_device *, byte);
@@ -756,6 +756,8 @@ static inline void udma_start(struct ata_device *drive, struct request *rq)
static inline int udma_stop(struct ata_device *drive)
{
+ clear_bit(IDE_DMA, drive->channel->active);
+
return drive->channel->udma_stop(drive);
}
@@ -764,7 +766,11 @@ static inline int udma_stop(struct ata_device *drive)
*/
static inline ide_startstop_t udma_init(struct ata_device *drive, struct request *rq)
{
- return drive->channel->udma_init(drive, rq);
+ int ret = drive->channel->udma_init(drive, rq);
+ if (ret == ide_started)
+ set_bit(IDE_DMA, drive->channel->active);
+
+ return ret;
}
static inline int udma_irq_status(struct ata_device *drive)
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 0cfd69202430..2af535344624 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -50,10 +50,6 @@ struct tun_struct {
#endif
};
-#ifndef MIN
-#define MIN(a,b) ( (a)<(b) ? (a):(b) )
-#endif
-
#endif /* __KERNEL__ */
/* Read queue size */
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 90446b0d75e5..fbc10eab16f4 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -28,20 +28,17 @@ struct irqaction {
enum {
TIMER_BH = 0,
- TQUEUE_BH,
- DIGI_BH,
- SERIAL_BH,
- RISCOM8_BH,
- SPECIALIX_BH,
- AURORA_BH,
- ESP_BH,
- SCSI_BH,
- IMMEDIATE_BH,
- CYCLADES_BH,
- CM206_BH,
- JS_BH,
- MACSERIAL_BH,
- ISICOM_BH
+ TQUEUE_BH = 1,
+ DIGI_BH = 2,
+ SERIAL_BH = 3,
+ RISCOM8_BH = 4,
+ SPECIALIX_BH = 5,
+ AURORA_BH = 6,
+ ESP_BH = 7,
+ IMMEDIATE_BH = 9,
+ CYCLADES_BH = 10,
+ MACSERIAL_BH = 13,
+ ISICOM_BH = 14
};
#include <asm/hardirq.h>
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 33e093a1357b..4490c4d3a5de 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -198,6 +198,7 @@ static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
mode_t mode, struct proc_dir_entry *base, get_info_t *get_info)
{ return NULL; }
+struct tty_driver;
static inline void proc_tty_register_driver(struct tty_driver *driver) {};
static inline void proc_tty_unregister_driver(struct tty_driver *driver) {};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 9e7d80851c32..390627c2f1f6 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -863,6 +863,34 @@ static inline void recalc_sigpending(void)
clear_thread_flag(TIF_SIGPENDING);
}
+/*
+ * Wrappers for p->thread_info->cpu access. No-op on UP.
+ */
+#ifdef CONFIG_SMP
+
+static inline unsigned int task_cpu(struct task_struct *p)
+{
+ return p->thread_info->cpu;
+}
+
+static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
+{
+ p->thread_info->cpu = cpu;
+}
+
+#else
+
+static inline unsigned int task_cpu(struct task_struct *p)
+{
+ return 0;
+}
+
+static inline void set_task_cpu(struct task_struct *p, unsigned int cpu)
+{
+}
+
+#endif /* CONFIG_SMP */
+
#endif /* __KERNEL__ */
#endif
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 89ab4a4164ae..20389ddc6f97 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -23,9 +23,6 @@ struct pol_chain {
extern struct rt6_info ip6_null_entry;
-extern int ip6_rt_max_size;
-extern int ip6_rt_gc_min;
-extern int ip6_rt_gc_timeout;
extern int ip6_rt_gc_interval;
extern void ip6_route_input(struct sk_buff *skb);
diff --git a/include/net/irda/af_irda.h b/include/net/irda/af_irda.h
new file mode 100644
index 000000000000..947a4d653c4a
--- /dev/null
+++ b/include/net/irda/af_irda.h
@@ -0,0 +1,82 @@
+/*********************************************************************
+ *
+ * Filename: af_irda.h
+ * Version: 1.0
+ * Description: IrDA sockets declarations
+ * Status: Stable
+ * Author: Dag Brattli <dagb@cs.uit.no>
+ * Created at: Tue Dec 9 21:13:12 1997
+ * Modified at: Fri Jan 28 13:16:32 2000
+ * Modified by: Dag Brattli <dagb@cs.uit.no>
+ *
+ * Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * Neither Dag Brattli nor University of Tromsø admit liability nor
+ * provide warranty for any of this software. This material is
+ * provided "AS-IS" and at no charge.
+ *
+ ********************************************************************/
+
+#ifndef AF_IRDA_H
+#define AF_IRDA_H
+
+#include <linux/irda.h>
+#include <net/irda/irda.h>
+#include <net/irda/iriap.h> /* struct iriap_cb */
+#include <net/irda/irias_object.h> /* struct ias_value */
+#include <net/irda/irlmp.h> /* struct lsap_cb */
+#include <net/irda/irttp.h> /* struct tsap_cb */
+#include <net/irda/discovery.h> /* struct discovery_t */
+
+/* IrDA Socket */
+struct irda_sock {
+ __u32 saddr; /* my local address */
+ __u32 daddr; /* peer address */
+
+ struct lsap_cb *lsap; /* LSAP used by Ultra */
+ __u8 pid; /* Protocol IP (PID) used by Ultra */
+
+ struct tsap_cb *tsap; /* TSAP used by this connection */
+ __u8 dtsap_sel; /* remote TSAP address */
+ __u8 stsap_sel; /* local TSAP address */
+
+ __u32 max_sdu_size_rx;
+ __u32 max_sdu_size_tx;
+ __u32 max_data_size;
+ __u8 max_header_size;
+ struct qos_info qos_tx;
+
+ __u16 mask; /* Hint bits mask */
+ __u16 hints; /* Hint bits */
+
+ __u32 ckey; /* IrLMP client handle */
+ __u32 skey; /* IrLMP service handle */
+
+ struct ias_object *ias_obj; /* Our service name + lsap in IAS */
+ struct iriap_cb *iriap; /* Used to query remote IAS */
+ struct ias_value *ias_result; /* Result of remote IAS query */
+
+ hashbin_t *cachelog; /* Result of discovery query */
+ struct discovery_t *cachediscovery; /* Result of selective discovery query */
+
+ int nslots; /* Number of slots to use for discovery */
+
+ int errno; /* status of the IAS query */
+
+ struct sock *sk;
+ wait_queue_head_t query_wait; /* Wait for the answer to a query */
+ struct timer_list watchdog; /* Timeout for discovery */
+
+ LOCAL_FLOW tx_flow;
+ LOCAL_FLOW rx_flow;
+};
+
+#define irda_sk(__sk) ((struct irda_sock *)(__sk)->protinfo)
+
+#endif /* AF_IRDA_H */
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h
index b69dd381ae1e..b24d73a73734 100644
--- a/include/net/irda/discovery.h
+++ b/include/net/irda/discovery.h
@@ -10,6 +10,7 @@
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1999 Dag Brattli, All Rights Reserved.
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -34,11 +35,23 @@
#include <asm/param.h>
#include <net/irda/irda.h>
-#include <net/irda/irqueue.h>
+#include <net/irda/irqueue.h> /* irda_queue_t */
+#include <net/irda/irlap_event.h> /* LAP_REASON */
#define DISCOVERY_EXPIRE_TIMEOUT (2*sysctl_discovery_timeout*HZ)
#define DISCOVERY_DEFAULT_SLOTS 0
+/*
+ * This type is used by the protocols that transmit 16 bits words in
+ * little endian format. A little endian machine stores MSB of word in
+ * byte[1] and LSB in byte[0]. A big endian machine stores MSB in byte[0]
+ * and LSB in byte[1].
+ */
+typedef union {
+ __u16 word;
+ __u8 byte[2];
+} __u16_host_order;
+
/* Types of discovery */
typedef enum {
DISCOVERY_LOG, /* What's in our discovery log */
diff --git a/include/net/irda/ircomm_core.h b/include/net/irda/ircomm_core.h
index 3e891c201231..69b610acd2df 100644
--- a/include/net/irda/ircomm_core.h
+++ b/include/net/irda/ircomm_core.h
@@ -32,6 +32,7 @@
#define IRCOMM_CORE_H
#include <net/irda/irda.h>
+#include <net/irda/irqueue.h>
#include <net/irda/ircomm_event.h>
#define IRCOMM_MAGIC 0x98347298
diff --git a/include/net/irda/ircomm_event.h b/include/net/irda/ircomm_event.h
index 8bcffa8acba3..9f0ca85aaabf 100644
--- a/include/net/irda/ircomm_event.h
+++ b/include/net/irda/ircomm_event.h
@@ -31,6 +31,8 @@
#ifndef IRCOMM_EVENT_H
#define IRCOMM_EVENT_H
+#include <net/irda/irmod.h>
+
typedef enum {
IRCOMM_IDLE,
IRCOMM_WAITI,
diff --git a/include/net/irda/ircomm_tty.h b/include/net/irda/ircomm_tty.h
index 77f7dd0d6001..a7cb72ad60ee 100644
--- a/include/net/irda/ircomm_tty.h
+++ b/include/net/irda/ircomm_tty.h
@@ -34,6 +34,7 @@
#include <linux/serial.h>
#include <linux/termios.h>
#include <linux/timer.h>
+#include <linux/tty.h> /* struct tty_struct */
#include <net/irda/irias_object.h>
#include <net/irda/ircomm_core.h>
diff --git a/include/net/irda/irda-usb.h b/include/net/irda/irda-usb.h
index 9614f2b368e3..3480c84386ec 100644
--- a/include/net/irda/irda-usb.h
+++ b/include/net/irda/irda-usb.h
@@ -29,8 +29,7 @@
#include <linux/time.h>
#include <net/irda/irda.h>
-#include <net/irda/irlap.h>
-#include <net/irda/irda_device.h>
+#include <net/irda/irda_device.h> /* struct irlap_cb */
#define RX_COPY_THRESHOLD 200
#define IRDA_USB_MAX_MTU 2051
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 6f89d5df801a..272891b9ceb1 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -10,7 +10,7 @@
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,16 +27,13 @@
#define NET_IRDA_H
#include <linux/config.h>
-#include <linux/skbuff.h>
+#include <linux/skbuff.h> /* struct sk_buff */
#include <linux/kernel.h>
-#include <linux/if.h>
+#include <linux/if.h> /* sa_family_t in <linux/irda.h> */
#include <linux/irda.h>
typedef __u32 magic_t;
-#include <net/irda/qos.h>
-#include <net/irda/irqueue.h>
-
#ifndef TRUE
#define TRUE 1
#endif
@@ -57,8 +54,8 @@ typedef __u32 magic_t;
#ifndef IRDA_ALIGN
# define IRDA_ALIGN __attribute__((aligned))
#endif
-#ifndef PACK
-# define PACK __attribute__((packed))
+#ifndef IRDA_PACK
+# define IRDA_PACK __attribute__((packed))
#endif
@@ -116,151 +113,4 @@ if(!(expr)) do { \
#define IAS_IRCOMM_ID 0x2343
#define IAS_IRLPT_ID 0x9876
-typedef enum { FLOW_STOP, FLOW_START } LOCAL_FLOW;
-
-/* A few forward declarations (to make compiler happy) */
-struct tsap_cb; /* in <net/irda/irttp.h> */
-struct lsap_cb; /* in <net/irda/irlmp.h> */
-struct iriap_cb; /* in <net/irda/iriap.h> */
-struct ias_value; /* in <net/irda/irias_object.h> */
-struct discovery_t; /* in <net/irda/discovery.h> */
-
-/* IrDA Socket */
-struct irda_sock {
- __u32 saddr; /* my local address */
- __u32 daddr; /* peer address */
-
- struct lsap_cb *lsap; /* LSAP used by Ultra */
- __u8 pid; /* Protocol IP (PID) used by Ultra */
-
- struct tsap_cb *tsap; /* TSAP used by this connection */
- __u8 dtsap_sel; /* remote TSAP address */
- __u8 stsap_sel; /* local TSAP address */
-
- __u32 max_sdu_size_rx;
- __u32 max_sdu_size_tx;
- __u32 max_data_size;
- __u8 max_header_size;
- struct qos_info qos_tx;
-
- __u16 mask; /* Hint bits mask */
- __u16 hints; /* Hint bits */
-
- __u32 ckey; /* IrLMP client handle */
- __u32 skey; /* IrLMP service handle */
-
- struct ias_object *ias_obj; /* Our service name + lsap in IAS */
- struct iriap_cb *iriap; /* Used to query remote IAS */
- struct ias_value *ias_result; /* Result of remote IAS query */
-
- hashbin_t *cachelog; /* Result of discovery query */
- struct discovery_t *cachediscovery; /* Result of selective discovery query */
-
- int nslots; /* Number of slots to use for discovery */
-
- int errno; /* status of the IAS query */
-
- struct sock *sk;
- wait_queue_head_t query_wait; /* Wait for the answer to a query */
- struct timer_list watchdog; /* Timeout for discovery */
-
- LOCAL_FLOW tx_flow;
- LOCAL_FLOW rx_flow;
-};
-
-#define irda_sk(__sk) ((struct irda_sock *)(__sk)->protinfo)
-
-/*
- * This type is used by the protocols that transmit 16 bits words in
- * little endian format. A little endian machine stores MSB of word in
- * byte[1] and LSB in byte[0]. A big endian machine stores MSB in byte[0]
- * and LSB in byte[1].
- */
-typedef union {
- __u16 word;
- __u8 byte[2];
-} __u16_host_order;
-
-/*
- * Per-packet information we need to hide inside sk_buff
- * (must not exceed 48 bytes, check with struct sk_buff)
- */
-struct irda_skb_cb {
- magic_t magic; /* Be sure that we can trust the information */
- __u32 next_speed; /* The Speed to be set *after* this frame */
- __u16 mtt; /* Minimum turn around time */
- __u16 xbofs; /* Number of xbofs required, used by SIR mode */
- __u16 next_xbofs; /* Number of xbofs required *after* this frame */
- void *context; /* May be used by drivers */
- void (*destructor)(struct sk_buff *skb); /* Used for flow control */
- __u16 xbofs_delay; /* Number of xbofs used for generating the mtt */
- __u8 line; /* Used by IrCOMM in IrLPT mode */
-};
-
-/* Misc status information */
-typedef enum {
- STATUS_OK,
- STATUS_ABORTED,
- STATUS_NO_ACTIVITY,
- STATUS_NOISY,
- STATUS_REMOTE,
-} LINK_STATUS;
-
-typedef enum {
- LOCK_NO_CHANGE,
- LOCK_LOCKED,
- LOCK_UNLOCKED,
-} LOCK_STATUS;
-
-typedef enum { /* FIXME check the two first reason codes */
- LAP_DISC_INDICATION=1, /* Received a disconnect request from peer */
- LAP_NO_RESPONSE, /* To many retransmits without response */
- LAP_RESET_INDICATION, /* To many retransmits, or invalid nr/ns */
- LAP_FOUND_NONE, /* No devices were discovered */
- LAP_MEDIA_BUSY,
- LAP_PRIMARY_CONFLICT,
-} LAP_REASON;
-
-/*
- * IrLMP disconnect reasons. The order is very important, since they
- * correspond to disconnect reasons sent in IrLMP disconnect frames, so
- * please do not touch :-)
- */
-typedef enum {
- LM_USER_REQUEST = 1, /* User request */
- LM_LAP_DISCONNECT, /* Unexpected IrLAP disconnect */
- LM_CONNECT_FAILURE, /* Failed to establish IrLAP connection */
- LM_LAP_RESET, /* IrLAP reset */
- LM_INIT_DISCONNECT, /* Link Management initiated disconnect */
- LM_LSAP_NOTCONN, /* Data delivered on unconnected LSAP */
- LM_NON_RESP_CLIENT, /* Non responsive LM-MUX client */
- LM_NO_AVAIL_CLIENT, /* No available LM-MUX client */
- LM_CONN_HALF_OPEN, /* Connection is half open */
- LM_BAD_SOURCE_ADDR, /* Illegal source address (i.e 0x00) */
-} LM_REASON;
-#define LM_UNKNOWN 0xff /* Unspecified disconnect reason */
-
-/*
- * Notify structure used between transport and link management layers
- */
-typedef struct {
- int (*data_indication)(void *priv, void *sap, struct sk_buff *skb);
- int (*udata_indication)(void *priv, void *sap, struct sk_buff *skb);
- void (*connect_confirm)(void *instance, void *sap,
- struct qos_info *qos, __u32 max_sdu_size,
- __u8 max_header_size, struct sk_buff *skb);
- void (*connect_indication)(void *instance, void *sap,
- struct qos_info *qos, __u32 max_sdu_size,
- __u8 max_header_size, struct sk_buff *skb);
- void (*disconnect_indication)(void *instance, void *sap,
- LM_REASON reason, struct sk_buff *);
- void (*flow_indication)(void *instance, void *sap, LOCAL_FLOW flow);
- void (*status_indication)(void *instance,
- LINK_STATUS link, LOCK_STATUS lock);
- void *instance; /* Layer instance pointer */
- char name[16]; /* Name of layer */
-} notify_t;
-
-#define NOTIFY_MAX_NAME 16
-
#endif /* NET_IRDA_H */
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 5e59c7545a37..5e6e0049692e 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -11,6 +11,7 @@
*
* Copyright (c) 1999-2000 Dag Brattli, All Rights Reserved.
* Copyright (c) 1998 Thomas Davis, <ratbert@radiks.net>,
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -29,18 +30,27 @@
*
********************************************************************/
+/*
+ * This header contains all the IrDA definitions a driver really
+ * needs, and therefore the driver should not need to include
+ * any other IrDA headers - Jean II
+ */
+
#ifndef IRDA_DEVICE_H
#define IRDA_DEVICE_H
#include <linux/tty.h>
#include <linux/netdevice.h>
#include <linux/spinlock.h>
+#include <linux/skbuff.h> /* struct sk_buff */
#include <linux/irda.h>
#include <net/irda/irda.h>
-#include <net/irda/qos.h>
-#include <net/irda/irqueue.h>
-#include <net/irda/irlap_frame.h>
+#include <net/irda/qos.h> /* struct qos_info */
+#include <net/irda/irqueue.h> /* irda_queue_t */
+
+/* A few forward declarations (to make compiler happy) */
+struct irlap_cb;
/* Some non-standard interface flags (should not conflict with any in if.h) */
#define IFF_SIR 0x0001 /* Supports SIR speeds */
@@ -120,6 +130,22 @@ struct dongle_reg {
int (*change_speed)(struct irda_task *task);
};
+/*
+ * Per-packet information we need to hide inside sk_buff
+ * (must not exceed 48 bytes, check with struct sk_buff)
+ */
+struct irda_skb_cb {
+ magic_t magic; /* Be sure that we can trust the information */
+ __u32 next_speed; /* The Speed to be set *after* this frame */
+ __u16 mtt; /* Minimum turn around time */
+ __u16 xbofs; /* Number of xbofs required, used by SIR mode */
+ __u16 next_xbofs; /* Number of xbofs required *after* this frame */
+ void *context; /* May be used by drivers */
+ void (*destructor)(struct sk_buff *skb); /* Used for flow control */
+ __u16 xbofs_delay; /* Number of xbofs used for generating the mtt */
+ __u8 line; /* Used by IrCOMM in IrLPT mode */
+};
+
/* Chip specific info */
typedef struct {
int cfg_base; /* Config register IO base */
@@ -158,6 +184,13 @@ typedef struct {
int irda_device_init(void);
void irda_device_cleanup(void);
+/* IrLAP entry points used by the drivers.
+ * We declare them here to avoid the driver pulling a whole bunch stack
+ * headers they don't really need - Jean II */
+struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
+ char * hw_name);
+void irlap_close(struct irlap_cb *self);
+
/* Interface to be uses by IrLAP */
void irda_device_set_media_busy(struct net_device *dev, int status);
int irda_device_is_media_busy(struct net_device *dev);
diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h
index 8aed55b1c94a..917e6701e7ab 100644
--- a/include/net/irda/iriap.h
+++ b/include/net/irda/iriap.h
@@ -29,11 +29,10 @@
#include <linux/types.h>
#include <linux/skbuff.h>
-#include <net/irda/qos.h>
#include <net/irda/iriap_event.h>
#include <net/irda/irias_object.h>
-#include <net/irda/irqueue.h>
-#include <net/irda/timer.h>
+#include <net/irda/irqueue.h> /* irda_queue_t */
+#include <net/irda/timer.h> /* struct timer_list */
#define IAP_LST 0x80
#define IAP_ACK 0x40
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index ae30117cbf6e..e6aba3b50dcb 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -33,7 +33,11 @@
#include <linux/netdevice.h>
#include <linux/timer.h>
-#include <net/irda/irlap_event.h>
+#include <net/irda/irqueue.h> /* irda_queue_t */
+#include <net/irda/qos.h> /* struct qos_info */
+#include <net/irda/discovery.h> /* discovery_t */
+#include <net/irda/irlap_event.h> /* IRLAP_STATE, ... */
+#include <net/irda/irmod.h> /* struct notify_t */
#define CONFIG_IRDA_DYNAMIC_WINDOW 1
@@ -85,6 +89,29 @@
#define NS_UNEXPECTED 0
#define NS_INVALID -1
+/*
+ * Meta information passed within the IrLAP state machine
+ */
+struct irlap_info {
+ __u8 caddr; /* Connection address */
+ __u8 control; /* Frame type */
+ __u8 cmd;
+
+ __u32 saddr;
+ __u32 daddr;
+
+ int pf; /* Poll/final bit set */
+
+ __u8 nr; /* Sequence number of next frame expected */
+ __u8 ns; /* Sequence number of frame sent */
+
+ int S; /* Number of slots */
+ int slot; /* Random chosen slot */
+ int s; /* Current slot */
+
+ discovery_t *discovery; /* Discovery information */
+};
+
/* Main structure of IrLAP */
struct irlap_cb {
irda_queue_t q; /* Must be first */
diff --git a/include/net/irda/irlap_event.h b/include/net/irda/irlap_event.h
index 9c7b995c316b..2ae2e119ef4b 100644
--- a/include/net/irda/irlap_event.h
+++ b/include/net/irda/irlap_event.h
@@ -12,7 +12,7 @@
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -35,9 +35,10 @@
#define IRLAP_EVENT_H
#include <net/irda/irda.h>
-#include <net/irda/discovery.h>
+/* A few forward declarations (to make compiler happy) */
struct irlap_cb;
+struct irlap_info;
/* IrLAP States */
typedef enum {
@@ -108,27 +109,16 @@ typedef enum {
} IRLAP_EVENT;
/*
- * Various things used by the IrLAP state machine
+ * Disconnect reason code
*/
-struct irlap_info {
- __u8 caddr; /* Connection address */
- __u8 control; /* Frame type */
- __u8 cmd;
-
- __u32 saddr;
- __u32 daddr;
-
- int pf; /* Poll/final bit set */
-
- __u8 nr; /* Sequence number of next frame expected */
- __u8 ns; /* Sequence number of frame sent */
-
- int S; /* Number of slots */
- int slot; /* Random chosen slot */
- int s; /* Current slot */
-
- discovery_t *discovery; /* Discovery information */
-};
+typedef enum { /* FIXME check the two first reason codes */
+ LAP_DISC_INDICATION=1, /* Received a disconnect request from peer */
+ LAP_NO_RESPONSE, /* To many retransmits without response */
+ LAP_RESET_INDICATION, /* To many retransmits, or invalid nr/ns */
+ LAP_FOUND_NONE, /* No devices were discovered */
+ LAP_MEDIA_BUSY,
+ LAP_PRIMARY_CONFLICT,
+} LAP_REASON;
extern const char *irlap_state[];
diff --git a/include/net/irda/irlap_frame.h b/include/net/irda/irlap_frame.h
index 99a2a95e6678..94c83bc2c4cc 100644
--- a/include/net/irda/irlap_frame.h
+++ b/include/net/irda/irlap_frame.h
@@ -11,6 +11,7 @@
*
* Copyright (c) 1997-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -35,8 +36,10 @@
#include <linux/skbuff.h>
#include <net/irda/irda.h>
-#include <net/irda/irlap.h>
-#include <net/irda/qos.h>
+
+/* A few forward declarations (to make compiler happy) */
+struct irlap_cb;
+struct discovery_t;
/* Frame types and templates */
#define INVALID 0xff
@@ -80,14 +83,14 @@ struct xid_frame {
__u8 flags; /* Discovery flags */
__u8 slotnr;
__u8 version;
-} PACK;
+} IRDA_PACK;
struct test_frame {
__u8 caddr; /* Connection address */
__u8 control;
__u32 saddr; /* Source device address */
__u32 daddr; /* Destination device address */
-} PACK;
+} IRDA_PACK;
struct ua_frame {
__u8 caddr;
@@ -95,12 +98,12 @@ struct ua_frame {
__u32 saddr; /* Source device address */
__u32 daddr; /* Dest device address */
-} PACK;
+} IRDA_PACK;
struct i_frame {
__u8 caddr;
__u8 control;
-} PACK;
+} IRDA_PACK;
struct snrm_frame {
__u8 caddr;
@@ -108,11 +111,12 @@ struct snrm_frame {
__u32 saddr;
__u32 daddr;
__u8 ncaddr;
-} PACK;
+} IRDA_PACK;
void irlap_queue_xmit(struct irlap_cb *self, struct sk_buff *skb);
void irlap_send_discovery_xid_frame(struct irlap_cb *, int S, __u8 s,
- __u8 command, discovery_t *discovery);
+ __u8 command,
+ struct discovery_t *discovery);
void irlap_send_snrm_frame(struct irlap_cb *, struct qos_info *);
void irlap_send_test_frame(struct irlap_cb *self, __u8 caddr, __u32 daddr,
struct sk_buff *cmd);
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index fdbf5f75ae85..8fcc154e42dd 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -34,7 +34,7 @@
#include <net/irda/irda.h>
#include <net/irda/qos.h>
-#include <net/irda/irlap.h>
+#include <net/irda/irlap.h> /* LAP_MAX_HEADER, ... */
#include <net/irda/irlmp_event.h>
#include <net/irda/irqueue.h>
#include <net/irda/discovery.h>
@@ -91,8 +91,6 @@ typedef struct {
void *priv; /* Used to identify client */
} irlmp_client_t;
-struct lap_cb; /* Forward decl. */
-
/*
* Information about each logical LSAP connection
*/
diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h
index e8af8d3dc676..b056e06c29d1 100644
--- a/include/net/irda/irlmp_event.h
+++ b/include/net/irda/irlmp_event.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1997, 1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,9 +27,11 @@
#ifndef IRLMP_EVENT_H
#define IRLMP_EVENT_H
+/* A few forward declarations (to make compiler happy) */
struct irlmp_cb;
struct lsap_cb;
struct lap_cb;
+struct discovery_t;
/* LAP states */
typedef enum {
@@ -94,7 +96,7 @@ struct irlmp_event {
int reason;
- discovery_t *discovery;
+ struct discovery_t *discovery;
};
extern const char *irlmp_state[];
diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h
index d54720925460..72b446c1e22c 100644
--- a/include/net/irda/irmod.h
+++ b/include/net/irda/irmod.h
@@ -10,7 +10,7 @@
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-2000 Dag Brattli, All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -26,10 +26,70 @@
#ifndef IRMOD_H
#define IRMOD_H
-#include <net/irda/irda.h> /* Notify stuff */
+/* Misc status information */
+typedef enum {
+ STATUS_OK,
+ STATUS_ABORTED,
+ STATUS_NO_ACTIVITY,
+ STATUS_NOISY,
+ STATUS_REMOTE,
+} LINK_STATUS;
-/* Nothing much here anymore - Maybe this header should be merged in
- * another header like net/irda/irda.h... - Jean II */
+typedef enum {
+ LOCK_NO_CHANGE,
+ LOCK_LOCKED,
+ LOCK_UNLOCKED,
+} LOCK_STATUS;
+
+typedef enum { FLOW_STOP, FLOW_START } LOCAL_FLOW;
+
+/*
+ * IrLMP disconnect reasons. The order is very important, since they
+ * correspond to disconnect reasons sent in IrLMP disconnect frames, so
+ * please do not touch :-)
+ */
+typedef enum {
+ LM_USER_REQUEST = 1, /* User request */
+ LM_LAP_DISCONNECT, /* Unexpected IrLAP disconnect */
+ LM_CONNECT_FAILURE, /* Failed to establish IrLAP connection */
+ LM_LAP_RESET, /* IrLAP reset */
+ LM_INIT_DISCONNECT, /* Link Management initiated disconnect */
+ LM_LSAP_NOTCONN, /* Data delivered on unconnected LSAP */
+ LM_NON_RESP_CLIENT, /* Non responsive LM-MUX client */
+ LM_NO_AVAIL_CLIENT, /* No available LM-MUX client */
+ LM_CONN_HALF_OPEN, /* Connection is half open */
+ LM_BAD_SOURCE_ADDR, /* Illegal source address (i.e 0x00) */
+} LM_REASON;
+#define LM_UNKNOWN 0xff /* Unspecified disconnect reason */
+
+/* A few forward declarations (to make compiler happy) */
+struct qos_info; /* in <net/irda/qos.h> */
+
+/*
+ * Notify structure used between transport and link management layers
+ */
+typedef struct {
+ int (*data_indication)(void *priv, void *sap, struct sk_buff *skb);
+ int (*udata_indication)(void *priv, void *sap, struct sk_buff *skb);
+ void (*connect_confirm)(void *instance, void *sap,
+ struct qos_info *qos, __u32 max_sdu_size,
+ __u8 max_header_size, struct sk_buff *skb);
+ void (*connect_indication)(void *instance, void *sap,
+ struct qos_info *qos, __u32 max_sdu_size,
+ __u8 max_header_size, struct sk_buff *skb);
+ void (*disconnect_indication)(void *instance, void *sap,
+ LM_REASON reason, struct sk_buff *);
+ void (*flow_indication)(void *instance, void *sap, LOCAL_FLOW flow);
+ void (*status_indication)(void *instance,
+ LINK_STATUS link, LOCK_STATUS lock);
+ void *instance; /* Layer instance pointer */
+ char name[16]; /* Name of layer */
+} notify_t;
+
+#define NOTIFY_MAX_NAME 16
+
+/* Zero the notify structure */
+void irda_notify_init(notify_t *notify);
/* Locking wrapper - Note the inverted logic on irda_lock().
* Those function basically return false if the lock is already in the
@@ -37,9 +97,6 @@
#define irda_lock(lock) (! test_and_set_bit(0, (void *) (lock)))
#define irda_unlock(lock) (test_and_clear_bit(0, (void *) (lock)))
-/* Zero the notify structure */
-void irda_notify_init(notify_t *notify);
-
#endif /* IRMOD_H */
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h
index c23257ef5559..ef4727f6059b 100644
--- a/include/net/irda/irttp.h
+++ b/include/net/irda/irttp.h
@@ -11,6 +11,7 @@
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -31,8 +32,8 @@
#include <linux/spinlock.h>
#include <net/irda/irda.h>
-#include <net/irda/irlmp.h>
-#include <net/irda/qos.h>
+#include <net/irda/irlmp.h> /* struct lsap_cb */
+#include <net/irda/qos.h> /* struct qos_info */
#include <net/irda/irqueue.h>
#define TTP_MAX_CONNECTIONS LM_MAX_CONNECTIONS
diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h
index ba648b9b9443..84d339480ddc 100644
--- a/include/net/irda/timer.h
+++ b/include/net/irda/timer.h
@@ -11,7 +11,7 @@
*
* Copyright (c) 1997, 1998-1999 Dag Brattli <dagb@cs.uit.no>,
* All Rights Reserved.
- * Copyright (c) 2000-2001 Jean Tourrilhes <jt@hpl.hp.com>
+ * Copyright (c) 2000-2002 Jean Tourrilhes <jt@hpl.hp.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -27,15 +27,17 @@
#ifndef TIMER_H
#define TIMER_H
-#include <linux/netdevice.h>
+#include <linux/timer.h>
#include <asm/param.h> /* for HZ */
#include <net/irda/irda.h>
-#include <net/irda/irmod.h>
-#include <net/irda/irlap.h>
-#include <net/irda/irlmp.h>
-#include <net/irda/irda_device.h>
+
+/* A few forward declarations (to make compiler happy) */
+struct irlmp_cb;
+struct irlap_cb;
+struct lsap_cb;
+struct lap_cb;
/*
* Timeout definitions, some defined in IrLAP p. 92
@@ -81,8 +83,6 @@ inline void irlap_start_backoff_timer(struct irlap_cb *self, int timeout);
void irlap_start_mbusy_timer(struct irlap_cb *self, int timeout);
void irlap_stop_mbusy_timer(struct irlap_cb *);
-struct lsap_cb;
-struct lap_cb;
inline void irlmp_start_watchdog_timer(struct lsap_cb *, int timeout);
inline void irlmp_start_discovery_timer(struct irlmp_cb *, int timeout);
inline void irlmp_start_idle_timer(struct lap_cb *, int timeout);
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h
index 5dc0b0d16d90..47774e0ab0e4 100644
--- a/include/net/irda/wrapper.h
+++ b/include/net/irda/wrapper.h
@@ -30,7 +30,7 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
-#include <net/irda/irda_device.h>
+#include <net/irda/irda_device.h> /* iobuff_t */
#define BOF 0xc0 /* Beginning of frame */
#define XBOF 0xff
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 7e93b7abfa55..29856ae3ec5a 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -118,6 +118,15 @@
#define AC97_AD_SERIAL_CFG 0x74 /* Serial Configuration */
#define AC97_AD_MISC 0x76 /* Misc Control Bits */
+/* specific - Cirrus Logic */
+#define AC97_CSR_ACMODE 0x5e /* AC Mode Register */
+#define AC97_CSR_MISC_CRYSTAL 0x60 /* Misc Crystal Control */
+#define AC97_CSR_SPDIF 0x68 /* S/PDIF Register */
+#define AC97_CSR_SERIAL 0x6a /* Serial Port Control */
+#define AC97_CSR_SPECF_ADDR 0x6c /* Special Feature Address */
+#define AC97_CSR_SPECF_DATA 0x6e /* Special Feature Data */
+#define AC97_CSR_BDI_STATUS 0x7a /* BDI Status */
+
/* ac97->scaps */
#define AC97_SCAP_SURROUND_DAC (1<<0) /* surround L&R DACs are present */
#define AC97_SCAP_CENTER_LFE_DAC (1<<1) /* center and LFE DACs are present */
@@ -160,7 +169,7 @@ struct _snd_ac97 {
unsigned int rates_mic_adc;
unsigned int spdif_status;
unsigned short regs[0x80]; /* register cache */
- bitmap_member(reg_accessed, 0x80); /* bit flags */
+ bitmap_member(reg_accessed,0x80); /* bit flags */
union { /* vendor specific code */
struct {
unsigned short unchained[3]; // 0 = C34, 1 = C79, 2 = C69
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 8ea3e38a656b..a9133aaa887e 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -602,7 +602,8 @@ enum sndrv_ctl_elem_type {
SNDRV_CTL_ELEM_TYPE_ENUMERATED, /* enumerated type */
SNDRV_CTL_ELEM_TYPE_BYTES, /* byte array */
SNDRV_CTL_ELEM_TYPE_IEC958, /* IEC958 (S/PDIF) setup */
- SNDRV_CTL_ELEM_TYPE_LAST = SNDRV_CTL_ELEM_TYPE_IEC958,
+ SNDRV_CTL_ELEM_TYPE_INTEGER64, /* 64-bit integer type */
+ SNDRV_CTL_ELEM_TYPE_LAST = SNDRV_CTL_ELEM_TYPE_INTEGER64,
};
enum sndrv_ctl_elem_iface {
@@ -664,6 +665,11 @@ struct sndrv_ctl_elem_info {
long step; /* R: step (0 variable) */
} integer;
struct {
+ long long min; /* R: minimum value */
+ long long max; /* R: maximum value */
+ long long step; /* R: step (0 variable) */
+ } integer64;
+ struct {
unsigned int items; /* R: number of items */
unsigned int item; /* W: item number */
char name[64]; /* R: value name */
@@ -682,6 +688,10 @@ struct sndrv_ctl_elem_value {
long *value_ptr;
} integer;
union {
+ long long value[64];
+ long long *value_ptr;
+ } integer64;
+ union {
unsigned int item[128];
unsigned int *item_ptr;
} enumerated;
diff --git a/include/sound/core.h b/include/sound/core.h
index 9b2942df961a..0e2285d86b4a 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -103,7 +103,7 @@ typedef struct _snd_kcontrol snd_kcontrol_t;
typedef struct _snd_timer snd_timer_t;
typedef struct _snd_timer_instance snd_timer_instance_t;
typedef struct _snd_hwdep snd_hwdep_t;
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
typedef struct _snd_oss_mixer snd_mixer_oss_t;
#endif
@@ -145,7 +145,7 @@ struct _snd_card {
wait_queue_head_t power_sleep;
#endif
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
snd_mixer_oss_t *mixer_oss;
int mixer_oss_change_count;
#endif
@@ -251,16 +251,22 @@ char *snd_kmalloc_strdup(const char *string, int flags);
void *snd_malloc_pages(unsigned long size, unsigned int dma_flags);
void *snd_malloc_pages_fallback(unsigned long size, unsigned int dma_flags, unsigned long *res_size);
void snd_free_pages(void *ptr, unsigned long size);
-#ifdef CONFIG_ISA
-void *snd_malloc_isa_pages(unsigned long size, dma_addr_t *dma_addr);
-void *snd_malloc_isa_pages_fallback(unsigned long size, dma_addr_t *dma_addr, unsigned long *res_size);
-#define snd_free_isa_pages(size, ptr, dma_addr) snd_free_pages(ptr, size)
-#endif
#ifdef CONFIG_PCI
void *snd_malloc_pci_pages(struct pci_dev *pci, unsigned long size, dma_addr_t *dma_addr);
void *snd_malloc_pci_pages_fallback(struct pci_dev *pci, unsigned long size, dma_addr_t *dma_addr, unsigned long *res_size);
void snd_free_pci_pages(struct pci_dev *pci, unsigned long size, void *ptr, dma_addr_t dma_addr);
#endif
+#ifdef CONFIG_ISA
+#ifdef CONFIG_PCI
+#define snd_malloc_isa_pages(size, dma_addr) snd_malloc_pci_pages(NULL, size, dma_addr)
+#define snd_malloc_isa_pages_fallback(size, dma_addr, res_size) snd_malloc_pci_pages_fallback(NULL, size, dma_addr, res_size)
+#define snd_free_isa_pages(size, ptr, dma_addr) snd_free_pci_pages(NULL, size, ptr, dma_addr)
+#else /* !CONFIG_PCI */
+void *snd_malloc_isa_pages(unsigned long size, dma_addr_t *dma_addr);
+void *snd_malloc_isa_pages_fallback(unsigned long size, dma_addr_t *dma_addr, unsigned long *res_size);
+#define snd_free_isa_pages(size, ptr, dma_addr) snd_free_pages(ptr, size)
+#endif /* CONFIG_PCI */
+#endif /* CONFIG_ISA */
int copy_to_user_fromio(void *dst, unsigned long src, size_t count);
int copy_from_user_toio(unsigned long dst, const void *src, size_t count);
@@ -269,7 +275,7 @@ int copy_from_user_toio(unsigned long dst, const void *src, size_t count);
extern int snd_cards_count;
extern snd_card_t *snd_cards[SNDRV_CARDS];
extern rwlock_t snd_card_rwlock;
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
extern int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int free_flag);
#endif
diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index f0ebd7bc8c73..d2704f8301d1 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1295,16 +1295,16 @@ typedef struct {
typedef struct {
char name[128];
- unsigned int gpr_valid[0x100/32]; /* bitmask of valid initializers */
+ unsigned long gpr_valid[0x100/(sizeof(unsigned long)*8)]; /* bitmask of valid initializers */
unsigned int gpr_map[0x100]; /* initializers */
unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */
emu10k1_fx8010_control_gpr_t *gpr_add_controls; /* GPR controls to add/replace */
unsigned int gpr_del_control_count; /* count of GPR controls to remove */
snd_ctl_elem_id_t *gpr_del_controls; /* IDs of GPR controls to remove */
- unsigned int tram_valid[0xa0/32]; /* bitmask of valid initializers */
+ unsigned long tram_valid[0xa0/(sizeof(unsigned long)*8)]; /* bitmask of valid initializers */
unsigned int tram_data_map[0xa0]; /* data initializers */
unsigned int tram_addr_map[0xa0]; /* map initializers */
- unsigned int code_valid[512/32]; /* bitmask of valid instructions */
+ unsigned long code_valid[512/(sizeof(unsigned long)*8)]; /* bitmask of valid instructions */
unsigned int code[512][2]; /* one instruction - 64 bits */
} emu10k1_fx8010_code_t;
diff --git a/include/sound/emu8000.h b/include/sound/emu8000.h
index 78d84750db2e..46bce92c2599 100644
--- a/include/sound/emu8000.h
+++ b/include/sound/emu8000.h
@@ -36,6 +36,8 @@
#define EMU8000_RAM_READ 0
#define EMU8000_RAM_WRITE 1
#define EMU8000_RAM_CLOSE 2
+#define EMU8000_RAM_MODE_MASK 0x03
+#define EMU8000_RAM_RIGHT 0x10 /* use 'right' DMA channel */
enum {
EMU8000_CONTROL_BASS = 0,
@@ -87,6 +89,8 @@ typedef struct snd_emu8000 {
spinlock_t control_lock;
snd_kcontrol_t *controls[EMU8000_NUM_CONTROLS];
+ snd_pcm_t *pcm; /* pcm on emu8000 wavetable */
+
} emu8000_t;
/* sequencer device id */
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h
index 09ce125b782a..2b30fcf2ff95 100644
--- a/include/sound/emux_synth.h
+++ b/include/sound/emux_synth.h
@@ -25,7 +25,7 @@
#include "seq_device.h"
#include "soundfont.h"
#include "seq_midi_emul.h"
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
#include "seq_oss.h"
#endif
#include "emux_legacy.h"
@@ -65,7 +65,7 @@ typedef struct snd_emux_operators {
void (*sample_reset)(snd_emux_t *emu);
int (*load_fx)(snd_emux_t *emu, int type, int arg, const void *data, long count);
void (*sysex)(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
int (*oss_ioctl)(snd_emux_t *emu, int cmd, int p1, int p2);
#endif
} snd_emux_operators_t;
@@ -102,6 +102,7 @@ struct snd_emux {
unsigned long flags; /* other conditions */
int midi_ports; /* number of virtual midi devices */
int midi_devidx; /* device offset of virtual midi */
+ unsigned int linear_panning: 1; /* panning is linear (sbawe = 1, emu10k1 = 0) */
/* private */
int num_voices; /* current number of voices */
@@ -124,7 +125,7 @@ struct snd_emux {
snd_info_entry_t *proc;
#endif
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
snd_seq_device_t *oss_synth;
#endif
};
@@ -145,7 +146,7 @@ struct snd_emux_port {
#ifdef SNDRV_EMUX_USE_RAW_EFFECT
snd_emux_effect_table_t *effect;
#endif
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
snd_seq_oss_arg_t *oss_arg;
#endif
};
diff --git a/include/sound/mixer_oss.h b/include/sound/mixer_oss.h
index 6153255f0b5b..f3179dcef4d4 100644
--- a/include/sound/mixer_oss.h
+++ b/include/sound/mixer_oss.h
@@ -22,7 +22,7 @@
*
*/
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
typedef struct _snd_oss_mixer_slot snd_mixer_oss_slot_t;
typedef struct _snd_oss_file snd_mixer_oss_file_t;
@@ -66,6 +66,6 @@ struct _snd_oss_file {
snd_mixer_oss_t *mixer;
};
-#endif /* CONFIG_SND_OSSEMUL */
+#endif /* CONFIG_SND_MIXER_OSS */
#endif /* __SOUND_MIXER_OSS_H */
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index c3c6218aac71..5767a141869a 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -57,7 +57,7 @@
#include "hwdep.h"
#include "timer.h"
#include "seq_midi_emul.h"
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
#include "seq_oss.h"
#include "seq_oss_legacy.h"
#endif
@@ -287,7 +287,7 @@ struct snd_opl3 {
snd_seq_device_t *seq_dev; /* sequencer device */
snd_midi_channel_set_t * chset;
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef CONFIG_SND_SEQUENCER_OSS
snd_seq_device_t *oss_seq_dev; /* OSS sequencer device, WIP */
snd_midi_channel_set_t * oss_chset;
#endif
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 09653070905e..2bdb856e7606 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -57,7 +57,7 @@ typedef struct sndrv_pcm_mmap_control snd_pcm_mmap_control_t;
typedef struct _snd_pcm_file snd_pcm_file_t;
typedef struct _snd_pcm_runtime snd_pcm_runtime_t;
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
#include "pcm_oss.h"
#endif
@@ -339,7 +339,7 @@ struct _snd_pcm_runtime {
dma_addr_t dma_addr; /* physical bus address (not accessible from main CPU) */
unsigned long dma_bytes; /* size of DMA area */
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
snd_pcm_oss_runtime_t oss;
#endif
@@ -373,7 +373,7 @@ struct _snd_pcm_substream {
snd_pcm_substream_t *link_prev;
snd_pcm_file_t *file;
struct file *ffile;
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
snd_pcm_oss_substream_t oss;
#endif
@@ -385,7 +385,7 @@ struct _snd_pcm_substream {
snd_info_entry_t *proc_prealloc_entry;
};
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL || ((substream)->oss.file != NULL))
#else
#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL)
@@ -399,7 +399,7 @@ struct _snd_pcm_str {
unsigned int substream_count;
unsigned int substream_opened;
snd_pcm_substream_t *substream;
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
snd_pcm_oss_stream_t oss;
#endif
@@ -422,7 +422,7 @@ struct _snd_pcm {
wait_queue_head_t open_wait;
void *private_data;
void (*private_free) (snd_pcm_t *pcm);
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
snd_pcm_oss_t oss;
#endif
};
@@ -776,7 +776,9 @@ u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format);
int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
-
+const char *snd_pcm_format_name(snd_pcm_format_t format);
+const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat);
+
void snd_pcm_set_ops(snd_pcm_t * pcm, int direction, snd_pcm_ops_t *ops);
void snd_pcm_set_sync(snd_pcm_substream_t * substream);
int snd_pcm_lib_interleave_len(snd_pcm_substream_t *substream);
diff --git a/include/sound/soundfont.h b/include/sound/soundfont.h
index 3ce75f8b1add..a5c68cf7275d 100644
--- a/include/sound/soundfont.h
+++ b/include/sound/soundfont.h
@@ -125,6 +125,7 @@ int snd_sf_calc_parm_attack(int msec);
int snd_sf_calc_parm_decay(int msec);
#define snd_sf_calc_parm_delay(msec) (0x8000 - (msec) * 1000 / 725);
extern int snd_sf_vol_table[128];
+int snd_sf_linear_to_log(unsigned int amount, int offset, int ratio);
#endif /* __SOUND_SOUNDFONT_H */
diff --git a/include/sound/timer.h b/include/sound/timer.h
index 15dd5d0fbd2d..62df3ec5888b 100644
--- a/include/sound/timer.h
+++ b/include/sound/timer.h
@@ -128,6 +128,7 @@ extern int snd_timer_set_resolution(snd_timer_instance_t * timeri, unsigned long
extern unsigned long snd_timer_resolution(snd_timer_instance_t * timeri);
extern int snd_timer_start(snd_timer_instance_t * timeri, unsigned int ticks);
extern int snd_timer_stop(snd_timer_instance_t * timeri);
+extern int snd_timer_del(snd_timer_instance_t * timeri);
extern int snd_timer_continue(snd_timer_instance_t * timeri);
extern void snd_timer_interrupt(snd_timer_t * timer, unsigned long ticks_left);
diff --git a/include/sound/version.h b/include/sound/version.h
index 05e4f4e5c79d..8c566b8e2bd0 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
/* include/version.h. Generated automatically by configure. */
-#define CONFIG_SND_VERSION "0.9.0rc1"
-#define CONFIG_SND_DATE " (Mon Apr 29 06:46:09 2002 UTC)"
+#define CONFIG_SND_VERSION "0.9.0rc2"
+#define CONFIG_SND_DATE " (Wed Jun 19 08:56:25 2002 UTC)"
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index 113f8a25a5de..9a8672a5c174 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -264,9 +264,9 @@ struct _snd_ymfpci_pcm {
snd_ymfpci_pcm_type_t type;
snd_pcm_substream_t *substream;
ymfpci_voice_t *voices[2]; /* playback only */
- int running: 1,
- spdif: 1,
- mode4ch : 1;
+ int running: 1;
+ int output_front: 1;
+ int output_rear: 1;
u32 period_size; /* cached from runtime->period_size */
u32 buffer_size; /* cached from runtime->buffer_size */
u32 period_pos;
@@ -333,6 +333,9 @@ struct _snd_ymfpci {
snd_kcontrol_t *ctl_vol_spdifrec;
unsigned short spdif_bits, spdif_pcm_bits;
snd_kcontrol_t *spdif_pcm_ctl;
+ int mode_dup4ch;
+ int rear_opened;
+ int spdif_opened;
spinlock_t reg_lock;
spinlock_t voice_lock;