diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-26 04:22:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-26 04:22:01 -0400 |
commit | f0de70f8bb56952f6e016a65a8a8d006918f5bf6 (patch) | |
tree | 1d38f828b212adc0a0f2d100d58544979fab543d | |
parent | bb3daa4a5960cd9d39bad88679fcf587b456c05d (diff) | |
parent | cda6d377ec6b2ee2e58d563d0bd7eb313e0165df (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r-- | drivers/net/dnet.c | 1 | ||||
-rw-r--r-- | drivers/net/phy/smsc.c | 31 | ||||
-rw-r--r-- | net/bridge/br_if.c | 1 | ||||
-rw-r--r-- | net/ipv4/udp.c | 6 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_proto_tcp.c | 3 |
5 files changed, 39 insertions, 3 deletions
diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c index c05c2d69fbf6..db1e31f95200 100644 --- a/drivers/net/dnet.c +++ b/drivers/net/dnet.c | |||
@@ -9,6 +9,7 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <linux/version.h> | 11 | #include <linux/version.h> |
12 | #include <linux/io.h> | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
14 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c index 1387187543e4..5123bb954dd7 100644 --- a/drivers/net/phy/smsc.c +++ b/drivers/net/phy/smsc.c | |||
@@ -159,6 +159,30 @@ static struct phy_driver lan911x_int_driver = { | |||
159 | .driver = { .owner = THIS_MODULE, } | 159 | .driver = { .owner = THIS_MODULE, } |
160 | }; | 160 | }; |
161 | 161 | ||
162 | static struct phy_driver lan8710_driver = { | ||
163 | .phy_id = 0x0007c0f0, /* OUI=0x00800f, Model#=0x0f */ | ||
164 | .phy_id_mask = 0xfffffff0, | ||
165 | .name = "SMSC LAN8710/LAN8720", | ||
166 | |||
167 | .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause | ||
168 | | SUPPORTED_Asym_Pause), | ||
169 | .flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG, | ||
170 | |||
171 | /* basic functions */ | ||
172 | .config_aneg = genphy_config_aneg, | ||
173 | .read_status = genphy_read_status, | ||
174 | .config_init = smsc_phy_config_init, | ||
175 | |||
176 | /* IRQ related */ | ||
177 | .ack_interrupt = smsc_phy_ack_interrupt, | ||
178 | .config_intr = smsc_phy_config_intr, | ||
179 | |||
180 | .suspend = genphy_suspend, | ||
181 | .resume = genphy_resume, | ||
182 | |||
183 | .driver = { .owner = THIS_MODULE, } | ||
184 | }; | ||
185 | |||
162 | static int __init smsc_init(void) | 186 | static int __init smsc_init(void) |
163 | { | 187 | { |
164 | int ret; | 188 | int ret; |
@@ -179,8 +203,14 @@ static int __init smsc_init(void) | |||
179 | if (ret) | 203 | if (ret) |
180 | goto err4; | 204 | goto err4; |
181 | 205 | ||
206 | ret = phy_driver_register (&lan8710_driver); | ||
207 | if (ret) | ||
208 | goto err5; | ||
209 | |||
182 | return 0; | 210 | return 0; |
183 | 211 | ||
212 | err5: | ||
213 | phy_driver_unregister (&lan911x_int_driver); | ||
184 | err4: | 214 | err4: |
185 | phy_driver_unregister (&lan8700_driver); | 215 | phy_driver_unregister (&lan8700_driver); |
186 | err3: | 216 | err3: |
@@ -193,6 +223,7 @@ err1: | |||
193 | 223 | ||
194 | static void __exit smsc_exit(void) | 224 | static void __exit smsc_exit(void) |
195 | { | 225 | { |
226 | phy_driver_unregister (&lan8710_driver); | ||
196 | phy_driver_unregister (&lan911x_int_driver); | 227 | phy_driver_unregister (&lan911x_int_driver); |
197 | phy_driver_unregister (&lan8700_driver); | 228 | phy_driver_unregister (&lan8700_driver); |
198 | phy_driver_unregister (&lan8187_driver); | 229 | phy_driver_unregister (&lan8187_driver); |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 727c5c510a60..8a96672e2c5c 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -426,7 +426,6 @@ err2: | |||
426 | err1: | 426 | err1: |
427 | kobject_del(&p->kobj); | 427 | kobject_del(&p->kobj); |
428 | err0: | 428 | err0: |
429 | kobject_put(&p->kobj); | ||
430 | dev_set_promiscuity(dev, -1); | 429 | dev_set_promiscuity(dev, -1); |
431 | put_back: | 430 | put_back: |
432 | dev_put(dev); | 431 | dev_put(dev); |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index ace2ac8a42f7..bda08a09357d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1618,7 +1618,8 @@ static struct sock *udp_get_next(struct seq_file *seq, struct sock *sk) | |||
1618 | } while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != state->family)); | 1618 | } while (sk && (!net_eq(sock_net(sk), net) || sk->sk_family != state->family)); |
1619 | 1619 | ||
1620 | if (!sk) { | 1620 | if (!sk) { |
1621 | spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); | 1621 | if (state->bucket < UDP_HTABLE_SIZE) |
1622 | spin_unlock_bh(&state->udp_table->hash[state->bucket].lock); | ||
1622 | return udp_get_first(seq, state->bucket + 1); | 1623 | return udp_get_first(seq, state->bucket + 1); |
1623 | } | 1624 | } |
1624 | return sk; | 1625 | return sk; |
@@ -1636,6 +1637,9 @@ static struct sock *udp_get_idx(struct seq_file *seq, loff_t pos) | |||
1636 | 1637 | ||
1637 | static void *udp_seq_start(struct seq_file *seq, loff_t *pos) | 1638 | static void *udp_seq_start(struct seq_file *seq, loff_t *pos) |
1638 | { | 1639 | { |
1640 | struct udp_iter_state *state = seq->private; | ||
1641 | state->bucket = UDP_HTABLE_SIZE; | ||
1642 | |||
1639 | return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN; | 1643 | return *pos ? udp_get_idx(seq, *pos-1) : SEQ_START_TOKEN; |
1640 | } | 1644 | } |
1641 | 1645 | ||
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index e46f3b79adb3..0aeb8b09a1f7 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/skbuff.h> | 15 | #include <linux/skbuff.h> |
16 | #include <linux/ipv6.h> | 16 | #include <linux/ipv6.h> |
17 | #include <net/ip6_checksum.h> | 17 | #include <net/ip6_checksum.h> |
18 | #include <asm/unaligned.h> | ||
18 | 19 | ||
19 | #include <net/tcp.h> | 20 | #include <net/tcp.h> |
20 | 21 | ||
@@ -468,7 +469,7 @@ static void tcp_sack(const struct sk_buff *skb, unsigned int dataoff, | |||
468 | for (i = 0; | 469 | for (i = 0; |
469 | i < (opsize - TCPOLEN_SACK_BASE); | 470 | i < (opsize - TCPOLEN_SACK_BASE); |
470 | i += TCPOLEN_SACK_PERBLOCK) { | 471 | i += TCPOLEN_SACK_PERBLOCK) { |
471 | tmp = ntohl(*((__be32 *)(ptr+i)+1)); | 472 | tmp = get_unaligned_be32((__be32 *)(ptr+i)+1); |
472 | 473 | ||
473 | if (after(tmp, *sack)) | 474 | if (after(tmp, *sack)) |
474 | *sack = tmp; | 475 | *sack = tmp; |