Skip to content

Commit

Permalink
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Jun 23, 2005
2 parents b7c84c6 + 2c4ee8f commit 060de20
Show file tree
Hide file tree
Showing 17 changed files with 921 additions and 482 deletions.
580 changes: 407 additions & 173 deletions crypto/tcrypt.c

Large diffs are not rendered by default.

449 changes: 262 additions & 187 deletions crypto/tcrypt.h

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions drivers/net/appletalk/ltpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,7 @@ struct net_device * __init ltpc_probe(void)
inb_p(io+1);
inb_p(io+3);

set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(2*HZ/100);
msleep(20);

inb_p(io+0);
inb_p(io+2);
Expand All @@ -1120,8 +1119,7 @@ struct net_device * __init ltpc_probe(void)
inb_p(io+5); /* enable dma */
inb_p(io+6); /* tri-state interrupt line */

set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ);
ssleep(1);

/* now, figure out which dma channel we're using, unless it's
already been specified */
Expand Down
4 changes: 2 additions & 2 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
struct divert_blk;
struct vlan_group;
struct ethtool_ops;
struct netpoll;
struct netpoll_info;
/* source back-compat hooks */
#define SET_ETHTOOL_OPS(netdev,ops) \
( (netdev)->ethtool_ops = (ops) )
Expand Down Expand Up @@ -468,7 +468,7 @@ struct net_device
unsigned char *haddr);
int (*neigh_setup)(struct net_device *dev, struct neigh_parms *);
#ifdef CONFIG_NETPOLL
struct netpoll *np;
struct netpoll_info *npinfo;
#endif
#ifdef CONFIG_NET_POLL_CONTROLLER
void (*poll_controller)(struct net_device *dev);
Expand Down
3 changes: 2 additions & 1 deletion include/linux/netfilter_ipv4/ipt_CLUSTERIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ struct clusterip_config;
struct ipt_clusterip_tgt_info {

u_int32_t flags;
struct clusterip_config *config;

/* only relevant for new ones */
u_int8_t clustermac[6];
Expand All @@ -27,6 +26,8 @@ struct ipt_clusterip_tgt_info {
u_int16_t local_nodes[CLUSTERIP_MAX_NODES];
enum clusterip_hashmode hash_mode;
u_int32_t hash_initval;

struct clusterip_config *config;
};

#endif /*_IPT_CLUSTERIP_H_target*/
34 changes: 26 additions & 8 deletions include/linux/netpoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ struct netpoll;
struct netpoll {
struct net_device *dev;
char dev_name[16], *name;
int rx_flags;
void (*rx_hook)(struct netpoll *, int, char *, int);
void (*drop)(struct sk_buff *skb);
u32 local_ip, remote_ip;
u16 local_port, remote_port;
unsigned char local_mac[6], remote_mac[6];
};

struct netpoll_info {
spinlock_t poll_lock;
int poll_owner;
int rx_flags;
spinlock_t rx_lock;
struct netpoll *rx_np; /* netpoll that registered an rx_hook */
};

void netpoll_poll(struct netpoll *np);
Expand All @@ -39,22 +44,35 @@ void netpoll_queue(struct sk_buff *skb);
#ifdef CONFIG_NETPOLL
static inline int netpoll_rx(struct sk_buff *skb)
{
return skb->dev->np && skb->dev->np->rx_flags && __netpoll_rx(skb);
struct netpoll_info *npinfo = skb->dev->npinfo;
unsigned long flags;
int ret = 0;

if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
return 0;

spin_lock_irqsave(&npinfo->rx_lock, flags);
/* check rx_flags again with the lock held */
if (npinfo->rx_flags && __netpoll_rx(skb))
ret = 1;
spin_unlock_irqrestore(&npinfo->rx_lock, flags);

return ret;
}

static inline void netpoll_poll_lock(struct net_device *dev)
{
if (dev->np) {
spin_lock(&dev->np->poll_lock);
dev->np->poll_owner = smp_processor_id();
if (dev->npinfo) {
spin_lock(&dev->npinfo->poll_lock);
dev->npinfo->poll_owner = smp_processor_id();
}
}

static inline void netpoll_poll_unlock(struct net_device *dev)
{
if (dev->np) {
spin_unlock(&dev->np->poll_lock);
dev->np->poll_owner = -1;
if (dev->npinfo) {
dev->npinfo->poll_owner = -1;
spin_unlock(&dev->npinfo->poll_lock);
}
}

Expand Down
12 changes: 12 additions & 0 deletions include/linux/x25.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* History
* mar/20/00 Daniela Squassoni Disabling/enabling of facilities
* negotiation.
* apr/02/05 Shaun Pereira Selective sub address matching with
* call user data
*/

#ifndef X25_KERNEL_H
Expand All @@ -16,6 +18,9 @@
#define SIOCX25GCALLUSERDATA (SIOCPROTOPRIVATE + 4)
#define SIOCX25SCALLUSERDATA (SIOCPROTOPRIVATE + 5)
#define SIOCX25GCAUSEDIAG (SIOCPROTOPRIVATE + 6)
#define SIOCX25SCUDMATCHLEN (SIOCPROTOPRIVATE + 7)
#define SIOCX25CALLACCPTAPPRV (SIOCPROTOPRIVATE + 8)
#define SIOCX25SENDCALLACCPT (SIOCPROTOPRIVATE + 9)

/*
* Values for {get,set}sockopt.
Expand Down Expand Up @@ -109,4 +114,11 @@ struct x25_causediag {
unsigned char diagnostic;
};

/*
* Further optional call user data match length selection
*/
struct x25_subaddr {
unsigned int cudmatchlength;
};

#endif
9 changes: 5 additions & 4 deletions include/net/x25.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ enum {
#define X25_DEFAULT_PACKET_SIZE X25_PS128 /* Default Packet Size */
#define X25_DEFAULT_THROUGHPUT 0x0A /* Deafult Throughput */
#define X25_DEFAULT_REVERSE 0x00 /* Default Reverse Charging */
#define X25_DENY_ACCPT_APPRV 0x01 /* Default value */
#define X25_ALLOW_ACCPT_APPRV 0x00 /* Control enabled */

#define X25_SMODULUS 8
#define X25_EMODULUS 128
Expand All @@ -94,7 +96,7 @@ enum {
#define X25_FAC_CLASS_C 0x80
#define X25_FAC_CLASS_D 0xC0

#define X25_FAC_REVERSE 0x01
#define X25_FAC_REVERSE 0x01 /* also fast select */
#define X25_FAC_THROUGHPUT 0x02
#define X25_FAC_PACKET_SIZE 0x42
#define X25_FAC_WINDOW_SIZE 0x43
Expand Down Expand Up @@ -134,8 +136,8 @@ struct x25_sock {
struct sock sk;
struct x25_address source_addr, dest_addr;
struct x25_neigh *neighbour;
unsigned int lci;
unsigned char state, condition, qbitincl, intflag;
unsigned int lci, cudmatchlength;
unsigned char state, condition, qbitincl, intflag, accptapprv;
unsigned short vs, vr, va, vl;
unsigned long t2, t21, t22, t23;
unsigned short fraglen;
Expand Down Expand Up @@ -242,7 +244,6 @@ extern int x25_validate_nr(struct sock *, unsigned short);
extern void x25_write_internal(struct sock *, int);
extern int x25_decode(struct sock *, struct sk_buff *, int *, int *, int *, int *, int *);
extern void x25_disconnect(struct sock *, int, unsigned char, unsigned char);
extern int x25_check_calluserdata(struct x25_calluserdata *,struct x25_calluserdata *);

/* x25_timer.c */
extern void x25_start_heartbeat(struct sock *);
Expand Down
7 changes: 3 additions & 4 deletions net/appletalk/aarp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <net/datalink.h>
#include <net/psnap.h>
#include <linux/atalk.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
Expand Down Expand Up @@ -462,8 +463,7 @@ void aarp_probe_network(struct atalk_iface *atif)
aarp_send_probe(atif->dev, &atif->address);

/* Defer 1/10th */
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ / 10);
msleep(100);

if (atif->status & ATIF_PROBE_FAIL)
break;
Expand Down Expand Up @@ -510,9 +510,8 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct atalk_addr *sa)
aarp_send_probe(atif->dev, sa);

/* Defer 1/10th */
current->state = TASK_INTERRUPTIBLE;
write_unlock_bh(&aarp_lock);
schedule_timeout(HZ / 10);
msleep(100);
write_lock_bh(&aarp_lock);

if (entry->status & ATIF_PROBE_FAIL)
Expand Down
21 changes: 7 additions & 14 deletions net/bridge/netfilter/ebtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,8 +859,7 @@ static int translate_table(struct ebt_replace *repl,
if (repl->valid_hooks & (1 << i))
if (check_chainloops(newinfo->hook_entry[i],
cl_s, udc_cnt, i, newinfo->entries)) {
if (cl_s)
vfree(cl_s);
vfree(cl_s);
return -EINVAL;
}

Expand All @@ -883,8 +882,7 @@ static int translate_table(struct ebt_replace *repl,
EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_cleanup_entry, &i);
}
if (cl_s)
vfree(cl_s);
vfree(cl_s);
return ret;
}

Expand Down Expand Up @@ -1030,8 +1028,7 @@ static int do_replace(void __user *user, unsigned int len)
}
vfree(table);

if (counterstmp)
vfree(counterstmp);
vfree(counterstmp);
return ret;

free_unlock:
Expand All @@ -1040,20 +1037,17 @@ static int do_replace(void __user *user, unsigned int len)
EBT_ENTRY_ITERATE(newinfo->entries, newinfo->entries_size,
ebt_cleanup_entry, NULL);
free_counterstmp:
if (counterstmp)
vfree(counterstmp);
vfree(counterstmp);
/* can be initialized in translate_table() */
if (newinfo->chainstack) {
for (i = 0; i < num_possible_cpus(); i++)
vfree(newinfo->chainstack[i]);
vfree(newinfo->chainstack);
}
free_entries:
if (newinfo->entries)
vfree(newinfo->entries);
vfree(newinfo->entries);
free_newinfo:
if (newinfo)
vfree(newinfo);
vfree(newinfo);
return ret;
}

Expand Down Expand Up @@ -1213,8 +1207,7 @@ void ebt_unregister_table(struct ebt_table *table)
down(&ebt_mutex);
LIST_DELETE(&ebt_tables, table);
up(&ebt_mutex);
if (table->private->entries)
vfree(table->private->entries);
vfree(table->private->entries);
if (table->private->chainstack) {
for (i = 0; i < num_possible_cpus(); i++)
vfree(table->private->chainstack[i]);
Expand Down
Loading

0 comments on commit 060de20

Please sign in to comment.