Commit 4a14ac72 authored by David S. Miller's avatar David S. Miller

Merge nuts.ninka.net:/home/davem/src/BK/network-2.5

into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents 4b6243ca a443da37
......@@ -1445,6 +1445,12 @@ source "net/Kconfig"
source "net/ax25/Kconfig"
source "net/irda/Kconfig"
source "drivers/isdn/Kconfig"
source "drivers/telephony/Kconfig"
# This one must be before the filesystem configs. -DaveM
menu "Unix 98 PTY support"
......
......@@ -444,6 +444,7 @@ CONFIG_IPV6=m
CONFIG_IPV6_PRIVACY=y
CONFIG_INET6_AH=m
CONFIG_INET6_ESP=m
CONFIG_INET6_IPCOMP=m
#
# IPv6: Netfilter Configuration
......@@ -741,6 +742,104 @@ CONFIG_ROSE=m
# CONFIG_BAYCOM_EPP is not set
# CONFIG_YAM is not set
#
# IrDA (infrared) support
#
CONFIG_IRDA=m
#
# IrDA protocols
#
CONFIG_IRLAN=m
CONFIG_IRNET=m
CONFIG_IRCOMM=m
CONFIG_IRDA_ULTRA=y
#
# IrDA options
#
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set
#
# Infrared-port device drivers
#
#
# SIR device drivers
#
# CONFIG_IRTTY_SIR is not set
#
# Dongle support
#
# CONFIG_DONGLE is not set
#
# Old SIR device drivers
#
# CONFIG_IRTTY_OLD is not set
# CONFIG_IRPORT_SIR is not set
#
# Old Serial dongle support
#
# CONFIG_DONGLE_OLD is not set
#
# FIR device drivers
#
# CONFIG_USB_IRDA is not set
# CONFIG_NSC_FIR is not set
# CONFIG_WINBOND_FIR is not set
# CONFIG_TOSHIBA_OLD is not set
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_SMC_IRCC_FIR is not set
# CONFIG_ALI_FIR is not set
# CONFIG_VLSI_FIR is not set
#
# ISDN subsystem
#
CONFIG_ISDN_BOOL=y
#
# Old ISDN4Linux
#
# CONFIG_ISDN is not set
#
# CAPI subsystem
#
CONFIG_ISDN_CAPI=m
CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
CONFIG_ISDN_CAPI_MIDDLEWARE=y
CONFIG_ISDN_CAPI_CAPI20=m
CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
CONFIG_ISDN_CAPI_CAPIFS=m
#
# CAPI hardware drivers
#
#
# Active AVM cards
#
# CONFIG_CAPI_AVM is not set
#
# Active Eicon DIVA Server cards
#
# CONFIG_CAPI_EICON is not set
#
# Telephony Support
#
CONFIG_PHONE=m
CONFIG_PHONE_IXJ=m
# CONFIG_PHONE_IXJ_PCMCIA is not set
#
# Unix 98 PTY support
#
......
......@@ -17,8 +17,6 @@ extern int sdla_setup(void);
extern int sdla_c_setup(void);
extern int lmc_setup(void);
extern int madgemc_probe(void);
/*
* Devices in this list must do new style probing. That is they must
* allocate their own device objects and do their own bus scans.
......@@ -50,14 +48,6 @@ static struct net_probe pci_probes[] __initdata = {
#if defined(CONFIG_LANMEDIA)
{lmc_setup, 0},
#endif
/*
* Token Ring Drivers
*/
#ifdef CONFIG_MADGEMC
{madgemc_probe, 0},
#endif
{NULL, 0},
};
......
......@@ -63,7 +63,6 @@ struct madgemc_card {
static struct madgemc_card *madgemc_card_list;
int madgemc_probe(void);
static int madgemc_open(struct net_device *dev);
static int madgemc_close(struct net_device *dev);
static int madgemc_chipset_init(struct net_device *dev);
......@@ -152,7 +151,7 @@ static void madgemc_sifwritew(struct net_device *dev, unsigned short val, unsign
int __init madgemc_probe(void)
static int __init madgemc_probe(void)
{
static int versionprinted;
struct net_device *dev;
......@@ -773,19 +772,7 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
return len;
}
#ifdef MODULE
int init_module(void)
{
/* Probe for cards. */
if (madgemc_probe()) {
printk(KERN_NOTICE "madgemc.c: No cards found.\n");
}
/* lock_tms380_module(); */
return (0);
}
void cleanup_module(void)
static void __exit madgemc_exit(void)
{
struct net_device *dev;
struct madgemc_card *this_card;
......@@ -801,9 +788,10 @@ void cleanup_module(void)
madgemc_card_list = this_card->next;
kfree(this_card);
}
/* unlock_tms380_module(); */
}
#endif /* MODULE */
module_init(madgemc_probe);
module_exit(madgemc_exit);
MODULE_LICENSE("GPL");
......
......@@ -213,24 +213,6 @@ extern void tasklet_kill(struct tasklet_struct *t);
extern void tasklet_init(struct tasklet_struct *t,
void (*func)(unsigned long), unsigned long data);
#ifdef CONFIG_SMP
#define SMP_TIMER_NAME(name) name##__thr
#define SMP_TIMER_DEFINE(name, task) \
DECLARE_TASKLET(task, name##__thr, 0); \
static void name (unsigned long dummy) \
{ \
tasklet_schedule(&(task)); \
}
#else /* CONFIG_SMP */
#define SMP_TIMER_NAME(name) name
#define SMP_TIMER_DEFINE(name, task)
#endif /* CONFIG_SMP */
/*
* Autoprobing for irqs:
*
......
......@@ -7,6 +7,7 @@
#include <linux/config.h>
#include <linux/netfilter_ipv4/ip_conntrack_tuple.h>
#include <linux/bitops.h>
#include <linux/compiler.h>
#include <asm/atomic.h>
enum ip_conntrack_info
......@@ -266,5 +267,16 @@ static inline int is_confirmed(struct ip_conntrack *ct)
}
extern unsigned int ip_conntrack_htable_size;
/* eg. PROVIDES_CONNTRACK(ftp); */
#define PROVIDES_CONNTRACK(name) \
int needs_ip_conntrack_##name; \
EXPORT_SYMBOL(needs_ip_conntrack_##name)
/*. eg. NEEDS_CONNTRACK(ftp); */
#define NEEDS_CONNTRACK(name) \
extern int needs_ip_conntrack_##name; \
static int *need_ip_conntrack_##name __attribute_used__ = &needs_ip_conntrack_##name
#endif /* __KERNEL__ */
#endif /* _IP_CONNTRACK_H */
......@@ -3,14 +3,13 @@
/* NAT protocol helper routines. */
#include <linux/netfilter_ipv4/ip_conntrack.h>
#include <linux/module.h>
struct sk_buff;
/* Flags */
/* NAT helper must be called on every packet (for TCP) */
#define IP_NAT_HELPER_F_ALWAYS 0x01
/* Standalone NAT helper, without a conntrack part */
#define IP_NAT_HELPER_F_STANDALONE 0x02
struct ip_nat_helper
{
......
......@@ -165,7 +165,6 @@ struct neigh_table
unsigned long last_rand;
struct neigh_parms *parms_list;
kmem_cache_t *kmem_cachep;
struct tasklet_struct gc_task;
struct neigh_statistics stats;
struct neighbour *hash_buckets[NEIGH_HASHMASK+1];
struct pneigh_entry *phash_buckets[PNEIGH_HASHMASK+1];
......
......@@ -362,10 +362,6 @@ static __inline__ int tcp_sk_listen_hashfn(struct sock *sk)
#define MAX_TCP_KEEPCNT 127
#define MAX_TCP_SYNCNT 127
/* TIME_WAIT reaping mechanism. */
#define TCP_TWKILL_SLOTS 8 /* Please keep this a power of 2. */
#define TCP_TWKILL_PERIOD (TCP_TIMEWAIT_LEN/TCP_TWKILL_SLOTS)
#define TCP_SYNQ_INTERVAL (HZ/5) /* Period of SYNACK timer */
#define TCP_SYNQ_HSIZE 512 /* Size of SYNACK hash table */
......
......@@ -2754,6 +2754,8 @@ void netdev_run_todo(void)
dev->next = NULL;
netdev_unregister_sysfs(dev);
netdev_wait_allrefs(dev);
BUG_ON(atomic_read(&dev->refcnt));
......@@ -2842,8 +2844,6 @@ int unregister_netdevice(struct net_device *dev)
free_divert_blk(dev);
netdev_unregister_sysfs(dev);
spin_lock(&unregister_todo_lock);
dev->next = unregister_todo;
unregister_todo = dev;
......
......@@ -540,7 +540,7 @@ static void neigh_sync(struct neighbour *n)
}
}
static void SMP_TIMER_NAME(neigh_periodic_timer)(unsigned long arg)
static void neigh_periodic_timer(unsigned long arg)
{
struct neigh_table *tbl = (struct neigh_table *)arg;
unsigned long now = jiffies;
......@@ -605,15 +605,6 @@ static void SMP_TIMER_NAME(neigh_periodic_timer)(unsigned long arg)
write_unlock(&tbl->lock);
}
#ifdef CONFIG_SMP
static void neigh_periodic_timer(unsigned long arg)
{
struct neigh_table *tbl = (struct neigh_table *)arg;
tasklet_schedule(&tbl->gc_task);
}
#endif
static __inline__ int neigh_max_probes(struct neighbour *n)
{
struct neigh_parms *p = n->parms;
......@@ -1147,10 +1138,6 @@ void neigh_table_init(struct neigh_table *tbl)
15) & ~15,
0, SLAB_HWCACHE_ALIGN,
NULL, NULL);
#ifdef CONFIG_SMP
tasklet_init(&tbl->gc_task, SMP_TIMER_NAME(neigh_periodic_timer),
(unsigned long)tbl);
#endif
tbl->lock = RW_LOCK_UNLOCKED;
init_timer(&tbl->gc_timer);
tbl->gc_timer.data = (unsigned long)tbl;
......@@ -1178,7 +1165,6 @@ int neigh_table_clear(struct neigh_table *tbl)
/* It is not clean... Fix it to unload IPv6 module safely */
del_timer_sync(&tbl->gc_timer);
tasklet_kill(&tbl->gc_task);
del_timer_sync(&tbl->proxy_timer);
pneigh_queue_purge(&tbl->proxy_queue);
neigh_ifdown(tbl, NULL);
......
......@@ -155,7 +155,7 @@ static inline void dnrt_drop(struct dn_route *rt)
call_rcu(&rt->u.dst.rcu_head, (void (*)(void *))dst_free, &rt->u.dst);
}
static void SMP_TIMER_NAME(dn_dst_check_expire)(unsigned long dummy)
static void dn_dst_check_expire(unsigned long dummy)
{
int i;
struct dn_route *rt, **rtp;
......@@ -185,8 +185,6 @@ static void SMP_TIMER_NAME(dn_dst_check_expire)(unsigned long dummy)
mod_timer(&dn_route_timer, now + decnet_dst_gc_interval * HZ);
}
SMP_TIMER_DEFINE(dn_dst_check_expire, dn_dst_task);
static int dn_dst_gc(void)
{
struct dn_route *rt, **rtp;
......@@ -319,7 +317,7 @@ static int dn_insert_route(struct dn_route *rt, unsigned hash, struct dn_route *
return 0;
}
void SMP_TIMER_NAME(dn_run_flush)(unsigned long dummy)
void dn_run_flush(unsigned long dummy)
{
int i;
struct dn_route *rt, *next;
......@@ -341,8 +339,6 @@ void SMP_TIMER_NAME(dn_run_flush)(unsigned long dummy)
}
}
SMP_TIMER_DEFINE(dn_run_flush, dn_flush_task);
static spinlock_t dn_rt_flush_lock = SPIN_LOCK_UNLOCKED;
void dn_rt_cache_flush(int delay)
......
......@@ -151,17 +151,6 @@ static rwlock_t fib_hash_lock = RW_LOCK_UNLOCKED;
#define FZ_MAX_DIVISOR ((PAGE_SIZE<<MAX_ORDER) / sizeof(struct fib_node *))
static unsigned long size_to_order(unsigned long size)
{
unsigned long order;
for (order = 0; order < MAX_ORDER; order++) {
if ((PAGE_SIZE << order) >= size)
break;
}
return order;
}
static struct fib_node **fz_hash_alloc(int divisor)
{
unsigned long size = divisor * sizeof(struct fib_node *);
......@@ -170,7 +159,7 @@ static struct fib_node **fz_hash_alloc(int divisor)
return kmalloc(size, GFP_KERNEL);
} else {
return (struct fib_node **)
__get_free_pages(GFP_KERNEL, size_to_order(size));
__get_free_pages(GFP_KERNEL, get_order(size));
}
}
......@@ -201,7 +190,7 @@ static void fz_hash_free(struct fib_node **hash, int divisor)
kfree(hash);
else
free_pages((unsigned long) hash,
size_to_order(divisor * sizeof(struct fib_node *)));
get_order(divisor * sizeof(struct fib_node *)));
}
static void fn_rehash_zone(struct fn_zone *fz)
......
......@@ -207,6 +207,7 @@ static int __init init(void)
return 0;
}
PROVIDES_CONNTRACK(amanda);
EXPORT_SYMBOL(ip_amanda_lock);
module_init(init);
......
......@@ -437,6 +437,7 @@ static int __init init(void)
return 0;
}
PROVIDES_CONNTRACK(ftp);
EXPORT_SYMBOL(ip_ftp_lock);
MODULE_LICENSE("GPL");
......
......@@ -289,6 +289,7 @@ static void fini(void)
}
}
PROVIDES_CONNTRACK(irc);
EXPORT_SYMBOL(ip_irc_lock);
module_init(init);
......
......@@ -130,5 +130,7 @@ static int __init init(void)
return(0);
}
PROVIDES_CONNTRACK(tftp);
module_init(init);
module_exit(fini);
......@@ -221,6 +221,6 @@ static int __init init(void)
return ret;
}
NEEDS_CONNTRACK(amanda);
module_init(init);
module_exit(fini);
......@@ -341,6 +341,8 @@ static int __init init(void)
return ret;
}
NEEDS_CONNTRACK(ftp);
module_init(init);
module_exit(fini);
MODULE_LICENSE("GPL");
......@@ -404,44 +404,6 @@ int ip_nat_helper_register(struct ip_nat_helper *me)
{
int ret = 0;
if (me->me && !(me->flags & IP_NAT_HELPER_F_STANDALONE)) {
struct ip_conntrack_helper *ct_helper;
if ((ct_helper = ip_ct_find_helper(&me->tuple))) {
if (!try_module_get(ct_helper->me))
return -EBUSY;
} else {
/* We are a NAT helper for protocol X. If we need
* respective conntrack helper for protoccol X, compute
* conntrack helper name and try to load module */
char name[MODULE_NAME_LEN];
const char *tmp = module_name(me->me);
if (strlen(tmp) + 6 > MODULE_NAME_LEN) {
printk("%s: unable to "
"compute conntrack helper name "
"from %s\n", __FUNCTION__, tmp);
return -EBUSY;
}
tmp += 6;
sprintf(name, "ip_conntrack%s", tmp);
#ifdef CONFIG_KMOD
if (!request_module("ip_conntrack%s", tmp)
&& (ct_helper = ip_ct_find_helper(&me->tuple))) {
if (!try_module_get(ct_helper->me))
return -EBUSY;
} else {
printk("unable to load module %s\n", name);
return -EBUSY;
}
#else
printk("unable to load module %s automatically "
"because kernel was compiled without kernel "
"module loader support\n", name);
return -EBUSY;
#endif
}
}
WRITE_LOCK(&ip_nat_lock);
if (LIST_FIND(&helpers, helper_cmp, struct ip_nat_helper *,&me->tuple))
ret = -EBUSY;
......@@ -484,19 +446,4 @@ void ip_nat_helper_unregister(struct ip_nat_helper *me)
which is just a long-winded way of making things
worse. --RR */
ip_ct_selective_cleanup(kill_helper, me);
/* If we are no standalone NAT helper, we need to decrement usage count
* on our conntrack helper */
if (me->me && !(me->flags & IP_NAT_HELPER_F_STANDALONE)) {
struct ip_conntrack_helper *ct_helper;
if ((ct_helper = ip_ct_find_helper(&me->tuple)))
module_put(ct_helper->me);
#ifdef CONFIG_MODULES
else
printk("%s: unable to decrement usage count"
" of conntrack helper %s\n",
__FUNCTION__, me->me->name);
#endif
}
}
......@@ -279,6 +279,7 @@ static int __init init(void)
return ret;
}
NEEDS_CONNTRACK(irc);
module_init(init);
module_exit(fini);
......@@ -1306,7 +1306,7 @@ static unsigned int nat_help(struct ip_conntrack *ct,
static struct ip_nat_helper snmp = {
{ NULL, NULL },
"snmp",
IP_NAT_HELPER_F_STANDALONE,
0,
THIS_MODULE,
{ { 0, { __constant_htons(SNMP_PORT) } },
{ 0, { 0 }, IPPROTO_UDP } },
......@@ -1317,7 +1317,7 @@ static struct ip_nat_helper snmp = {
static struct ip_nat_helper snmp_trap = {
{ NULL, NULL },
"snmp_trap",
IP_NAT_HELPER_F_STANDALONE,
0,
THIS_MODULE,
{ { 0, { __constant_htons(SNMP_TRAP_PORT) } },
{ 0, { 0 }, IPPROTO_UDP } },
......
......@@ -455,7 +455,7 @@ out: return ret;
}
/* This runs via a timer and thus is always in BH context. */
static void SMP_TIMER_NAME(rt_check_expire)(unsigned long dummy)
static void rt_check_expire(unsigned long dummy)
{
static int rover;
int i = rover, t;
......@@ -498,12 +498,10 @@ static void SMP_TIMER_NAME(rt_check_expire)(unsigned long dummy)
mod_timer(&rt_periodic_timer, now + ip_rt_gc_interval);
}
SMP_TIMER_DEFINE(rt_check_expire, rt_gc_task);
/* This can run from both BH and non-BH contexts, the latter
* in the case of a forced flush event.
*/
static void SMP_TIMER_NAME(rt_run_flush)(unsigned long dummy)
static void rt_run_flush(unsigned long dummy)
{
int i;
struct rtable *rth, *next;
......@@ -526,8 +524,6 @@ static void SMP_TIMER_NAME(rt_run_flush)(unsigned long dummy)
}
}
SMP_TIMER_DEFINE(rt_run_flush, rt_cache_flush_task);
static spinlock_t rt_flush_lock = SPIN_LOCK_UNLOCKED;
void rt_cache_flush(int delay)
......@@ -559,7 +555,7 @@ void rt_cache_flush(int delay)
if (delay <= 0) {
spin_unlock_bh(&rt_flush_lock);
SMP_TIMER_NAME(rt_run_flush)(0);
rt_run_flush(0);
return;
}
......
......@@ -418,11 +418,15 @@ static int tcp_tw_death_row_slot = 0;
static void tcp_twkill(unsigned long);
/* TIME_WAIT reaping mechanism. */
#define TCP_TWKILL_SLOTS 8 /* Please keep this a power of 2. */
#define TCP_TWKILL_PERIOD (TCP_TIMEWAIT_LEN/TCP_TWKILL_SLOTS)
static struct tcp_tw_bucket *tcp_tw_death_row[TCP_TWKILL_SLOTS];
static spinlock_t tw_death_lock = SPIN_LOCK_UNLOCKED;
static struct timer_list tcp_tw_timer = TIMER_INITIALIZER(tcp_twkill, 0, 0);
static void SMP_TIMER_NAME(tcp_twkill)(unsigned long dummy)
static void tcp_twkill(unsigned long dummy)
{
struct tcp_tw_bucket *tw;
int killed = 0;
......@@ -462,8 +466,6 @@ static void SMP_TIMER_NAME(tcp_twkill)(unsigned long dummy)
spin_unlock(&tw_death_lock);
}
SMP_TIMER_DEFINE(tcp_twkill, tcp_twkill_task);
/* These are always called from BH context. See callers in
* tcp_input.c to verify this.
*/
......@@ -575,7 +577,7 @@ void tcp_tw_schedule(struct tcp_tw_bucket *tw, int timeo)
spin_unlock(&tw_death_lock);
}
void SMP_TIMER_NAME(tcp_twcal_tick)(unsigned long dummy)
void tcp_twcal_tick(unsigned long dummy)
{
int n, slot;
unsigned long j;
......@@ -626,9 +628,6 @@ void SMP_TIMER_NAME(tcp_twcal_tick)(unsigned long dummy)
spin_unlock(&tw_death_lock);
}
SMP_TIMER_DEFINE(tcp_twcal_tick, tcp_twcal_tasklet);
/* This is not only more efficient than what we used to do, it eliminates
* a lot of code duplication between IPv4/IPv6 SYN recv processing. -DaveM
*
......
......@@ -532,6 +532,7 @@ int irda_device_set_mode(struct net_device* dev, int mode)
return ret;
}
#ifdef CONFIG_ISA
/*
* Function setup_dma (idev, buffer, count, mode)
*
......@@ -553,3 +554,4 @@ void setup_dma(int channel, char *buffer, int count, int mode)
release_dma_lock(flags);
}
#endif
......@@ -167,7 +167,9 @@ EXPORT_SYMBOL(async_unwrap_char);
EXPORT_SYMBOL(irda_calc_crc16);
EXPORT_SYMBOL(irda_crc16_table);
EXPORT_SYMBOL(irda_start_timer);
#ifdef CONFIG_ISA
EXPORT_SYMBOL(setup_dma);
#endif
EXPORT_SYMBOL(infrared_mode);
#ifdef CONFIG_IRTTY
......
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