Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40809
b: refs/heads/master
c: 68ff6e8
h: refs/heads/master
i:
  40807: ab8cf2a
v: v3
  • Loading branch information
Jeff Garzik committed Nov 8, 2006
1 parent 37f1e89 commit fe570e6
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 49 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ee783a3e4867ce5691bfa6a818959e88a50f209
refs/heads/master: 68ff6e8e0e203580ecb118319b5a3b53962edf5a
2 changes: 1 addition & 1 deletion trunk/drivers/ata/sata_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static int vt6420_prereset(struct ata_port *ap)
int online;

/* don't do any SCR stuff if we're not loading */
if (!ATA_PFLAG_LOADING)
if (!(ap->pflags & ATA_PFLAG_LOADING))
goto skip_scr;

/* Resume phy. This is the old resume sequence from
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ config NET_FC
"SCSI generic support".

config SHAPER
tristate "Traffic Shaper (OBSOLETE)"
tristate "Traffic Shaper (EXPERIMENTAL)"
depends on EXPERIMENTAL
---help---
The traffic shaper is a virtual network device that allows you to
Expand All @@ -2842,9 +2842,9 @@ config SHAPER
these virtual devices. See
<file:Documentation/networking/shaper.txt> for more information.

An alternative to this traffic shaper are traffic schedulers which
you'll get if you say Y to "QoS and/or fair queuing" in
"Networking options".
An alternative to this traffic shaper is the experimental
Class-Based Queuing (CBQ) scheduling support which you get if you
say Y to "QoS and/or fair queuing" above.

To compile this driver as a module, choose M here: the module
will be called shaper. If unsure, say N.
Expand Down
19 changes: 7 additions & 12 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -10212,7 +10212,7 @@ static int __devinit tg3_phy_probe(struct tg3 *tp)
static void __devinit tg3_read_partno(struct tg3 *tp)
{
unsigned char vpd_data[256];
unsigned int i;
int i;
u32 magic;

if (tg3_nvram_read_swab(tp, 0x0, &magic))
Expand Down Expand Up @@ -10258,9 +10258,9 @@ static void __devinit tg3_read_partno(struct tg3 *tp)
}

/* Now parse and find the part number. */
for (i = 0; i < 254; ) {
for (i = 0; i < 256; ) {
unsigned char val = vpd_data[i];
unsigned int block_end;
int block_end;

if (val == 0x82 || val == 0x91) {
i = (i + 3 +
Expand All @@ -10276,26 +10276,21 @@ static void __devinit tg3_read_partno(struct tg3 *tp)
(vpd_data[i + 1] +
(vpd_data[i + 2] << 8)));
i += 3;

if (block_end > 256)
goto out_not_found;

while (i < (block_end - 2)) {
while (i < block_end) {
if (vpd_data[i + 0] == 'P' &&
vpd_data[i + 1] == 'N') {
int partno_len = vpd_data[i + 2];

i += 3;
if (partno_len > 24 || (partno_len + i) > 256)
if (partno_len > 24)
goto out_not_found;

memcpy(tp->board_part_number,
&vpd_data[i], partno_len);
&vpd_data[i + 3],
partno_len);

/* Success. */
return;
}
i += 3 + vpd_data[i + 2];
}

/* Part number not found. */
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/core/netpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,6 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
udph->dest = htons(np->remote_port);
udph->len = htons(udp_len);
udph->check = 0;
udph->check = csum_tcpudp_magic(htonl(np->local_ip),
htonl(np->remote_ip),
udp_len, IPPROTO_UDP,
csum_partial((unsigned char *)udph, udp_len, 0));
if (udph->check == 0)
udph->check = -1;

skb->nh.iph = iph = (struct iphdr *)skb_push(skb, sizeof(*iph));

Expand Down
1 change: 0 additions & 1 deletion trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ struct sk_buff *pskb_copy(struct sk_buff *skb, gfp_t gfp_mask)
n->csum = skb->csum;
n->ip_summed = skb->ip_summed;

n->truesize += skb->data_len;
n->data_len = skb->data_len;
n->len = skb->len;

Expand Down
25 changes: 12 additions & 13 deletions trunk/net/decnet/af_decnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static struct hlist_head *dn_find_list(struct sock *sk)
if (scp->addr.sdn_flags & SDF_WILD)
return hlist_empty(&dn_wild_sk) ? &dn_wild_sk : NULL;

return &dn_sk_hash[dn_ntohs(scp->addrloc) & DN_SK_HASH_MASK];
return &dn_sk_hash[scp->addrloc & DN_SK_HASH_MASK];
}

/*
Expand All @@ -180,7 +180,7 @@ static int check_port(__le16 port)
if (port == 0)
return -1;

sk_for_each(sk, node, &dn_sk_hash[dn_ntohs(port) & DN_SK_HASH_MASK]) {
sk_for_each(sk, node, &dn_sk_hash[port & DN_SK_HASH_MASK]) {
struct dn_scp *scp = DN_SK(sk);
if (scp->addrloc == port)
return -1;
Expand All @@ -194,12 +194,12 @@ static unsigned short port_alloc(struct sock *sk)
static unsigned short port = 0x2000;
unsigned short i_port = port;

while(check_port(dn_htons(++port)) != 0) {
while(check_port(++port) != 0) {
if (port == i_port)
return 0;
}

scp->addrloc = dn_htons(port);
scp->addrloc = port;

return 1;
}
Expand Down Expand Up @@ -418,7 +418,7 @@ struct sock *dn_find_by_skb(struct sk_buff *skb)
struct dn_scp *scp;

read_lock(&dn_hash_lock);
sk_for_each(sk, node, &dn_sk_hash[dn_ntohs(cb->dst_port) & DN_SK_HASH_MASK]) {
sk_for_each(sk, node, &dn_sk_hash[cb->dst_port & DN_SK_HASH_MASK]) {
scp = DN_SK(sk);
if (cb->src != dn_saddr2dn(&scp->peer))
continue;
Expand Down Expand Up @@ -1016,14 +1016,13 @@ static void dn_access_copy(struct sk_buff *skb, struct accessdata_dn *acc)

static void dn_user_copy(struct sk_buff *skb, struct optdata_dn *opt)
{
unsigned char *ptr = skb->data;
u16 len = *ptr++; /* yes, it's 8bit on the wire */

BUG_ON(len > 16); /* we've checked the contents earlier */
opt->opt_optl = dn_htons(len);
opt->opt_status = 0;
memcpy(opt->opt_data, ptr, len);
skb_pull(skb, len + 1);
unsigned char *ptr = skb->data;

opt->opt_optl = *ptr++;
opt->opt_status = 0;
memcpy(opt->opt_data, ptr, opt->opt_optl);
skb_pull(skb, dn_ntohs(opt->opt_optl) + 1);

}

static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo)
Expand Down
8 changes: 4 additions & 4 deletions trunk/net/decnet/dn_nsp_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,9 @@ static void dn_nsp_conn_conf(struct sock *sk, struct sk_buff *skb)
scp->max_window = decnet_no_fc_max_cwnd;

if (skb->len > 0) {
u16 dlen = *skb->data;
unsigned char dlen = *skb->data;
if ((dlen <= 16) && (dlen <= skb->len)) {
scp->conndata_in.opt_optl = dn_htons(dlen);
scp->conndata_in.opt_optl = dn_htons((__u16)dlen);
memcpy(scp->conndata_in.opt_data, skb->data + 1, dlen);
}
}
Expand Down Expand Up @@ -404,9 +404,9 @@ static void dn_nsp_disc_init(struct sock *sk, struct sk_buff *skb)
memset(scp->discdata_in.opt_data, 0, 16);

if (skb->len > 0) {
u16 dlen = *skb->data;
unsigned char dlen = *skb->data;
if ((dlen <= 16) && (dlen <= skb->len)) {
scp->discdata_in.opt_optl = dn_htons(dlen);
scp->discdata_in.opt_optl = dn_htons((__u16)dlen);
memcpy(scp->discdata_in.opt_data, skb->data + 1, dlen);
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/decnet/dn_nsp_out.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ void dn_send_conn_conf(struct sock *sk, gfp_t gfp)
struct nsp_conn_init_msg *msg;
__u8 len = (__u8)dn_ntohs(scp->conndata_out.opt_optl);

if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL)
if ((skb = dn_alloc_skb(sk, 50 + dn_ntohs(scp->conndata_out.opt_optl), gfp)) == NULL)
return;

msg = (struct nsp_conn_init_msg *)skb_put(skb, sizeof(*msg));
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/decnet/dn_rules.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ static struct nla_policy dn_fib_rule_policy[FRA_MAX+1] __read_mostly = {
static int dn_fib_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
{
struct dn_fib_rule *r = (struct dn_fib_rule *)rule;
__le16 daddr = fl->fld_dst;
__le16 saddr = fl->fld_src;
u16 daddr = fl->fld_dst;
u16 saddr = fl->fld_src;

if (((saddr ^ r->src) & r->srcmask) ||
((daddr ^ r->dst) & r->dstmask))
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ void __init tcp_init(void)
thash_entries,
(num_physpages >= 128 * 1024) ?
13 : 15,
0,
HASH_HIGHMEM,
&tcp_hashinfo.ehash_size,
NULL,
0);
Expand All @@ -2286,7 +2286,7 @@ void __init tcp_init(void)
tcp_hashinfo.ehash_size,
(num_physpages >= 128 * 1024) ?
13 : 15,
0,
HASH_HIGHMEM,
&tcp_hashinfo.bhash_size,
NULL,
64 * 1024);
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/sched/sch_htb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,8 @@ static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl)
struct htb_class, sibling));

/* note: this delete may happen twice (see htb_delete) */
hlist_del_init(&cl->hlist);
if (!hlist_unhashed(&cl->hlist))
hlist_del(&cl->hlist);
list_del(&cl->sibling);

if (cl->prio_activity)
Expand Down Expand Up @@ -1332,7 +1333,8 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
sch_tree_lock(sch);

/* delete from hash and active; remainder in destroy_class */
hlist_del_init(&cl->hlist);
if (!hlist_unhashed(&cl->hlist))
hlist_del(&cl->hlist);

if (cl->prio_activity)
htb_deactivate(q, cl);
Expand Down

0 comments on commit fe570e6

Please sign in to comment.