Commit 79e75677 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.4.0-test4pre4

parent 5733013c
......@@ -1387,6 +1387,7 @@ E: greg@kroah.com
W: http://www.kroah.com/linux-usb/
D: USB Serial Converter driver framework, USB Handspring Visor driver
D: ConnectTech WHITEHeat USB driver, Generic USB Serial driver
D: USB Bluetooth driver
D: bits and pieces of USB core code.
N: Russell Kroll
......
......@@ -1159,6 +1159,13 @@ M: vojtech@suse.cz
L: linux-usb@suse.com
S: Supported
USB BLUETOOTH DRIVER
P: Greg Kroah-Hartman
M: greg@kroah.com
L: linux-usb@suse.com
S: Maintained
W: http://www.kroah.com/linux-usb/
USB HID/HIDBP/INPUT DRIVERS
P: Vojtech Pavlik
M: vojtech@suse.cz
......
......@@ -150,7 +150,7 @@ main (int argc, char *argv[])
prog_name, inname);
exit(1);
}
if (!elf_check_arch(elf->e_machine)) {
if (!elf_check_arch(elf)) {
fprintf(stderr, "%s: is not for this processor (e_machine=%d)\n",
prog_name, elf->e_machine);
exit(1);
......
......@@ -157,7 +157,7 @@ _start (void)
cons_write("not an ELF executable\n");
return;
}
if (!elf_check_arch(elf->e_machine)) {
if (!elf_check_arch(elf)) {
cons_write("kernel not for this processor\n");
return;
}
......
......@@ -28,7 +28,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef double elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
#define elf_check_arch(x) ((x) == EM_MIPS || (x) == EM_MIPS_RS4_BE)
#define elf_check_arch(x) ((x)->e_machine == EM_MIPS || (x)->e_machine == EM_MIPS_RS4_BE)
#define TASK32_SIZE 0x80000000UL
#undef ELF_ET_DYN_BASE
......
......@@ -300,7 +300,7 @@ CONFIG_NFSD=m
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=m
CONFIG_NCP_FS=m
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
......
/* $Id: process.c,v 1.150 2000/07/11 18:49:22 anton Exp $
/* $Id: process.c,v 1.151 2000/07/11 23:22:17 davem Exp $
* linux/arch/sparc/kernel/process.c
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......
/* $Id: sparc_ksyms.c,v 1.100 2000/07/07 07:49:08 anton Exp $
/* $Id: sparc_ksyms.c,v 1.101 2000/07/12 00:25:32 anton Exp $
* arch/sparc/kernel/ksyms.c: Sparc specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
......@@ -19,6 +19,9 @@
#include <linux/in6.h>
#include <linux/spinlock.h>
#include <linux/mm.h>
#ifdef CONFIG_PCI
#include <linux/pci.h>
#endif
#include <asm/oplib.h>
#include <asm/delay.h>
......@@ -42,9 +45,6 @@
#include <asm/sbus.h>
#include <asm/dma.h>
#endif
#ifdef CONFIG_PCI
#include <asm/pci.h>
#endif
#include <asm/a.out.h>
#include <asm/io-unit.h>
......
......@@ -437,17 +437,17 @@ CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=m
CONFIG_NCP_FS=m
CONFIG_NCPFS_PACKET_SIGNING=y
CONFIG_NCPFS_IOCTL_LOCKING=y
CONFIG_NCPFS_STRONG=y
CONFIG_NCPFS_NFS_NS=y
CONFIG_NCPFS_OS2_NS=y
CONFIG_NCPFS_SMALLDOS=y
CONFIG_NCPFS_MOUNT_SUBDIR=y
CONFIG_NCPFS_NDS_DOMAINS=y
CONFIG_NCPFS_NLS=y
CONFIG_NCPFS_EXTRAS=y
# CONFIG_NCP_FS is not set
# CONFIG_NCPFS_PACKET_SIGNING is not set
# CONFIG_NCPFS_IOCTL_LOCKING is not set
# CONFIG_NCPFS_STRONG is not set
# CONFIG_NCPFS_NFS_NS is not set
# CONFIG_NCPFS_OS2_NS is not set
# CONFIG_NCPFS_SMALLDOS is not set
# CONFIG_NCPFS_MOUNT_SUBDIR is not set
# CONFIG_NCPFS_NDS_DOMAINS is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_NCPFS_EXTRAS is not set
#
# Partition Types
......
......@@ -79,7 +79,7 @@ typedef struct {
} pr_un;
} elf_xregset_t;
#define elf_check_arch(x) (((x) == EM_SPARC) || ((x) == EM_SPARC32PLUS))
#define elf_check_arch(x) (((x)->e_machine == EM_SPARC) || ((x)->e_machine == EM_SPARC32PLUS))
#define ELF_ET_DYN_BASE 0x08000000
......
/* $Id: timod.c,v 1.7 2000/06/09 07:35:30 davem Exp $
/* $Id: timod.c,v 1.8 2000/07/12 00:51:06 davem Exp $
* timod.c: timod emulation.
*
* Copyright (C) 1998 Patrik Rak (prak3264@ss1000.ms.mff.cuni.cz)
......@@ -15,6 +15,7 @@
#include <linux/smp_lock.h>
#include <linux/ioctl.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/netdevice.h>
#include <linux/poll.h>
......@@ -619,22 +620,6 @@ int timod_putmsg(unsigned int fd, char *ctl_buf, int ctl_len,
return -EINVAL;
}
/* copied directly from fs/select.c */
static void free_wait(poll_table * p)
{
struct poll_table_entry * entry = p->entry + p->nr;
SOLD("entry");
while (p->nr > 0) {
p->nr--;
entry--;
remove_wait_queue(entry->wait_address,&entry->wait);
}
SOLD("done");
}
int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
char *data_buf, int data_maxlen, s32 *data_len, int *flags_p)
{
......@@ -670,14 +655,8 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
}
if (!(filp->f_flags & O_NONBLOCK)) {
poll_table wait_table, *wait;
struct poll_table_entry *entry;
SOLD("getting poll_table");
entry = (struct poll_table_entry *)__get_free_page(GFP_KERNEL);
if (!entry)
return -ENOMEM;
SOLD("got one");
wait_table.nr = 0;
wait_table.entry = entry;
poll_initwait(&wait_table);
wait = &wait_table;
for(;;) {
SOLD("loop");
......@@ -705,13 +684,17 @@ int timod_getmsg(unsigned int fd, char *ctl_buf, int ctl_maxlen, s32 *ctl_len,
SOLD("avoiding lockup");
break ;
}
if(wait_table.error) {
SOLD("wait-table error");
poll_freewait(&wait_table);
return wait_table.error;
}
SOLD("scheduling");
schedule();
}
SOLD("loop done");
current->state = TASK_RUNNING;
free_wait(&wait_table);
free_page((unsigned long)entry);
poll_freewait(&wait_table);
if (signal_pending(current)) {
SOLD("signal pending");
return -EINTR;
......
......@@ -3,12 +3,12 @@
#
if [ "$CONFIG_SERIAL" = "n" ]; then
define_bool CONFIG_PCMCIA_SERIAL n
define_tristate CONFIG_PCMCIA_SERIAL n
else
if [ "$CONFIG_SERIAL" = "m" -o "$CONFIG_PCMCIA" = "m" ]; then
define_bool CONFIG_PCMCIA_SERIAL m
define_tristate CONFIG_PCMCIA_SERIAL m
else
define_bool CONFIG_PCMCIA_SERIAL y
define_tristate CONFIG_PCMCIA_SERIAL y
fi
fi
......
/*
* bluetooth.c Version 0.1
* bluetooth.c Version 0.2
*
* Copyright (c) 2000 Greg Kroah-Hartman <greg@kroah.com>
*
* USB Bluetooth driver, based on the Bluetooth Spec version 1.0B
*
*
* (07/11/2000) Version 0.2 gkh
* Fixed a small bug found by Nils Faerber in the usb_bluetooth_probe
* function.
*
* (07/09/2000) Version 0.1 gkh
* Initial release. Has support for sending ACL data (which is really just
* a HCI frame.) Raw HCI commands and HCI events are not supported.
......@@ -619,6 +623,7 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum)
memset(bluetooth, 0, sizeof(struct usb_bluetooth));
bluetooth->magic = USB_BLUETOOTH_MAGIC;
bluetooth->dev = dev;
bluetooth->minor = minor;
bluetooth->tqueue.routine = bluetooth_softint;
......@@ -676,6 +681,8 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum)
tty_register_devfs (&bluetooth_tty_driver, 0, minor);
info("Bluetooth converter now attached to ttyBLUE%d (or usb/ttblue/%d for devfs)", minor, minor);
bluetooth_table[minor] = bluetooth;
return bluetooth; /* success */
probe_error:
......
......@@ -87,7 +87,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
int result;
char *start = server->packet;
poll_table wait_table;
struct poll_table_entry entry;
int init_timeout, max_timeout;
int timeout;
int retrans;
......@@ -136,8 +135,7 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
break;
}
re_select:
wait_table.nr = 0;
wait_table.entry = &entry;
poll_initwait(&wait_table);
/* mb() is not necessary because ->poll() will serialize
instructions adding the wait_table waitqueues in the
waitqueue-head before going to calculate the mask-retval. */
......@@ -154,13 +152,16 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
timeout = max_timeout;
}
timed_out = !schedule_timeout(timeout);
remove_wait_queue(entry.wait_address, &entry.wait);
fput(file);
poll_freewait(&wait_table);
current->state = TASK_RUNNING;
if (signal_pending(current)) {
result = -ERESTARTSYS;
break;
}
if(wait_table.error) {
result = wait_table.error;
break;
}
if (timed_out) {
if (n < retrans)
continue;
......@@ -179,9 +180,8 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
major_timeout_seen = 1;
continue;
}
} else if (wait_table.nr) {
remove_wait_queue(entry.wait_address, &entry.wait);
fput(file);
} else {
poll_freewait(&wait_table);
}
current->state = TASK_RUNNING;
......@@ -262,7 +262,6 @@ static int do_ncp_rpc_call(struct ncp_server *server, int size,
static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
poll_table wait_table;
struct poll_table_entry entry;
struct file *file;
struct socket *sock;
int init_timeout;
......@@ -281,16 +280,14 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
init_timeout = 0x7FFF0000;
while (len) {
wait_table.nr = 0;
wait_table.entry = &entry;
poll_initwait(&wait_table);
/* mb() is not necessary because ->poll() will serialize
instructions adding the wait_table waitqueues in the
waitqueue-head before going to calculate the mask-retval. */
__set_current_state(TASK_INTERRUPTIBLE);
if (!(sock->ops->poll(file, sock, &wait_table) & POLLIN)) {
init_timeout = schedule_timeout(init_timeout);
remove_wait_queue(entry.wait_address, &entry.wait);
fput(file);
poll_freewait(&wait_table);
current->state = TASK_RUNNING;
if (signal_pending(current)) {
return -ERESTARTSYS;
......@@ -298,9 +295,11 @@ static int do_tcp_rcv(struct ncp_server *server, void *buffer, size_t len) {
if (!init_timeout) {
return -EIO;
}
} else if (wait_table.nr) {
remove_wait_queue(entry.wait_address, &entry.wait);
fput(file);
if(wait_table.error) {
return wait_table.error;
}
} else {
poll_freewait(&wait_table);
}
current->state = TASK_RUNNING;
......
......@@ -31,14 +31,15 @@
* understand what I'm doing here, then you understand how the linux
* sleep/wakeup mechanism works.
*
* Two very simple procedures, poll_wait() and free_wait() make all the
* Two very simple procedures, poll_wait() and poll_freewait() make all the
* work. poll_wait() is an inline-function defined in <linux/poll.h>,
* as all select/poll functions have to call it to add an entry to the
* poll table.
*/
static void free_wait(struct poll_table_page * p)
void poll_freewait(poll_table* pt)
{
struct poll_table_page * p = pt->table;
while (p) {
struct poll_table_entry * entry;
struct poll_table_page *old;
......@@ -66,6 +67,7 @@ void __pollwait(struct file * filp, wait_queue_head_t * wait_address, poll_table
new_table = (struct poll_table_page *) __get_free_page(GFP_KERNEL);
if (!new_table) {
p->error = -ENOMEM;
__set_current_state(TASK_RUNNING);
return;
}
new_table->nr = 0;
......@@ -160,8 +162,7 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
return retval;
n = retval;
table.error = 0;
table.table = NULL;
poll_initwait(&table);
wait = &table;
retval = 0;
for (;;) {
......@@ -201,11 +202,15 @@ int do_select(int n, fd_set_bits *fds, long *timeout)
wait = NULL;
if (retval || !__timeout || signal_pending(current))
break;
if(table.error) {
retval = table.error;
break;
}
__timeout = schedule_timeout(__timeout);
}
current->state = TASK_RUNNING;
free_wait(table.table);
poll_freewait(&table);
/*
* Up-to-date the caller timeout.
......@@ -354,18 +359,22 @@ static int do_poll(unsigned int nfds, unsigned int nchunks, unsigned int nleft,
struct pollfd *fds[], poll_table *wait, long timeout)
{
int count = 0;
poll_table* pt = wait;
for (;;) {
unsigned int i;
set_current_state(TASK_INTERRUPTIBLE);
for (i=0; i < nchunks; i++)
do_pollfd(POLLFD_PER_PAGE, fds[i], &wait, &count);
do_pollfd(POLLFD_PER_PAGE, fds[i], &pt, &count);
if (nleft)
do_pollfd(nleft, fds[nchunks], &wait, &count);
wait = NULL;
do_pollfd(nleft, fds[nchunks], &pt, &count);
pt = NULL;
if (count || !timeout || signal_pending(current))
break;
if(wait->error) {
return wait->error;
}
timeout = schedule_timeout(timeout);
}
current->state = TASK_RUNNING;
......@@ -391,8 +400,7 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout)
timeout = MAX_SCHEDULE_TIMEOUT;
}
table.error = 0;
table.table = NULL;
poll_initwait(&table);
err = -ENOMEM;
fds = NULL;
......@@ -452,6 +460,6 @@ asmlinkage long sys_poll(struct pollfd * ufds, unsigned int nfds, long timeout)
if (nfds != 0)
kfree(fds);
out:
free_wait(table.table);
poll_freewait(&table);
return err;
}
......@@ -229,7 +229,7 @@ typedef struct siginfo32 {
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ((x) == EM_386)
#define elf_check_arch(x) ((x)->e_machine == EM_386)
/*
* These are used to set parameters in the core dumps.
......
......@@ -22,7 +22,7 @@ typedef s390_regs elf_gregset_t;
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
#define elf_check_arch(x) ((x)->elf_machine == EM_S390)
#define elf_check_arch(x) ((x)->e_machine == EM_S390)
/*
* These are used to set parameters in the core dumps.
......
This diff is collapsed.
/* $Id: elf.h,v 1.21 2000/04/14 09:59:04 davem Exp $ */
/* $Id: elf.h,v 1.22 2000/07/12 01:27:08 davem Exp $ */
#ifndef __ASMSPARC_ELF_H
#define __ASMSPARC_ELF_H
......
This diff is collapsed.
......@@ -38,22 +38,13 @@ extern inline void poll_wait(struct file * filp, wait_queue_head_t * wait_addres
__pollwait(filp, wait_address, p);
}
/*
* For the kernel fd_set we use a fixed set-size for allocation purposes.
* This set-size doesn't necessarily bear any relation to the size the user
* uses, but should preferably obviously be larger than any possible user
* size (NR_OPEN bits).
*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing), and we
* allocate one page for all the bitmaps. Thus we have 8*PAGE_SIZE bits,
* to be divided by 6. And we'd better make sure we round to a full
* long-word (in fact, we'll round to 64 bytes).
*/
static inline void poll_initwait(poll_table* pt)
{
pt->error = 0;
pt->table = NULL;
}
extern void poll_freewait(poll_table* pt);
#define KFDS_64BLOCK ((PAGE_SIZE/(6*64))*64)
#define KFDS_NR (KFDS_64BLOCK*8 > NR_OPEN ? NR_OPEN : KFDS_64BLOCK*8)
typedef unsigned long kernel_fd_set[KFDS_NR/__NFDBITS];
/*
* Scaleable version of the fd_set.
......
......@@ -235,6 +235,7 @@ EXPORT_SYMBOL(vfs_rename);
EXPORT_SYMBOL(vfs_statfs);
EXPORT_SYMBOL(generic_read_dir);
EXPORT_SYMBOL(__pollwait);
EXPORT_SYMBOL(poll_freewait);
EXPORT_SYMBOL(ROOT_DEV);
EXPORT_SYMBOL(__find_get_page);
EXPORT_SYMBOL(__find_lock_page);
......
......@@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s
spin_unlock(&mm->page_table_lock);
/*
* Update rss for the mm_struct (not necessarily current->mm)
* Notice that rss is an unsigned long.
*/
if (mm->rss > 0) {
if (mm->rss > freed)
mm->rss -= freed;
if (mm->rss < 0)
mm->rss = 0;
}
else
mm->rss = 0;
}
......
......@@ -512,7 +512,6 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
info->indev, info->outdev, &elem,
info->okfn);
}
br_read_unlock_bh(BR_NETPROTO_LOCK);
switch (verdict) {
case NF_ACCEPT:
......@@ -527,6 +526,7 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
kfree_skb(skb);
break;
}
br_read_unlock_bh(BR_NETPROTO_LOCK);
/* Release those devices we held, or Alexey will kill me. */
if (info->indev) dev_put(info->indev);
......
......@@ -5,7 +5,7 @@
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
*
* $Id: reassembly.c,v 1.18 2000/07/07 22:29:42 davem Exp $
* $Id: reassembly.c,v 1.19 2000/07/11 22:35:24 davem Exp $
*
* Based on: net/ipv4/ip_fragment.c
*
......
......@@ -1751,11 +1751,12 @@ cbq_destroy(struct Qdisc* sch)
static void cbq_put(struct Qdisc *sch, unsigned long arg)
{
struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data;
struct cbq_class *cl = (struct cbq_class*)arg;
if (--cl->refcnt == 0) {
#ifdef CONFIG_NET_CLS_POLICE
struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data;
spin_lock_bh(&sch->dev->queue_lock);
if (q->rx_class == cl)
q->rx_class = NULL;
......
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