Commit cf8d19a7 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://ldm.bkbits.net/linux-2.5-core

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents 24fbb994 682d5fea
......@@ -73,6 +73,13 @@ add the following line to /etc/modules.conf:
alias des3_ede des
The Null algorithms reside in the crypto_null module, so these lines
should also be added:
alias cipher_null crypto_null
alias digest_null crypto_null
alias compress_null crypto_null
DEVELOPER NOTES
......
......@@ -164,12 +164,23 @@ static void __init init_amd(struct cpuinfo_x86 *c)
set_bit(X86_FEATURE_XMM, c->x86_capability);
}
}
break;
/* It's been determined by AMD that Athlons since model 8 stepping 1
* are more robust with CLK_CTL set to 200xxxxx instead of 600xxxxx
* As per AMD technical note 27212 0.2
*/
if ((c->x86_model == 8 && c->x86_mask>=1) || (c->x86_model > 8)) {
rdmsr(MSR_K7_CLK_CTL, l, h);
if ((l & 0xfff00000) != 0x20000000) {
printk ("CPU: CLK_CTL MSR was %x. Reprogramming to %x\n", l,
((l & 0x000fffff)|0x20000000));
wrmsr(MSR_K7_CLK_CTL, (l & 0x000fffff)|0x20000000, h);
}
}
break;
}
display_cacheinfo(c);
// return r;
}
static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
......
......@@ -170,10 +170,8 @@ ENTRY(lcall27)
ENTRY(ret_from_fork)
#if CONFIG_SMP || CONFIG_PREEMPT
# NOTE: this function takes a parameter but it's unused on x86.
call schedule_tail
#endif
GET_THREAD_INFO(%ebx)
jmp syscall_exit
......
......@@ -226,7 +226,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.eflags = 0x286;
/* Ok, create the new process.. */
p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL);
p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
......@@ -288,7 +288,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
struct_cpy(childregs, regs);
childregs->eax = 0;
childregs->esp = esp;
p->user_tid = NULL;
p->set_child_tid = p->clear_child_tid = NULL;
p->thread.esp = (unsigned long) childregs;
p->thread.esp0 = (unsigned long) (childregs+1);
......@@ -503,7 +503,7 @@ asmlinkage int sys_fork(struct pt_regs regs)
{
struct task_struct *p;
p = do_fork(SIGCHLD, regs.esp, &regs, 0, NULL);
p = do_fork(SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
......@@ -512,14 +512,15 @@ asmlinkage int sys_clone(struct pt_regs regs)
struct task_struct *p;
unsigned long clone_flags;
unsigned long newsp;
int *user_tid;
int *parent_tidptr, *child_tidptr;
clone_flags = regs.ebx;
newsp = regs.ecx;
user_tid = (int *)regs.edx;
parent_tidptr = (int *)regs.edx;
child_tidptr = (int *)regs.edi;
if (!newsp)
newsp = regs.esp;
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, user_tid);
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, parent_tidptr, child_tidptr);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
......@@ -537,7 +538,7 @@ asmlinkage int sys_vfork(struct pt_regs regs)
{
struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL);
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid;
}
......
......@@ -499,7 +499,7 @@ static struct task_struct * __init fork_by_hand(void)
* don't care about the eip and regs settings since
* we'll never reschedule the forked task.
*/
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL);
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
}
/* which physical APIC ID maps to which logical CPU number */
......
......@@ -56,8 +56,8 @@ sys_call_table:
/*175*/ .long sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
/*180*/ .long sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_sigpending, sys_ni_syscall
/*185*/ .long sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sys_newuname
/*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_nis_syscall, sys_nis_syscall
/*195*/ .long sys_nis_syscall, sys_nis_syscall, sys_getppid, sparc_sigaction, sys_sgetmask
/*190*/ .long sys_init_module, sys_personality, sparc_remap_file_pages, sys_epoll_create, sys_epoll_ctl
/*195*/ .long sys_epoll_wait, sys_nis_syscall, sys_getppid, sparc_sigaction, sys_sgetmask
/*200*/ .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir
/*205*/ .long sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_nis_syscall
/*210*/ .long sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys_sysinfo
......
......@@ -33,7 +33,7 @@ AS := $(AS) -64
LDFLAGS := -m elf64_sparc
LDFLAGS_BLOB := --format binary --oformat elf64-sparc
endif
ELFTOAOUT = elftoaout
ifneq ($(UNDECLARED_REGS),y)
CC_UNDECL =
else
......@@ -63,13 +63,11 @@ core-$(CONFIG_SOLARIS_EMUL) += arch/sparc64/solaris/
core-y += arch/sparc64/math-emu/
libs-y += arch/sparc64/prom/ arch/sparc64/lib/
vmlinux.aout: vmlinux
$(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/sparc64/boot $(1)
archclean:
rm -f $(TOPDIR)/vmlinux.aout
tftpboot.img vmlinux.aout:
$(call makeboot,arch/sparc64/boot/$@)
archmrproper:
archclean:
tftpboot.img:
$(MAKE) -C arch/sparc64/boot tftpboot.img
......@@ -4,17 +4,27 @@
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
# Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
ROOT_IMG =/usr/src/root.img
ELFTOAOUT =elftoaout
ROOT_IMG := /usr/src/root.img
ELFTOAOUT := elftoaout
all: boot
host-progs := piggyback
EXTRA_TARGETS := tftpboot.img vmlinux.aout
boot:
@echo "Nothing special to be done for 'boot' on Linux/UltraSPARC."
quiet_cmd_elftoaout = ELT2AOUT $@
cmd_elftoaout = $(ELFTOAOUT) vmlinux -o $@
quiet_cmd_piggy = PIGGY $@
cmd_piggy = $(obj)/piggyback $@ System.map $(ROOT_IMG)
tftpboot.img: piggyback $(TOPDIR)/vmlinux $(ROOT_IMG)
$(ELFTOAOUT) $(TOPDIR)/vmlinux -o tftpboot.img
./piggyback tftpboot.img $(TOPDIR)/System.map $(ROOT_IMG)
$(obj)/tftpboot.img: $(obj)/piggyback System.map vmlinux $(ROOT_IMG) FORCE
$(call if_changed,elftoaout)
$(call if_changed,piggy)
@echo ' kernel: $@ is ready'
piggyback: piggyback.c
$(HOSTCC) $(HOSTCFLAGS) -o piggyback piggyback.c
$(obj)/vmlinux.aout: vmlinux FORCE
$(call if_changed,elftoaout)
@echo ' kernel: $@ is ready'
archhelp:
@echo '* vmlinux - Standard sparc64 kernel'
@echo ' vmlinux.aout - a.out kernel for sparc64'
@echo ' tftpboot.img - Image prepared for tftp'
......@@ -2,8 +2,6 @@
# Makefile for the linux kernel.
#
SH = $(CONFIG_SHELL)
EXTRA_AFLAGS := -ansi
EXTRA_TARGETS := head.o init_task.o
......
......@@ -57,8 +57,8 @@ sys_call_table32:
.word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
/*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys32_sigpending, sys_ni_syscall
.word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sparc64_newuname
/*190*/ .word sys32_init_module, sparc64_personality, sys_remap_file_pages, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_nis_syscall, sys_getppid, sys32_sigaction, sys_sgetmask
/*190*/ .word sys32_init_module, sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl
.word sys_epoll_wait, sys_nis_syscall, sys_getppid, sys32_sigaction, sys_sgetmask
/*200*/ .word sys_ssetmask, sys_sigsuspend, sys32_newlstat, sys_uselib, old32_readdir
.word sys32_readahead, sys32_socketcall, sys_syslog, sys_lookup_dcookie, sys_nis_syscall
/*210*/ .word sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys32_sysinfo
......@@ -116,8 +116,8 @@ sys_call_table:
.word sys_setsid, sys_fchdir, sys_fgetxattr, sys_listxattr, sys_llistxattr
/*180*/ .word sys_flistxattr, sys_removexattr, sys_lremovexattr, sys_nis_syscall, sys_ni_syscall
.word sys_setpgid, sys_fremovexattr, sys_tkill, sys_exit_group, sparc64_newuname
/*190*/ .word sys_init_module, sparc64_personality, sys_remap_file_pages, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_nis_syscall, sys_getppid, sys_nis_syscall, sys_sgetmask
/*190*/ .word sys_init_module, sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl
.word sys_epoll_wait, sys_nis_syscall, sys_getppid, sys_nis_syscall, sys_sgetmask
/*200*/ .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall
.word sys_readahead, sys_socketcall, sys_syslog, sys_lookup_dcookie, sys_nis_syscall
/*210*/ .word sys_nis_syscall, sys_nis_syscall, sys_waitpid, sys_swapoff, sys_sysinfo
......
......@@ -11,5 +11,3 @@ obj-y := PeeCeeI.o blockops.o debuglocks.o strlen.o strncmp.o \
VIScsumcopyusr.o VISsave.o atomic.o rwlock.o bitops.o \
dec_and_lock.o U3memcpy.o U3copy_from_user.o U3copy_to_user.o \
U3copy_in_user.o mcount.o ipcsum.o
include $(TOPDIR)/Rules.make
......@@ -4,6 +4,4 @@
obj-y := math.o
EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
include $(TOPDIR)/Rules.make
EXTRA_CFLAGS = -I. -Iinclude/math-emu -w
......@@ -7,5 +7,3 @@ EXTRA_AFLAGS := -ansi
obj-y := ultra.o fault.o init.o generic.o extable.o
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
include $(TOPDIR)/Rules.make
......@@ -8,5 +8,3 @@ EXTRA_AFLAGS := -ansi
L_TARGET = lib.a
obj-y := bootstr.o devops.o init.o memory.o misc.o \
tree.o console.o printf.o p1275.o map.o
include $(TOPDIR)/Rules.make
......@@ -8,5 +8,3 @@ solaris-objs := entry64.o fs.o misc.o signal.o systbl.o socket.o \
ioctl.o ipc.o socksys.o timod.o
obj-$(CONFIG_SOLARIS_EMUL) += solaris.o
include $(TOPDIR)/Rules.make
......@@ -24,6 +24,8 @@ SECTIONS
CONSTRUCTORS
}
.data1 : { *(.data1) }
. = ALIGN(64);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
_edata = .;
PROVIDE (edata = .);
.fixup : { *(.fixup) }
......@@ -70,8 +72,6 @@ SECTIONS
__per_cpu_end = .;
. = ALIGN(8192);
__init_end = .;
. = ALIGN(64);
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
__bss_start = .;
.sbss : { *(.sbss) *(.scommon) }
.bss :
......
......@@ -16,6 +16,12 @@ config CRYPTO_HMAC
HMAC: Keyed-Hashing for Message Authentication (RFC2104).
This is required for IPSec.
config CRYPTO_NULL
tristate "Null algorithms"
depends on CRYPTO
help
These are 'Null' algorithms, used by IPsec, which do nothing.
config CRYPTO_MD4
tristate "MD4 digest algorithm"
depends on CRYPTO
......
......@@ -9,6 +9,7 @@ autoload-crypto-$(CONFIG_KMOD) = autoload.o
obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o $(autoload-crypto-y)
obj-$(CONFIG_CRYPTO_HMAC) += hmac.o
obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o
obj-$(CONFIG_CRYPTO_MD4) += md4.o
obj-$(CONFIG_CRYPTO_MD5) += md5.o
obj-$(CONFIG_CRYPTO_SHA1) += sha1.o
......
......@@ -63,7 +63,7 @@ static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags)
case CRYPTO_ALG_TYPE_DIGEST:
return crypto_init_digest_flags(tfm, flags);
case CRYPTO_ALG_TYPE_COMP:
case CRYPTO_ALG_TYPE_COMPRESS:
return crypto_init_compress_flags(tfm, flags);
default:
......@@ -83,7 +83,7 @@ static int crypto_init_ops(struct crypto_tfm *tfm)
case CRYPTO_ALG_TYPE_DIGEST:
return crypto_init_digest_ops(tfm);
case CRYPTO_ALG_TYPE_COMP:
case CRYPTO_ALG_TYPE_COMPRESS:
return crypto_init_compress_ops(tfm);
default:
......@@ -105,7 +105,7 @@ static void crypto_exit_ops(struct crypto_tfm *tfm)
crypto_exit_digest_ops(tfm);
break;
case CRYPTO_ALG_TYPE_COMP:
case CRYPTO_ALG_TYPE_COMPRESS:
crypto_exit_compress_ops(tfm);
break;
......@@ -129,8 +129,6 @@ struct crypto_tfm *crypto_alloc_tfm(const char *name, u32 flags)
goto out_put;
memset(tfm, 0, sizeof(*tfm));
memset(tfm, 0, sizeof(*tfm));
if (alg->cra_ctxsize) {
tfm->crt_ctx = kmalloc(alg->cra_ctxsize, GFP_KERNEL);
......
......@@ -18,15 +18,15 @@
#include <linux/string.h>
#include "internal.h"
/*
* This code currently implements blazingly fast and
* lossless Quadruple ROT13 compression.
*/
static void crypto_compress(struct crypto_tfm *tfm)
{ }
{
tfm->__crt_alg->cra_compress.coa_compress();
}
static void crypto_decompress(struct crypto_tfm *tfm)
{ }
{
tfm->__crt_alg->cra_compress.coa_decompress();
}
int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags)
{
......
/*
* Cryptographic API.
*
* Null algorithms, aka Much Ado About Nothing.
*
* These are needed for IPsec, and may be useful in general for
* testing & debugging.
*
* The null cipher is compliant with RFC2410.
*
* Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
*
* 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.
*
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <asm/scatterlist.h>
#include <linux/crypto.h>
#define NULL_KEY_SIZE 0
#define NULL_BLOCK_SIZE 1
#define NULL_DIGEST_SIZE 0
static void null_compress(void)
{ }
static void null_decompress(void)
{ }
static void null_init(void *ctx)
{ }
static void null_update(void *ctx, const u8 *data, unsigned int len)
{ }
static void null_final(void *ctx, u8 *out)
{ }
static int null_setkey(void *ctx, const u8 *key,
unsigned int keylen, u32 *flags)
{ return 0; }
static void null_encrypt(void *ctx, u8 *dst, const u8 *src)
{ }
static void null_decrypt(void *ctx, u8 *dst, const u8 *src)
{ }
static struct crypto_alg compress_null = {
.cra_name = "compress_null",
.cra_flags = CRYPTO_ALG_TYPE_COMPRESS,
.cra_blocksize = NULL_BLOCK_SIZE,
.cra_ctxsize = 0,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(compress_null.cra_list),
.cra_u = { .compress = {
.coa_compress = null_compress,
.coa_decompress = null_decompress } }
};
static struct crypto_alg digest_null = {
.cra_name = "digest_null",
.cra_flags = CRYPTO_ALG_TYPE_DIGEST,
.cra_blocksize = NULL_BLOCK_SIZE,
.cra_ctxsize = 0,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(digest_null.cra_list),
.cra_u = { .digest = {
.dia_digestsize = NULL_DIGEST_SIZE,
.dia_init = null_init,
.dia_update = null_update,
.dia_final = null_final } }
};
static struct crypto_alg cipher_null = {
.cra_name = "cipher_null",
.cra_flags = CRYPTO_ALG_TYPE_CIPHER,
.cra_blocksize = NULL_BLOCK_SIZE,
.cra_ctxsize = 0,
.cra_module = THIS_MODULE,
.cra_list = LIST_HEAD_INIT(cipher_null.cra_list),
.cra_u = { .cipher = {
.cia_min_keysize = NULL_KEY_SIZE,
.cia_max_keysize = NULL_KEY_SIZE,
.cia_ivsize = 0,
.cia_setkey = null_setkey,
.cia_encrypt = null_encrypt,
.cia_decrypt = null_decrypt } }
};
static int __init init(void)
{
int ret = 0;
ret = crypto_register_alg(&cipher_null);
if (ret < 0)
goto out;
ret = crypto_register_alg(&digest_null);
if (ret < 0) {
crypto_unregister_alg(&cipher_null);
goto out;
}
ret = crypto_register_alg(&compress_null);
if (ret < 0) {
crypto_unregister_alg(&digest_null);
crypto_unregister_alg(&cipher_null);
goto out;
}
out:
return ret;
}
static void __exit fini(void)
{
crypto_unregister_alg(&compress_null);
crypto_unregister_alg(&digest_null);
crypto_unregister_alg(&cipher_null);
}
module_init(init);
module_exit(fini);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Null Cryptographic Algorithms");
......@@ -377,6 +377,7 @@ static ssize_t write_null(struct file * file, const char * buf,
return count;
}
#ifdef CONFIG_MMU
/*
* For fun, we are using the MMU for this.
*/
......@@ -476,6 +477,29 @@ static int mmap_zero(struct file * file, struct vm_area_struct * vma)
return -EAGAIN;
return 0;
}
#else /* CONFIG_MMU */
static ssize_t read_zero(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
unsigned long left;
if (!count)
return 0;
for (left = count; left > 0; left--, buf++) {
if (put_user(0, buf))
return -EFAULT;
cond_resched();
}
return count;
}
static int mmap_zero(struct file * file, struct vm_area_struct * vma)
{
return -ENOSYS;
}
#endif /* CONFIG_MMU */
static ssize_t write_full(struct file * file, const char * buf,
size_t count, loff_t *ppos)
......
......@@ -26,9 +26,10 @@
/* Uncomment the following if you want verbose error reports. */
/* #define VERBOSE_ERRORS */
#include <linux/blk.h>
#include <linux/errno.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/fs.h>
#include <linux/kernel.h>
......@@ -45,7 +46,6 @@
#include <asm/system.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/blk.h>
#ifdef __arm__
#undef HD_IRQ
......
......@@ -35,14 +35,15 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/irq.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_DESCRIPTION("Logitech busmouse driver");
......
......@@ -37,6 +37,7 @@
#include <linux/ioport.h>
#include <linux/input.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <asm/io.h>
#include <asm/irq.h>
......
......@@ -27,14 +27,16 @@
#include <linux/i2o.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <asm/io.h>
#ifdef CONFIG_MTRR
#include <asm/mtrr.h>
#endif // CONFIG_MTRR
static int dpt = 0;
static int dpt;
/**
......
......@@ -110,7 +110,6 @@ static const char version[] =
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/fcntl.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
......
......@@ -42,9 +42,7 @@ static const char version[] =
DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Donald Becker (becker@scyld.com)\n";
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/delay.h>
......
......@@ -97,9 +97,7 @@
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
......
......@@ -32,9 +32,6 @@
static const char version[] =
DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Donald Becker (becker@scyld.com)\n";
#include <linux/module.h>
/*
Sources:
This driver wouldn't have been written with the availability of the
......@@ -46,8 +43,8 @@ static const char version[] =
info that the casual reader might think that it documents the i82586 :-<.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
......@@ -56,20 +53,18 @@ static const char version[] =
#include <linux/string.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <asm/bitops.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/uaccess.h>
/* use 0 for production, 1 for verification, 2..7 for debug */
#ifndef NET_DEBUG
......
......@@ -68,10 +68,8 @@ static int max_interrupt_work = 10;
#include <linux/config.h>
#include <linux/module.h>
#include <linux/mca.h>
#include <linux/isapnp.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
......@@ -81,6 +79,7 @@ static int max_interrupt_work = 10;
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/pm.h>
#include <linux/skbuff.h>
#include <linux/delay.h> /* for udelay() */
#include <linux/spinlock.h>
......@@ -90,7 +89,6 @@ static int max_interrupt_work = 10;
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/pm.h>
static char versionA[] __initdata = DRV_NAME ".c:" DRV_VERSION " " DRV_RELDATE " becker@scyld.com\n";
static char versionB[] __initdata = "http://www.scyld.com/network/3c509.html\n";
......
......@@ -62,14 +62,15 @@ static int max_interrupt_work = 20;
#include <linux/module.h>
#include <linux/version.h>
#include <linux/isapnp.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/netdevice.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/in.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/skbuff.h>
#include <linux/etherdevice.h>
#include <linux/interrupt.h>
#include <linux/timer.h>
#include <linux/ethtool.h>
......@@ -79,10 +80,6 @@ static int max_interrupt_work = 20;
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#define NEW_MULTICAST
#include <linux/delay.h>
......
......@@ -90,12 +90,15 @@
#define DRV_NAME "3c523"
#define DRV_VERSION "17-Nov-2001"
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
......@@ -107,11 +110,6 @@
#include <asm/bitops.h>
#include <asm/io.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include "3c523.h"
/*************************************************************************/
......
......@@ -83,16 +83,22 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Proctor (rnp@netlink.co.nz
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/if_ether.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/mca.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <linux/ethtool.h>
#include <asm/uaccess.h>
......@@ -100,13 +106,6 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Richard Proctor (rnp@netlink.co.nz
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include "3c527.h"
......
......@@ -244,7 +244,6 @@ static int vortex_debug = 1;
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
......@@ -260,6 +259,7 @@ static int vortex_debug = 1;
#include <linux/skbuff.h>
#include <linux/ethtool.h>
#include <linux/highmem.h>
#include <asm/irq.h> /* For NR_IRQS only. */
#include <asm/bitops.h>
#include <asm/io.h>
......
......@@ -25,7 +25,6 @@
*/
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/ptrace.h>
#include <linux/errno.h>
......@@ -38,6 +37,7 @@
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <asm/irq.h>
#include <asm/m68360.h>
/* #include <asm/8xx_immap.h> */
......
......@@ -12,35 +12,32 @@
* most of a2025 and sunlance with the aim of merging them, so the
* common code was pretty obvious.
*/
#include <linux/crc32.h>
#include <linux/delay.h>
#include <linux/dio.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/route.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/crc32.h>
#include <linux/skbuff.h>
/* Used for the temporal inet entries and routing */
#include <linux/socket.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/pgtable.h>
#include <linux/errno.h>
/* Used for the temporal inet entries and routing */
#include <linux/socket.h>
#include <linux/route.h>
#include <linux/dio.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include "7990.h"
......
......@@ -42,9 +42,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ioport.h>
......
......@@ -37,29 +37,27 @@
* both 10BASE-2 (thin coax) and AUI (DB-15) connectors
*/
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/config.h>
#include <linux/init.h>
#include <linux/crc32.h>
#include <linux/zorro.h>
#include <asm/bitops.h>
#include <asm/irq.h>
#include <linux/errno.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
#include <linux/zorro.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include "a2065.h"
......
......@@ -25,9 +25,7 @@ static const char version[] =
"ac3200.c:v1.01 7/1/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/netdevice.h>
......
......@@ -16,29 +16,27 @@ static const char *awc_version =
"aironet4500_cards.c v0.2 Feb 27, 2000 Elmer Joandi, elmer@ylenurme.ee.\n";
#endif
#include <linux/version.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/config.h>
#include <linux/if_arp.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/in.h>
#include <linux/version.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/init.h>
#include "aironet4500.h"
#define PCI_VENDOR_ID_AIRONET 0x14b9
......
......@@ -18,6 +18,7 @@
10.03.00 looks like softnet take us back to normal on SMP
*/
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/config.h>
......@@ -28,17 +29,16 @@
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ioport.h>
#include <linux/ip.h>
#include <linux/time.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/system.h>
#include <asm/byteorder.h>
#include <asm/irq.h>
#include <linux/time.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include "aironet4500.h"
#include <linux/ip.h>
int bap_sleep = 10 ;
......
......@@ -9,29 +9,26 @@
*
*
*/
#include <linux/config.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/module.h>
#include <linux/if_arp.h>
#include <linux/init.h>
#include <linux/config.h>
#include <linux/ioport.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/sched.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/in.h>
#include <asm/io.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/if_arp.h>
#include <linux/ioport.h>
#ifdef CONFIG_PROC_FS
#include <linux/sysctl.h>
......
......@@ -14,7 +14,6 @@
* note that this can not be built as a module (it doesn't make sense).
*/
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
......
......@@ -30,17 +30,15 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <asm/system.h>
#include <asm/io.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/setup.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
......
......@@ -38,7 +38,6 @@
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ioport.h>
......@@ -48,12 +47,11 @@
#include <linux/interrupt.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/zorro.h>
#include <asm/bitops.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
#include <linux/zorro.h>
#include <asm/irq.h>
#include "ariadne.h"
......
......@@ -21,7 +21,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/delay.h>
......@@ -30,7 +29,6 @@
#include <linux/zorro.h>
#include <asm/system.h>
#include <asm/irq.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
......
......@@ -36,30 +36,27 @@
*/
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/mca.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/crc32.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/mca.h>
static char version[] __initdata =
"at1700.c:v1.15 4/7/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
......
......@@ -45,13 +45,14 @@
static char version[] = "atarilance.c: v1.3 04/04/96 "
"Roman.Hodek@informatik.uni-erlangen.de\n";
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/init.h>
......@@ -63,10 +64,6 @@ static char version[] = "atarilance.c: v1.3 04/04/96 "
#include <asm/bitops.h>
#include <asm/io.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
/* Debug level:
* 0 = silent, print only serious errors
* 1 = normal, print error messages
......
......@@ -126,7 +126,6 @@ static int xcvr[NUM_UNITS]; /* The data transfer mode. */
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
......@@ -134,20 +133,20 @@ static int xcvr[NUM_UNITS]; /* The data transfer mode. */
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/crc32.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include "atp.h"
MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
......
......@@ -33,7 +33,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
......@@ -48,12 +47,13 @@
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/crc32.h>
#include <asm/mipsregs.h>
#include <asm/irq.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/au1000.h>
#include "au1000_eth.h"
#ifdef AU1000_ETH_DEBUG
......
......@@ -12,7 +12,6 @@
#include <linux/if_ether.h>
#include <linux/etherdevice.h>
#include <linux/pci.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/delay.h>
......
......@@ -15,24 +15,20 @@
static char *version = "bagetlance.c: v1.1 11/10/98\n";
#include <linux/module.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <asm/irq.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <asm/irq.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/baget/baget.h>
#define BAGET_LANCE_IRQ BAGET_IRQ_MASK(0xdf)
......
......@@ -196,7 +196,6 @@
#include <linux/config.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
......@@ -207,19 +206,12 @@
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/socket.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/uaccess.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <linux/rtnetlink.h>
#include <linux/if_bonding.h>
#include <linux/smp.h>
#include <linux/if_ether.h>
......@@ -227,6 +219,12 @@
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/uaccess.h>
/* monitor all links that often (in milliseconds). <=0 disables monitoring */
#ifndef BOND_LINK_MON_INTERV
......
......@@ -2371,6 +2371,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
unsigned int i;
u32 len, entry, base_flags, mss;
int would_hit_hwbug;
unsigned long flags;
len = (skb->len - skb->data_len);
......@@ -2393,12 +2394,12 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
* So we really do need to disable interrupts when taking
* tx_lock here.
*/
spin_lock_irq(&tp->tx_lock);
spin_lock_irqsave(&tp->tx_lock, flags);
/* This is a hard error, log it. */
if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {
netif_stop_queue(dev);
spin_unlock_irq(&tp->tx_lock);
spin_unlock_irqrestore(&tp->tx_lock, flags);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return 1;
......@@ -2550,7 +2551,7 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
netif_stop_queue(dev);
out_unlock:
spin_unlock_irq(&tp->tx_lock);
spin_unlock_irqrestore(&tp->tx_lock, flags);
dev->trans_start = jiffies;
......@@ -2562,6 +2563,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct tg3 *tp = dev->priv;
dma_addr_t mapping;
u32 len, entry, base_flags, mss;
unsigned long flags;
len = (skb->len - skb->data_len);
......@@ -2584,12 +2586,12 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
* So we really do need to disable interrupts when taking
* tx_lock here.
*/
spin_lock_irq(&tp->tx_lock);
spin_lock_irqsave(&tp->tx_lock, flags);
/* This is a hard error, log it. */
if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->nr_frags + 1))) {
netif_stop_queue(dev);
spin_unlock_irq(&tp->tx_lock);
spin_unlock_irqrestore(&tp->tx_lock, flags);
printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n",
dev->name);
return 1;
......@@ -2695,7 +2697,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1))
netif_stop_queue(dev);
spin_unlock_irq(&tp->tx_lock);
spin_unlock_irqrestore(&tp->tx_lock, flags);
dev->trans_start = jiffies;
......
......@@ -36,14 +36,8 @@
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/string.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/system.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/ioport.h>
......@@ -51,6 +45,10 @@
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
#include <asm/io.h>
#include <asm/bitops.h>
#include <asm/system.h>
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
......@@ -89,10 +87,10 @@ static u_int irq_mask = 0xffff;
static int irq_list[16] = { -1 };
/* The card status change interrupt -- 0 means autoselect */
static int cs_irq = 0;
static int cs_irq;
/* Poll status interval -- 0 means default to interrupt */
static int poll_interval = 0;
static int poll_interval;
/* Delay for card status double-checking */
static int poll_quick = HZ/20;
......@@ -125,17 +123,17 @@ typedef struct socket_info_t {
} socket_info_t;
static struct timer_list poll_timer;
static int tcic_timer_pending = 0;
static int tcic_timer_pending;
static int sockets;
static socket_info_t socket_table[2];
static socket_cap_t tcic_cap = {
/* only 16-bit cards, memory windows must be size-aligned */
SS_CAP_PCCARD | SS_CAP_MEM_ALIGN,
0x4cf8, /* irq 14, 11, 10, 7, 6, 5, 4, 3 */
0x1000, /* 4K minimum window size */
0, 0 /* No PCI or CardBus support */
/* only 16-bit cards, memory windows must be size-aligned */
.features = SS_CAP_PCCARD | SS_CAP_MEM_ALIGN,
.irq_mask = 0x4cf8, /* irq 14, 11, 10, 7, 6, 5, 4, 3 */
.map_size = 0x1000, /* 4K minimum window size */
/* No PCI or CardBus support */
};
/*====================================================================*/
......@@ -235,7 +233,7 @@ static int to_ns(int cycles)
static volatile u_int irq_hits;
static void __init irq_count(int irq, void *dev, struct pt_regs *regs)
static void __init tcic_irq_count(int irq, void *dev, struct pt_regs *regs)
{
irq_hits++;
}
......@@ -245,11 +243,11 @@ static u_int __init try_irq(int irq)
u_short cfg;
irq_hits = 0;
if (request_irq(irq, irq_count, 0, "irq scan", irq_count) != 0)
if (request_irq(irq, tcic_irq_count, 0, "irq scan", tcic_irq_count) != 0)
return -1;
mdelay(10);
if (irq_hits) {
free_irq(irq, irq_count);
free_irq(irq, tcic_irq_count);
return -1;
}
......@@ -260,7 +258,7 @@ static u_int __init try_irq(int irq)
tcic_setb(TCIC_ICSR, TCIC_ICSR_ERR | TCIC_ICSR_JAM);
udelay(1000);
free_irq(irq, irq_count);
free_irq(irq, tcic_irq_count);
/* Turn off interrupts */
tcic_setb(TCIC_IENA, TCIC_IENA_CFG_OFF);
......@@ -301,9 +299,9 @@ static u_int __init irq_scan(u_int mask0)
/* Fallback: just find interrupts that aren't in use */
for (i = 0; i < 16; i++)
if ((mask0 & (1 << i)) &&
(request_irq(i, irq_count, 0, "x", irq_count) == 0)) {
(request_irq(i, tcic_irq_count, 0, "x", tcic_irq_count) == 0)) {
mask1 |= (1 << i);
free_irq(i, irq_count);
free_irq(i, tcic_irq_count);
}
printk("default");
}
......@@ -983,18 +981,18 @@ static int tcic_suspend(unsigned int sock)
}
static struct pccard_operations tcic_operations = {
tcic_init,
tcic_suspend,
tcic_register_callback,
tcic_inquire_socket,
tcic_get_status,
tcic_get_socket,
tcic_set_socket,
tcic_get_io_map,
tcic_set_io_map,
tcic_get_mem_map,
tcic_set_mem_map,
tcic_proc_setup
.init = tcic_init,
.suspend = tcic_suspend,
.register_callback = tcic_register_callback,
.inquire_socket = tcic_inquire_socket,
.get_status = tcic_get_status,
.get_socket = tcic_get_socket,
.set_socket = tcic_set_socket,
.get_io_map = tcic_get_io_map,
.set_io_map = tcic_set_io_map,
.get_mem_map = tcic_get_mem_map,
.set_mem_map = tcic_set_mem_map,
.proc_setup = tcic_proc_setup,
};
/*====================================================================*/
......
......@@ -180,8 +180,8 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
K(i.freeram),
K(i.sharedram),
K(i.bufferram),
K(ps.nr_pagecache-swapper_space.nrpages-i.bufferram),
K(swapper_space.nrpages),
K(ps.nr_pagecache-total_swapcache_pages-i.bufferram),
K(total_swapcache_pages),
K(active),
K(inactive),
K(i.totalhigh),
......
......@@ -107,6 +107,7 @@
#define MSR_K7_PERFCTR2 0xC0010006
#define MSR_K7_PERFCTR3 0xC0010007
#define MSR_K7_HWCR 0xC0010015
#define MSR_K7_CLK_CTL 0xC001001b
#define MSR_K7_FID_VID_CTL 0xC0010041
#define MSR_K7_VID_STATUS 0xC0010042
......
......@@ -123,7 +123,7 @@ extern void fpsave(unsigned long *fpregs, unsigned long *fsr,
"save %sp, -0x40, %sp\n\t" \
"restore; restore; restore; restore; restore; restore; restore"); \
} while(0)
#define finish_arch_switch(rq, next) do{ }while(0)
#define finish_arch_switch(rq, next) spin_unlock_irq(&(rq)->lock)
#define task_running(rq, p) ((rq)->curr == (p))
/* Much care has gone into this code, do not touch it.
......@@ -195,21 +195,6 @@ extern __inline__ void setipl(unsigned long __orig_psr)
: "memory", "cc");
}
extern __inline__ void local_irq_disable(void)
{
unsigned long tmp;
__asm__ __volatile__(
"rd %%psr, %0\n\t"
"nop; nop; nop;\n\t" /* Sun4m + Cypress + SMP bug */
"or %0, %1, %0\n\t"
"wr %0, 0x0, %%psr\n\t"
"nop; nop; nop\n"
: "=r" (tmp)
: "i" (PSR_PIL)
: "memory");
}
extern __inline__ void local_irq_enable(void)
{
unsigned long tmp;
......@@ -233,6 +218,7 @@ extern __inline__ unsigned long getipl(void)
return retval;
}
#if 0 /* not used */
extern __inline__ unsigned long swap_pil(unsigned long __new_psr)
{
unsigned long retval;
......@@ -254,6 +240,7 @@ extern __inline__ unsigned long swap_pil(unsigned long __new_psr)
return retval;
}
#endif
extern __inline__ unsigned long read_psr_and_cli(void)
{
......@@ -275,15 +262,9 @@ extern __inline__ unsigned long read_psr_and_cli(void)
#define local_save_flags(flags) ((flags) = getipl())
#define local_irq_save(flags) ((flags) = read_psr_and_cli())
#define local_irq_restore(flags) setipl((flags))
#define local_irq_disable() ((void) read_psr_and_cli())
/* On sparc32 IRQ flags are the PSR register in the PSR_PIL
* field.
*/
#define irqs_disabled() \
({ unsigned long flags; \
local_save_flags(flags);\
(flags & PSR_PIL) != 0; \
})
#define irqs_disabled() ((getipl() & PSR_PIL) != 0)
#ifdef CONFIG_SMP
......
......@@ -208,9 +208,9 @@
#define __NR_init_module 190 /* Linux Specific */
#define __NR_personality 191 /* Linux Specific */
#define __NR_remap_file_pages 192 /* Linux Specific */
/* #define __NR_break 193 Linux Specific */
/* #define __NR_lock 194 Linux Specific */
/* #define __NR_mpx 195 Linux Specific */
#define __NR_epoll_create 193 /* Linux Specific */
#define __NR_epoll_ctl 194 /* Linux Specific */
#define __NR_epoll_wait 195 /* Linux Specific */
/* #define __NR_ulimit 196 Linux Specific */
#define __NR_getppid 197 /* Linux Specific */
#define __NR_sigaction 198 /* Linux Specific */
......
......@@ -208,9 +208,9 @@
#define __NR_init_module 190 /* Linux Specific */
#define __NR_personality 191 /* Linux Specific */
#define __NR_remap_file_pages 192 /* Linux Specific */
/* #define __NR_break 193 Linux Specific */
/* #define __NR_lock 194 Linux Specific */
/* #define __NR_mpx 195 Linux Specific */
#define __NR_epoll_create 193 /* Linux Specific */
#define __NR_epoll_ctl 194 /* Linux Specific */
#define __NR_epoll_wait 195 /* Linux Specific */
/* #define __NR_ulimit 196 Linux Specific */
#define __NR_getppid 197 /* Linux Specific */
#define __NR_sigaction 198 /* Linux Specific */
......
......@@ -29,7 +29,7 @@
#define CRYPTO_ALG_TYPE_MASK 0x000000ff
#define CRYPTO_ALG_TYPE_CIPHER 0x00000001
#define CRYPTO_ALG_TYPE_DIGEST 0x00000002
#define CRYPTO_ALG_TYPE_COMP 0x00000004
#define CRYPTO_ALG_TYPE_COMPRESS 0x00000004
/*
......@@ -209,16 +209,19 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
return tfm->__crt_alg->cra_cipher.cia_min_keysize;
}
static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
return tfm->__crt_alg->cra_cipher.cia_max_keysize;
}
static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
return tfm->__crt_alg->cra_cipher.cia_ivsize;
}
......@@ -229,6 +232,7 @@ static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm)
static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST);
return tfm->__crt_alg->cra_digest.dia_digestsize;
}
......@@ -302,13 +306,13 @@ static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm,
static inline void crypto_comp_compress(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP);
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS);
tfm->crt_compress.cot_compress(tfm);
}
static inline void crypto_comp_decompress(struct crypto_tfm *tfm)
{
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP);
BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS);
tfm->crt_compress.cot_decompress(tfm);
}
......
......@@ -46,10 +46,11 @@ struct exec_domain;
#define CLONE_NEWNS 0x00020000 /* New namespace group? */
#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */
#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */
#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */
#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */
#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */
#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */
#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
/*
* List of flags we want to share for kernel threads,
......@@ -332,7 +333,8 @@ struct task_struct {
wait_queue_head_t wait_chldexit; /* for wait4() */
struct completion *vfork_done; /* for vfork() */
int *user_tid; /* for CLONE_CLEARTID */
int *set_child_tid; /* CLONE_CHILD_SETTID */
int *clear_child_tid; /* CLONE_CHILD_CLEARTID */
unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
......@@ -524,36 +526,6 @@ extern int kill_proc(pid_t, int, int);
extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *);
extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long);
/*
* Re-calculate pending state from the set of locally pending
* signals, globally pending signals, and blocked signals.
*/
static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked)
{
unsigned long ready;
long i;
switch (_NSIG_WORDS) {
default:
for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;)
ready |= signal->sig[i] &~ blocked->sig[i];
break;
case 4: ready = signal->sig[3] &~ blocked->sig[3];
ready |= signal->sig[2] &~ blocked->sig[2];
ready |= signal->sig[1] &~ blocked->sig[1];
ready |= signal->sig[0] &~ blocked->sig[0];
break;
case 2: ready = signal->sig[1] &~ blocked->sig[1];
ready |= signal->sig[0] &~ blocked->sig[0];
break;
case 1: ready = signal->sig[0] &~ blocked->sig[0];
}
return ready != 0;
}
/* True if we are on the alternate signal stack. */
static inline int on_sig_stack(unsigned long sp)
......@@ -615,7 +587,7 @@ extern void daemonize(void);
extern task_t *child_reaper;
extern int do_execve(char *, char **, char **, struct pt_regs *);
extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *);
extern struct task_struct *do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int *, int *);
#ifdef CONFIG_SMP
extern void wait_task_inactive(task_t * p);
......@@ -639,30 +611,6 @@ extern void kick_if_running(task_t * p);
add_parent(p, (p)->parent); \
} while (0)
static inline struct task_struct *eldest_child(struct task_struct *p)
{
if (list_empty(&p->children)) return NULL;
return list_entry(p->children.next,struct task_struct,sibling);
}
static inline struct task_struct *youngest_child(struct task_struct *p)
{
if (list_empty(&p->children)) return NULL;
return list_entry(p->children.prev,struct task_struct,sibling);
}
static inline struct task_struct *older_sibling(struct task_struct *p)
{
if (p->sibling.prev==&p->parent->children) return NULL;
return list_entry(p->sibling.prev,struct task_struct,sibling);
}
static inline struct task_struct *younger_sibling(struct task_struct *p)
{
if (p->sibling.next==&p->parent->children) return NULL;
return list_entry(p->sibling.next,struct task_struct,sibling);
}
#define next_task(p) list_entry((p)->tasks.next, struct task_struct, tasks)
#define prev_task(p) list_entry((p)->tasks.prev, struct task_struct, tasks)
......
......@@ -408,16 +408,16 @@ void mm_release(void)
tsk->vfork_done = NULL;
complete(vfork_done);
}
if (tsk->user_tid) {
int * user_tid = tsk->user_tid;
tsk->user_tid = NULL;
if (tsk->clear_child_tid) {
int * tidptr = tsk->clear_child_tid;
tsk->clear_child_tid = NULL;
/*
* We dont check the error code - if userspace has
* not set up a proper pointer then tough luck.
*/
put_user(0, user_tid);
sys_futex((unsigned long)user_tid, FUTEX_WAKE, 1, NULL);
put_user(0, tidptr);
sys_futex((unsigned long)tidptr, FUTEX_WAKE, 1, NULL);
}
}
......@@ -680,9 +680,9 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
p->flags = new_flags;
}
asmlinkage int sys_set_tid_address(int *user_tid)
asmlinkage int sys_set_tid_address(int *tidptr)
{
current->user_tid = user_tid;
current->clear_child_tid = tidptr;
return current->pid;
}
......@@ -699,7 +699,8 @@ static struct task_struct *copy_process(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size,
int *user_tid)
int *parent_tidptr,
int *child_tidptr)
{
int retval;
struct task_struct *p = NULL;
......@@ -766,6 +767,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
if (p->pid == -1)
goto bad_fork_cleanup;
}
retval = -EFAULT;
if (clone_flags & CLONE_PARENT_SETTID)
if (put_user(p->pid, parent_tidptr))
goto bad_fork_cleanup;
p->proc_dentry = NULL;
INIT_LIST_HEAD(&p->run_list);
......@@ -823,19 +829,14 @@ static struct task_struct *copy_process(unsigned long clone_flags,
retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs);
if (retval)
goto bad_fork_cleanup_namespace;
/*
* Notify the child of the TID?
*/
retval = -EFAULT;
if (clone_flags & CLONE_SETTID)
if (put_user(p->pid, user_tid))
goto bad_fork_cleanup_namespace;
if (clone_flags & CLONE_CHILD_SETTID)
p->set_child_tid = child_tidptr;
/*
* Does the userspace VM want the TID cleared on mm_release()?
* Clear TID on mm_release()?
*/
if (clone_flags & CLONE_CLEARTID)
p->user_tid = user_tid;
if (clone_flags & CLONE_CHILD_CLEARTID)
p->clear_child_tid = child_tidptr;
/*
* Syscall tracing should be turned off in the child regardless
......@@ -1004,7 +1005,8 @@ struct task_struct *do_fork(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size,
int *user_tid)
int *parent_tidptr,
int *child_tidptr)
{
struct task_struct *p;
int trace = 0;
......@@ -1015,7 +1017,7 @@ struct task_struct *do_fork(unsigned long clone_flags,
clone_flags |= CLONE_PTRACE;
}
p = copy_process(clone_flags, stack_start, regs, stack_size, user_tid);
p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr);
if (!IS_ERR(p)) {
struct completion vfork;
......
......@@ -503,12 +503,12 @@ void sched_exit(task_t * p)
* schedule_tail - first thing a freshly forked thread must call.
* @prev: the thread we just switched away from.
*/
#if CONFIG_SMP || CONFIG_PREEMPT
asmlinkage void schedule_tail(task_t *prev)
{
finish_arch_switch(this_rq(), prev);
if (current->set_child_tid)
put_user(current->pid, current->set_child_tid);
}
#endif
/*
* context_switch - switch to the new MM and the new
......@@ -1837,6 +1837,24 @@ asmlinkage long sys_sched_rr_get_interval(pid_t pid, struct timespec *interval)
return retval;
}
static inline struct task_struct *eldest_child(struct task_struct *p)
{
if (list_empty(&p->children)) return NULL;
return list_entry(p->children.next,struct task_struct,sibling);
}
static inline struct task_struct *older_sibling(struct task_struct *p)
{
if (p->sibling.prev==&p->parent->children) return NULL;
return list_entry(p->sibling.prev,struct task_struct,sibling);
}
static inline struct task_struct *younger_sibling(struct task_struct *p)
{
if (p->sibling.next==&p->parent->children) return NULL;
return list_entry(p->sibling.next,struct task_struct,sibling);
}
static void show_task(task_t * p)
{
unsigned long free = 0;
......
......@@ -160,6 +160,36 @@ int max_queued_signals = 1024;
static int
__send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
/*
* Re-calculate pending state from the set of locally pending
* signals, globally pending signals, and blocked signals.
*/
static inline int has_pending_signals(sigset_t *signal, sigset_t *blocked)
{
unsigned long ready;
long i;
switch (_NSIG_WORDS) {
default:
for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;)
ready |= signal->sig[i] &~ blocked->sig[i];
break;
case 4: ready = signal->sig[3] &~ blocked->sig[3];
ready |= signal->sig[2] &~ blocked->sig[2];
ready |= signal->sig[1] &~ blocked->sig[1];
ready |= signal->sig[0] &~ blocked->sig[0];
break;
case 2: ready = signal->sig[1] &~ blocked->sig[1];
ready |= signal->sig[0] &~ blocked->sig[0];
break;
case 1: ready = signal->sig[0] &~ blocked->sig[0];
}
return ready != 0;
}
#define PENDING(p,b) has_pending_signals(&(p)->signal, (b))
void recalc_sigpending_tsk(struct task_struct *t)
......
......@@ -45,7 +45,7 @@ spinlock_t vlan_group_lock = SPIN_LOCK_UNLOCKED;
static char vlan_fullname[] = "802.1Q VLAN Support";
static unsigned int vlan_version = 1;
static unsigned int vlan_release = 7;
static unsigned int vlan_release = 8;
static char vlan_copyright[] = "Ben Greear <greearb@candelatech.com>";
static char vlan_buggyright[] = "David S. Miller <davem@redhat.com>";
......@@ -229,12 +229,13 @@ static int unregister_vlan_dev(struct net_device *real_dev,
if (real_dev->features &
(NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER)) {
real_dev->vlan_rx_kill_vid(real_dev, vlan_id);
} else {
br_write_lock(BR_NETPROTO_LOCK);
grp->vlan_devices[vlan_id] = NULL;
br_write_unlock(BR_NETPROTO_LOCK);
}
br_write_lock(BR_NETPROTO_LOCK);
grp->vlan_devices[vlan_id] = NULL;
br_write_unlock(BR_NETPROTO_LOCK);
/* Caller unregisters (and if necessary, puts)
* VLAN device, but we get rid of the reference to
* real_dev here.
......@@ -256,6 +257,12 @@ static int unregister_vlan_dev(struct net_device *real_dev,
__grp_unhash(grp);
spin_unlock_bh(&vlan_group_lock);
/* Free the group, after we have removed it
* from the hash.
*/
kfree(grp);
grp = NULL;
ret = 1;
}
......@@ -626,6 +633,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
ret = unregister_vlan_dev(dev,
VLAN_DEV_INFO(vlandev)->vlan_id);
dev_put(vlandev);
unregister_netdevice(vlandev);
/* Group was destroyed? */
......
......@@ -738,7 +738,7 @@ static void vlan_flush_mc_list(struct net_device *dev)
while (dmi) {
dev_mc_delete(dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
printk(KERN_INFO "%s: del %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address from vlan interface\n",
printk(KERN_DEBUG "%s: del %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address from vlan interface\n",
dev->name,
dmi->dmi_addr[0],
dmi->dmi_addr[1],
......@@ -820,7 +820,7 @@ void vlan_dev_set_multicast_list(struct net_device *vlan_dev)
for (dmi = vlan_dev->mc_list; dmi != NULL; dmi = dmi->next) {
if (vlan_should_add_mc(dmi, VLAN_DEV_INFO(vlan_dev)->old_mc_list)) {
dev_mc_add(real_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
printk(KERN_INFO "%s: add %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address to master interface\n",
printk(KERN_DEBUG "%s: add %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address to master interface\n",
vlan_dev->name,
dmi->dmi_addr[0],
dmi->dmi_addr[1],
......@@ -838,7 +838,7 @@ void vlan_dev_set_multicast_list(struct net_device *vlan_dev)
* delete it from the real list on the underlying device.
*/
dev_mc_delete(real_dev, dmi->dmi_addr, dmi->dmi_addrlen, 0);
printk(KERN_INFO "%s: del %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address from master interface\n",
printk(KERN_DEBUG "%s: del %.2x:%.2x:%.2x:%.2x:%.2x:%.2x mcast address from master interface\n",
vlan_dev->name,
dmi->dmi_addr[0],
dmi->dmi_addr[1],
......
......@@ -183,7 +183,7 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff **pskb,
point = (struct ebt_entry *)(private->hook_entry[hook]->data);
counter_base = cb_base + private->hook_entry[hook]->counter_offset;
// base for chain jumps
base = (char *)chaininfo;
base = private->entries;
i = 0;
while (i < nentries) {
if (ebt_basic_match(point, (**pskb).mac.ethernet, in, out))
......
......@@ -23,7 +23,7 @@ static struct sock *xfrm_nl;
static int verify_one_alg(struct rtattr **xfrma, enum xfrm_attr_type_t type)
{
struct rtattr *rt = xfrma[type];
struct rtattr *rt = xfrma[type - 1];
struct xfrm_algo *algp;
if (!rt)
......@@ -73,23 +73,23 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
err = -EINVAL;
switch (p->id.proto) {
case IPPROTO_AH:
if (!xfrma[XFRMA_ALG_AUTH] ||
xfrma[XFRMA_ALG_CRYPT] ||
xfrma[XFRMA_ALG_COMP])
if (!xfrma[XFRMA_ALG_AUTH-1] ||
xfrma[XFRMA_ALG_CRYPT-1] ||
xfrma[XFRMA_ALG_COMP-1])
goto out;
break;
case IPPROTO_ESP:
if ((!xfrma[XFRMA_ALG_AUTH] &&
!xfrma[XFRMA_ALG_CRYPT]) ||
xfrma[XFRMA_ALG_COMP])
if ((!xfrma[XFRMA_ALG_AUTH-1] &&
!xfrma[XFRMA_ALG_CRYPT-1]) ||
xfrma[XFRMA_ALG_COMP-1])
goto out;
break;
case IPPROTO_COMP:
if (!xfrma[XFRMA_ALG_COMP] ||
xfrma[XFRMA_ALG_AUTH] ||
xfrma[XFRMA_ALG_CRYPT])
if (!xfrma[XFRMA_ALG_COMP-1] ||
xfrma[XFRMA_ALG_AUTH-1] ||
xfrma[XFRMA_ALG_CRYPT-1])
goto out;
break;
......@@ -162,11 +162,11 @@ static struct xfrm_state *xfrm_state_construct(struct xfrm_usersa_info *p,
copy_from_user_state(x, p);
if ((err = attach_one_algo(&x->aalg, xfrma[XFRMA_ALG_AUTH])))
if ((err = attach_one_algo(&x->aalg, xfrma[XFRMA_ALG_AUTH-1])))
goto error;
if ((err = attach_one_algo(&x->ealg, xfrma[XFRMA_ALG_CRYPT])))
if ((err = attach_one_algo(&x->ealg, xfrma[XFRMA_ALG_CRYPT-1])))
goto error;
if ((err = attach_one_algo(&x->calg, xfrma[XFRMA_ALG_COMP])))
if ((err = attach_one_algo(&x->calg, xfrma[XFRMA_ALG_COMP-1])))
goto error;
err = -ENOENT;
......@@ -485,7 +485,7 @@ static void copy_templates(struct xfrm_policy *xp, struct xfrm_user_tmpl *ut,
static int copy_user_tmpl(struct xfrm_policy *pol, struct rtattr **xfrma)
{
struct rtattr *rt = xfrma[XFRMA_TMPL];
struct rtattr *rt = xfrma[XFRMA_TMPL-1];
struct xfrm_user_tmpl *utmpl;
int nr;
......
......@@ -24,3 +24,4 @@ EXPORT_SYMBOL(inet6_bind);
EXPORT_SYMBOL(inet6_getname);
EXPORT_SYMBOL(inet6_ioctl);
EXPORT_SYMBOL(ipv6_get_saddr);
EXPORT_SYMBOL(ipv6_chk_addr);
......@@ -328,18 +328,20 @@ static int gred_change(struct Qdisc *sch, struct rtattr *opt)
struct tc_gred_qopt *ctl;
struct tc_gred_sopt *sopt;
struct rtattr *tb[TCA_GRED_STAB];
struct rtattr *tb2[TCA_GRED_STAB];
struct rtattr *tb2[TCA_GRED_DPS];
int i;
if (opt == NULL ||
rtattr_parse(tb, TCA_GRED_STAB, RTA_DATA(opt), RTA_PAYLOAD(opt)) )
return -EINVAL;
if (tb[TCA_GRED_PARMS-1] == 0 && tb[TCA_GRED_STAB-1] == 0 &&
tb[TCA_GRED_DPS-1] != 0) {
if (tb[TCA_GRED_PARMS-1] == 0 && tb[TCA_GRED_STAB-1] == 0) {
rtattr_parse(tb2, TCA_GRED_DPS, RTA_DATA(opt),
RTA_PAYLOAD(opt));
if (tb2[TCA_GRED_DPS-1] == 0)
return -EINVAL;
sopt = RTA_DATA(tb2[TCA_GRED_DPS-1]);
table->DPs=sopt->DPs;
table->def=sopt->def_DP;
......@@ -471,16 +473,18 @@ static int gred_init(struct Qdisc *sch, struct rtattr *opt)
struct gred_sched *table = (struct gred_sched *)sch->data;
struct tc_gred_sopt *sopt;
struct rtattr *tb[TCA_GRED_STAB];
struct rtattr *tb2[TCA_GRED_STAB];
struct rtattr *tb2[TCA_GRED_DPS];
if (opt == NULL ||
rtattr_parse(tb, TCA_GRED_STAB, RTA_DATA(opt), RTA_PAYLOAD(opt)) )
return -EINVAL;
if (tb[TCA_GRED_PARMS-1] == 0 && tb[TCA_GRED_STAB-1] == 0 &&
tb[TCA_GRED_DPS-1] != 0) {
if (tb[TCA_GRED_PARMS-1] == 0 && tb[TCA_GRED_STAB-1] == 0) {
rtattr_parse(tb2, TCA_GRED_DPS, RTA_DATA(opt),RTA_PAYLOAD(opt));
if (tb2[TCA_GRED_DPS-1] == 0)
return -EINVAL;
sopt = RTA_DATA(tb2[TCA_GRED_DPS-1]);
table->DPs=sopt->DPs;
table->def=sopt->def_DP;
......
......@@ -726,8 +726,8 @@ int (*dlci_ioctl_hook)(unsigned int, void *);
* what to do with it - that's up to the protocol still.
*/
int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
static int sock_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
struct socket *sock;
int pid, err;
......
......@@ -19,15 +19,17 @@
*/
#include <sound/driver.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <sound/core.h>
#include <sound/ad1816a.h>
#include <asm/io.h>
#include <asm/dma.h>
MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
MODULE_DESCRIPTION("lowlevel code for Analog Devices AD1816A chip");
MODULE_LICENSE("GPL");
......
......@@ -178,7 +178,7 @@ void snd_hammerfall_free_buffer (struct pci_dev *pcidev, void *addr)
printk ("Hammerfall memory allocator: unknown buffer address or PCI device ID");
}
static void __exit hammerfall_free_buffers (void)
static void hammerfall_free_buffers (void)
{
int i;
......
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