Commit 348fe6fa authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents df886b22 22402e99
......@@ -2681,7 +2681,7 @@ static int gem_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return rc;
}
#if (!defined(__sparc__) && !defined(CONFIG_PPC))
#if (!defined(__sparc__) && !defined(CONFIG_PPC_PMAC))
/* Fetch MAC address from vital product data of PCI ROM. */
static void find_eth_addr_in_vpd(void __iomem *rom_base, int len, unsigned char *dev_addr)
{
......
......@@ -99,7 +99,6 @@ extern int tcf_act_police(struct sk_buff **skb, struct tc_action *a);
#endif /* CONFIG_NET_CLS_ACT */
extern int tcf_police(struct sk_buff *skb, struct tcf_police *p);
extern int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st, spinlock_t *lock);
extern void tcf_police_destroy(struct tcf_police *p);
extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est);
extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p);
......
......@@ -37,7 +37,7 @@ extern int dn_nsp_rx(struct sk_buff *);
extern int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
extern struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri);
extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, int *err);
extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err);
#define NSP_REASON_OK 0 /* No error */
#define NSP_REASON_NR 1 /* No resources */
......
......@@ -222,9 +222,6 @@ extern void qdisc_reset(struct Qdisc *qdisc);
extern void qdisc_destroy(struct Qdisc *qdisc);
extern struct Qdisc * qdisc_create_dflt(struct net_device *dev,
struct Qdisc_ops *ops);
extern int qdisc_new_estimator(struct tc_stats *stats, spinlock_t *stats_lock,
struct rtattr *opt);
extern void qdisc_kill_estimator(struct tc_stats *stats);
extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
struct rtattr *tab);
extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
......
......@@ -59,7 +59,6 @@ static void neigh_app_notify(struct neighbour *n);
static int pneigh_ifdown(struct neigh_table *tbl, struct net_device *dev);
void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev);
static int neigh_glbl_allocs;
static struct neigh_table *neigh_tables;
static struct file_operations neigh_stat_seq_fops;
......@@ -282,7 +281,6 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl)
n->timer.data = (unsigned long)n;
NEIGH_CACHE_STAT_INC(tbl, allocs);
neigh_glbl_allocs++;
n->tbl = tbl;
atomic_set(&n->refcnt, 1);
n->dead = 1;
......@@ -612,7 +610,6 @@ void neigh_destroy(struct neighbour *neigh)
NEIGH_PRINTK2("neigh %p is destroyed.\n", neigh);
neigh_glbl_allocs--;
atomic_dec(&neigh->tbl->entries);
kmem_cache_free(neigh->tbl->kmem_cachep, neigh);
}
......
......@@ -1723,7 +1723,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
goto out;
if (signal_pending(current)) {
rv = -ERESTARTSYS;
rv = sock_intr_errno(timeo);
goto out;
}
......@@ -1957,7 +1957,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock,
goto out;
if (signal_pending(current)) {
err = -ERESTARTSYS;
err = sock_intr_errno(timeo);
goto out;
}
......@@ -1992,7 +1992,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock,
/*
* Get a suitably sized skb.
*/
skb = dn_alloc_send_skb(sk, &len, flags & MSG_DONTWAIT, &err);
skb = dn_alloc_send_skb(sk, &len, flags & MSG_DONTWAIT, timeo, &err);
if (err)
break;
......
......@@ -141,7 +141,7 @@ struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri)
* whole size thats been asked for (plus 11 bytes of header). If this
* fails, then we try for any size over 16 bytes for SOCK_STREAMS.
*/
struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, int *err)
struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err)
{
int space;
int len;
......@@ -151,7 +151,7 @@ struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, in
while(skb == NULL) {
if (signal_pending(current)) {
*err = ERESTARTSYS;
*err = sock_intr_errno(timeo);
break;
}
......
......@@ -1676,7 +1676,7 @@ static struct dn_route *dn_rt_cache_get_first(struct seq_file *seq)
rt = dn_rt_hash_table[s->bucket].chain;
if (rt)
break;
rcu_read_unlock();
rcu_read_unlock_bh();
}
return rt;
}
......
......@@ -49,7 +49,7 @@ static int help(struct sk_buff *skb,
{
struct ip_conntrack_expect *exp;
struct ip_ct_amanda_expect *exp_amanda_info;
char *amp, *data, *data_limit, *tmp;
char *data, *data_limit, *tmp;
unsigned int dataoff, i;
u_int16_t port, len;
......@@ -70,11 +70,9 @@ static int help(struct sk_buff *skb,
}
LOCK_BH(&amanda_buffer_lock);
amp = skb_header_pointer(skb, dataoff,
skb->len - dataoff, amanda_buffer);
BUG_ON(amp == NULL);
data = amp;
data_limit = amp + skb->len - dataoff;
skb_copy_bits(skb, dataoff, amanda_buffer, skb->len - dataoff);
data = amanda_buffer;
data_limit = amanda_buffer + skb->len - dataoff;
*data_limit = '\0';
/* Search for the CONNECT string */
......@@ -110,7 +108,7 @@ static int help(struct sk_buff *skb,
exp->mask.dst.u.tcp.port = 0xFFFF;
exp_amanda_info = &exp->help.exp_amanda_info;
exp_amanda_info->offset = tmp - amp;
exp_amanda_info->offset = tmp - amanda_buffer;
exp_amanda_info->port = port;
exp_amanda_info->len = len;
......
......@@ -1882,7 +1882,8 @@ int ip6_mc_add_src(struct inet6_dev *idev, struct in6_addr *pmca, int sfmode,
if (err) {
int j;
pmc->mca_sfcount[sfmode]--;
if (!delta)
pmc->mca_sfcount[sfmode]--;
for (j=0; j<i; j++)
(void) ip6_mc_del1_src(pmc, sfmode, &psfsrc[i]);
} else if (isexclude != (pmc->mca_sfcount[MCAST_EXCLUDE] != 0)) {
......
......@@ -424,10 +424,9 @@ static int netlink_autobind(struct socket *sock)
sk_for_each(osk, node, head) {
if (nlk_sk(osk)->pid == pid) {
/* Bind collision, search negative pid values. */
if (pid > 0)
pid = rover;
else if (--pid > 0)
pid = -4097;
pid = rover--;
if (rover > -4097)
rover = -4097;
netlink_table_ungrab();
goto retry;
}
......
......@@ -5,7 +5,6 @@
obj-y := sch_generic.o
obj-$(CONFIG_NET_SCHED) += sch_api.o sch_fifo.o
obj-$(CONFIG_NET_ESTIMATOR) += estimator.o
obj-$(CONFIG_NET_CLS) += cls_api.o
obj-$(CONFIG_NET_CLS_ACT) += act_api.o
obj-$(CONFIG_NET_ACT_POLICE) += police.o
......
......@@ -203,9 +203,9 @@ tcf_gact_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
RTA_PUT(skb, TCA_GACT_PROB, sizeof (p_opt), &p_opt);
}
#endif
t.install = jiffies - p->tm.install;
t.lastuse = jiffies - p->tm.lastuse;
t.expires = p->tm.expires;
t.install = jiffies_to_clock_t(jiffies - p->tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
t.expires = jiffies_to_clock_t(p->tm.expires);
RTA_PUT(skb, TCA_GACT_TM, sizeof (t), &t);
return skb->len;
......
......@@ -334,9 +334,9 @@ tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
RTA_PUT(skb, TCA_IPT_HOOK, 4, &p->hook);
RTA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c);
RTA_PUT(skb, TCA_IPT_TABLE, IFNAMSIZ, p->tname);
tm.install = jiffies - p->tm.install;
tm.lastuse = jiffies - p->tm.lastuse;
tm.expires = p->tm.expires;
tm.install = jiffies_to_clock_t(jiffies - p->tm.install);
tm.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
tm.expires = jiffies_to_clock_t(p->tm.expires);
RTA_PUT(skb, TCA_IPT_TM, sizeof (tm), &tm);
return skb->len;
......
......@@ -138,8 +138,9 @@ tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int
p->eaction = parm->eaction;
if (parm->ifindex) {
p->ifindex = parm->ifindex;
if (ovr)
dev_put(p->dev);
p->dev = dev;
dev_hold(p->dev);
}
spin_unlock(&p->lock);
}
......@@ -257,9 +258,9 @@ tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
opt.ifindex = p->ifindex;
DPRINTK(" tcf_mirred_dump index %d action %d eaction %d ifndex %d\n",p->index,p->action,p->eaction,p->ifindex);
RTA_PUT(skb, TCA_MIRRED_PARMS, sizeof (opt), &opt);
t.install = jiffies - p->tm.install;
t.lastuse = jiffies - p->tm.lastuse;
t.expires = p->tm.expires;
t.install = jiffies_to_clock_t(jiffies - p->tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
t.expires = jiffies_to_clock_t(p->tm.expires);
RTA_PUT(skb, TCA_MIRRED_TM, sizeof (t), &t);
return skb->len;
......
......@@ -244,9 +244,9 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref)
#endif
RTA_PUT(skb, TCA_PEDIT_PARMS, s, opt);
t.install = jiffies - p->tm.install;
t.lastuse = jiffies - p->tm.lastuse;
t.expires = p->tm.expires;
t.install = jiffies_to_clock_t(jiffies - p->tm.install);
t.lastuse = jiffies_to_clock_t(jiffies - p->tm.lastuse);
t.expires = jiffies_to_clock_t(p->tm.expires);
RTA_PUT(skb, TCA_PEDIT_TM, sizeof (t), &t);
return skb->len;
......
......@@ -451,11 +451,9 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp)
else
sch->handle = handle;
/* enqueue is accessed locklessly - make sure it's visible
* before we set a netdevice's qdisc pointer to sch */
if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
qdisc_lock_tree(dev);
list_add_tail_rcu(&sch->list, &dev->qdisc_list);
list_add_tail(&sch->list, &dev->qdisc_list);
qdisc_unlock_tree(dev);
#ifdef CONFIG_NET_ESTIMATOR
......@@ -728,19 +726,6 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
return 0;
}
int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st, spinlock_t *lock)
{
spin_lock_bh(lock);
RTA_PUT(skb, TCA_STATS, sizeof(struct tc_stats), st);
spin_unlock_bh(lock);
return 0;
rtattr_failure:
spin_unlock_bh(lock);
return -1;
}
static int tc_fill_qdisc(struct sk_buff *skb, struct Qdisc *q, u32 clid,
u32 pid, u32 seq, unsigned flags, int event)
{
......@@ -1271,7 +1256,6 @@ static int __init pktsched_init(void)
subsys_initcall(pktsched_init);
EXPORT_SYMBOL(qdisc_copy_stats);
EXPORT_SYMBOL(qdisc_get_rtab);
EXPORT_SYMBOL(qdisc_put_rtab);
EXPORT_SYMBOL(register_qdisc);
......
......@@ -280,6 +280,7 @@ struct Qdisc noop_qdisc = {
.dequeue = noop_dequeue,
.flags = TCQ_F_BUILTIN,
.ops = &noop_qdisc_ops,
.list = LIST_HEAD_INIT(noop_qdisc.list),
};
struct Qdisc_ops noqueue_qdisc_ops = {
......@@ -298,6 +299,7 @@ struct Qdisc noqueue_qdisc = {
.dequeue = noop_dequeue,
.flags = TCQ_F_BUILTIN,
.ops = &noqueue_qdisc_ops,
.list = LIST_HEAD_INIT(noqueue_qdisc.list),
};
......@@ -436,9 +438,6 @@ struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops)
dev_hold(dev);
sch->stats_lock = &dev->queue_lock;
atomic_set(&sch->refcnt, 1);
/* enqueue is accessed locklessly - make sure it's visible
* before we set a netdevice's qdisc pointer to sch */
smp_wmb();
if (!ops->init || ops->init(sch, NULL) == 0)
return sch;
......@@ -477,15 +476,15 @@ static void __qdisc_destroy(struct rcu_head *head)
module_put(ops->owner);
dev_put(qdisc->dev);
if (!(qdisc->flags&TCQ_F_BUILTIN))
kfree((char *) qdisc - qdisc->padded);
kfree((char *) qdisc - qdisc->padded);
}
/* Under dev->queue_lock and BH! */
void qdisc_destroy(struct Qdisc *qdisc)
{
if (!atomic_dec_and_test(&qdisc->refcnt))
if (qdisc->flags & TCQ_F_BUILTIN ||
!atomic_dec_and_test(&qdisc->refcnt))
return;
list_del(&qdisc->list);
call_rcu(&qdisc->q_rcu, __qdisc_destroy);
......@@ -519,7 +518,8 @@ void dev_activate(struct net_device *dev)
}
spin_lock_bh(&dev->queue_lock);
if ((dev->qdisc = dev->qdisc_sleeping) != &noqueue_qdisc) {
rcu_assign_pointer(dev->qdisc, dev->qdisc_sleeping);
if (dev->qdisc != &noqueue_qdisc) {
dev->trans_start = jiffies;
dev_watchdog_up(dev);
}
......
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