GIT b276764091cf241cf0b31e8cb76c67dcf9a9c1d8 git+ssh://master.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git commit b276764091cf241cf0b31e8cb76c67dcf9a9c1d8 Author: Michael Chan Date: Sat Apr 29 19:01:06 2006 -0700 [TG3]: Update version and reldate Update version to 3.57. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f6d9a2565bc754043f43b8f51b19f77ee0269411 Author: Michael Chan Date: Sat Apr 29 19:00:24 2006 -0700 [TG3]: Fix bug in nvram write Fix bug in nvram write function. If the starting nvram address offset happens to be the last dword of the page, the NVRAM_CMD_LAST bit will not get set in the existing code. This patch fixes the bug by changing the "else if" to "if" so that the last dword condition always gets checked. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8e7a22e3eb49042c048f24bab40cf5cf8915487d Author: Gary Zambrano Date: Sat Apr 29 18:59:13 2006 -0700 [TG3]: Add reset_phy parameter to chip reset functions Add a reset_phy parameter to tg3_reset_hw() and tg3_init_hw(). With the full chip reset during MAC address change, the automatic PHY reset during chip reset will cause a link down and bonding will not work properly as a result. With this reset_phy parameter, we can do a chip reset without link down when changing MAC address or MTU. Signed-off-by: Gary Zambrano Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 58712ef9f2cbaaeac5b32ac11810a4bbd0eeacc5 Author: Michael Chan Date: Sat Apr 29 18:58:01 2006 -0700 [TG3]: Reset chip when changing MAC address Do the full chip reset when changing MAC address if ASF is enabled. ASF sometimes uses a different MAC address than the driver. Without the reset, the ASF MAC address may be overwritten when the driver's MAC address is changed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c424cb249dae10fb7f118f89091f1329b62b92f4 Author: Michael Chan Date: Sat Apr 29 18:56:34 2006 -0700 [TG3]: Add phy workaround Add some PHY workaround code to reduce jitter on some PHYs. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c8e1e82b6a97ad44517517aa58b7b794ead0bf33 Author: Michael Chan Date: Sat Apr 29 18:55:17 2006 -0700 [TG3]: Call netif_carrier_off() during phy reset Add netif_carrier_off() call during tg3_phy_reset(). This is needed to properly track the netif_carrier state in cases where we do a PHY reset with interrupts disabled. The SerDes code will not run properly if the netif_carrier state is wrong. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c302e6d54e468ee9b1e18152e2e9da06953f3473 Author: YOSHIFUJI Hideaki Date: Fri Apr 28 15:59:15 2006 -0700 [IPV6]: Fix race in route selection. We eliminated rt6_dflt_lock (to protect default router pointer) at 2.6.17-rc1, and introduced rt6_select() for general router selection. The function is called in the context of rt6_lock read-lock held, but this means, we have some race conditions when we do round-robin. Signed-off-by; YOSHIFUJI Hideaki Signed-off-by: David S. Miller commit e959d8121fcbfee6ec049cc617e9423d1799f2e4 Author: Ingo Molnar Date: Fri Apr 28 15:32:29 2006 -0700 [XFRM]: fix incorrect xfrm_policy_afinfo_lock use xfrm_policy_afinfo_lock can be taken in bh context, at: [] lockdep_acquire_read+0x54/0x6d [] _read_lock+0x15/0x22 [] xfrm_policy_get_afinfo+0x1a/0x3d [] xfrm_decode_session+0x12/0x32 [] ip_route_me_harder+0x1c9/0x25b [] ip_nat_local_fn+0x94/0xad [] nf_iterate+0x2e/0x7a [] nf_hook_slow+0x3c/0x9e [] ip_push_pending_frames+0x2de/0x3a7 [] icmp_push_reply+0x136/0x141 [] icmp_reply+0x118/0x1a0 [] icmp_echo+0x44/0x46 [] icmp_rcv+0x111/0x138 [] ip_local_deliver+0x150/0x1f9 [] ip_rcv+0x3d5/0x413 [] netif_receive_skb+0x337/0x356 [] process_backlog+0x95/0x110 [] net_rx_action+0xa5/0x16d [] __do_softirq+0x6f/0xe6 [] do_softirq+0x52/0xb1 this means that all write-locking of xfrm_policy_afinfo_lock must be bh-safe. This patch fixes xfrm_policy_register_afinfo() and xfrm_policy_unregister_afinfo(). Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller commit f3111502c065d32dcb021f55e30398aaebd8fb0f Author: Ingo Molnar Date: Fri Apr 28 15:30:03 2006 -0700 [XFRM]: fix incorrect xfrm_state_afinfo_lock use xfrm_state_afinfo_lock can be read-locked from bh context, so take it in a bh-safe manner in xfrm_state_register_afinfo() and xfrm_state_unregister_afinfo(). Found by the lock validator. Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller commit 83de47cd0c5738105f40e65191b0761dfa7431ac Author: Hua Zhong Date: Fri Apr 28 15:26:50 2006 -0700 [TCP]: Fix unlikely usage in tcp_transmit_skb() The following unlikely should be replaced by likely because the condition happens every time unless there is a hard error to transmit a packet. Signed-off-by: Hua Zhong Signed-off-by: David S. Miller commit 8dff7c29707b7514043539f5ab5e0a6eb7bd9dcd Author: Ingo Molnar Date: Fri Apr 28 15:23:59 2006 -0700 [XFRM]: fix softirq-unsafe xfrm typemap->lock use xfrm typemap->lock may be used in softirq context, so all write_lock() uses must be softirq-safe. Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller commit a76e07acd0de635122c5e60ccd5e55f9d5082391 Author: Herbert Xu Date: Fri Apr 28 15:22:13 2006 -0700 [IPSEC]: Fix IP ID selection I was looking through the xfrm input/output code in order to abstract out the address family specific encapsulation/decapsulation code. During that process I found this bug in the IP ID selection code in xfrm4_output.c. At that point dst is still the xfrm_dst for the current SA which represents an internal flow as far as the IPsec tunnel is concerned. Since the IP ID is going to sit on the outside of the encapsulated packet, we obviously want the external flow which is just dst->child. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit da753beaeb1446aa87bcca7e8a0026633a8914f0 Author: Akinobu Mita Date: Fri Apr 28 15:21:23 2006 -0700 [NET]: use hlist_unhashed() Use hlist_unhashed() rather than accessing inside data structure. Signed-off-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit a536e0778781c1f2ce38cf8e1d82ce258f0193c1 Author: Heiko Carstens Date: Fri Apr 28 15:19:17 2006 -0700 [IPV4]: inet_init() -> fs_initcall Convert inet_init to an fs_initcall to make sure its called before any device driver's initcall. Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: David S. Miller commit 09493abfdbe8144ce0805efac7a8a3c4eb869c12 Author: Soyoung Park Date: Fri Apr 28 14:59:44 2006 -0700 [NETLINK]: cleanup unused macro in net/netlink/af_netlink.c 1 line removal, of unused macro. ran 'egrep -r' from linux-2.6.16/ for Nprintk and didn't see it anywhere else but here, in #define... Signed-off-by: Soyoung Park Signed-off-by: David S. Miller commit 89bbb0a361cdae50eec863f10a876b58abf7d312 Author: Stephen Hemminger Date: Fri Apr 28 12:11:36 2006 -0700 [PKT_SCHED] netem: fix loss The following one line fix is needed to make loss function of netem work right when doing loss on the local host. Otherwise, higher layers just recover. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 43dff98b022ded593e73c3784bac03bc9fc7ec55 Author: Shaun Pereira Date: Fri Apr 28 12:00:17 2006 -0700 [X25]: fix for spinlock recurse and spinlock lockup with timer handler When the sk_timer function x25_heartbeat_expiry() is called by the kernel in a running/terminating process, spinlock-recursion and spinlock-lockup locks up the kernel. This has happened with testing on some distro's and the patch below fixed it. Signed-off-by: Shaun Pereira Signed-off-by: David S. Miller --- Signed-off-by: Andrew Morton --- drivers/net/tg3.c | 82 +++++++++++++++++++---------- drivers/net/tg3.h | 1 include/linux/list.h | 2 include/net/inet_timewait_sock.h | 2 include/net/sock.h | 2 net/ipv4/af_inet.c | 2 net/ipv4/tcp_output.c | 2 net/ipv4/xfrm4_output.c | 2 net/ipv6/route.c | 5 + net/netlink/af_netlink.c | 1 net/sched/sch_netem.c | 2 net/x25/x25_timer.c | 4 - net/xfrm/xfrm_policy.c | 16 ++--- net/xfrm/xfrm_state.c | 8 +- 14 files changed, 82 insertions(+), 49 deletions(-) diff -puN drivers/net/tg3.c~git-net drivers/net/tg3.c --- devel/drivers/net/tg3.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/drivers/net/tg3.c 2006-04-30 00:30:17.000000000 -0700 @@ -69,8 +69,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.56" -#define DRV_MODULE_RELDATE "Apr 1, 2006" +#define DRV_MODULE_VERSION "3.57" +#define DRV_MODULE_RELDATE "Apr 28, 2006" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -974,6 +974,8 @@ static int tg3_phy_reset_5703_4_5(struct return err; } +static void tg3_link_report(struct tg3 *); + /* This will reset the tigon3 PHY if there is no valid * link unless the FORCE argument is non-zero. */ @@ -987,6 +989,11 @@ static int tg3_phy_reset(struct tg3 *tp) if (err != 0) return -EBUSY; + if (netif_running(tp->dev) && netif_carrier_ok(tp->dev)) { + netif_carrier_off(tp->dev); + tg3_link_report(tp); + } + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { @@ -1023,6 +1030,12 @@ out: tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x14e2); tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); } + else if (tp->tg3_flags2 & TG3_FLG2_PHY_JITTER_BUG) { + tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); + tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000a); + tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x010b); + tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); + } /* Set Extended packet length bit (bit 14) on all chips that */ /* support jumbo frames */ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { @@ -3531,7 +3544,7 @@ static irqreturn_t tg3_test_isr(int irq, return IRQ_RETVAL(0); } -static int tg3_init_hw(struct tg3 *); +static int tg3_init_hw(struct tg3 *, int); static int tg3_halt(struct tg3 *, int, int); #ifdef CONFIG_NET_POLL_CONTROLLER @@ -3567,7 +3580,7 @@ static void tg3_reset_task(void *_data) tp->tg3_flags2 &= ~TG3_FLG2_RESTART_TIMER; tg3_halt(tp, RESET_KIND_SHUTDOWN, 0); - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tg3_netif_start(tp); @@ -4042,7 +4055,7 @@ static int tg3_change_mtu(struct net_dev tg3_set_mtu(dev, tp, new_mtu); - tg3_init_hw(tp); + tg3_init_hw(tp, 0); tg3_netif_start(tp); @@ -5719,9 +5732,23 @@ static int tg3_set_mac_addr(struct net_d if (!netif_running(dev)) return 0; - spin_lock_bh(&tp->lock); - __tg3_set_mac_addr(tp); - spin_unlock_bh(&tp->lock); + if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { + /* Reset chip so that ASF can re-init any MAC addresses it + * needs. + */ + tg3_netif_stop(tp); + tg3_full_lock(tp, 1); + + tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); + tg3_init_hw(tp, 0); + + tg3_netif_start(tp); + tg3_full_unlock(tp); + } else { + spin_lock_bh(&tp->lock); + __tg3_set_mac_addr(tp); + spin_unlock_bh(&tp->lock); + } return 0; } @@ -5771,7 +5798,7 @@ static void __tg3_set_coalesce(struct tg } /* tp->lock is held. */ -static int tg3_reset_hw(struct tg3 *tp) +static int tg3_reset_hw(struct tg3 *tp, int reset_phy) { u32 val, rdmac_mode; int i, err, limit; @@ -5786,7 +5813,7 @@ static int tg3_reset_hw(struct tg3 *tp) tg3_abort_hw(tp, 1); } - if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) + if ((tp->tg3_flags2 & TG3_FLG2_MII_SERDES) && reset_phy) tg3_phy_reset(tp); err = tg3_chip_reset(tp); @@ -6327,7 +6354,7 @@ static int tg3_reset_hw(struct tg3 *tp) tw32(GRC_LOCAL_CTRL, tp->grc_local_ctrl); } - err = tg3_setup_phy(tp, 1); + err = tg3_setup_phy(tp, reset_phy); if (err) return err; @@ -6400,7 +6427,7 @@ static int tg3_reset_hw(struct tg3 *tp) /* Called at device open time to get the chip ready for * packet processing. Invoked with tp->lock held. */ -static int tg3_init_hw(struct tg3 *tp) +static int tg3_init_hw(struct tg3 *tp, int reset_phy) { int err; @@ -6413,7 +6440,7 @@ static int tg3_init_hw(struct tg3 *tp) tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); - err = tg3_reset_hw(tp); + err = tg3_reset_hw(tp, reset_phy); out: return err; @@ -6683,7 +6710,7 @@ static int tg3_test_msi(struct tg3 *tp) tg3_full_lock(tp, 1); tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - err = tg3_init_hw(tp); + err = tg3_init_hw(tp, 1); tg3_full_unlock(tp); @@ -6748,7 +6775,7 @@ static int tg3_open(struct net_device *d tg3_full_lock(tp, 0); - err = tg3_init_hw(tp); + err = tg3_init_hw(tp, 1); if (err) { tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); tg3_free_rings(tp); @@ -7839,7 +7866,7 @@ static int tg3_set_ringparam(struct net_ if (netif_running(dev)) { tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tg3_netif_start(tp); } @@ -7884,7 +7911,7 @@ static int tg3_set_pauseparam(struct net if (netif_running(dev)) { tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tg3_netif_start(tp); } @@ -8522,7 +8549,7 @@ static int tg3_test_loopback(struct tg3 if (!netif_running(tp->dev)) return TG3_LOOPBACK_FAILED; - tg3_reset_hw(tp); + tg3_reset_hw(tp, 1); if (tg3_run_loopback(tp, TG3_MAC_LOOPBACK)) err |= TG3_MAC_LOOPBACK_FAILED; @@ -8596,7 +8623,7 @@ static void tg3_self_test(struct net_dev tg3_halt(tp, RESET_KIND_SHUTDOWN, 1); if (netif_running(dev)) { tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tg3_netif_start(tp); } @@ -9377,7 +9404,7 @@ static int tg3_nvram_write_block_buffere if ((page_off == 0) || (i == 0)) nvram_cmd |= NVRAM_CMD_FIRST; - else if (page_off == (tp->nvram_pagesize - 4)) + if (page_off == (tp->nvram_pagesize - 4)) nvram_cmd |= NVRAM_CMD_LAST; if (i == (len - 4)) @@ -10353,10 +10380,13 @@ static int __devinit tg3_get_invariants( if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) tp->tg3_flags2 |= TG3_FLG2_PHY_5704_A0_BUG; - if ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && - (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5755) && - (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5787)) - tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; + if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { + if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755 || + GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) + tp->tg3_flags2 |= TG3_FLG2_PHY_JITTER_BUG; + else + tp->tg3_flags2 |= TG3_FLG2_PHY_BER_BUG; + } tp->coalesce_mode = 0; if (GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5700_AX && @@ -11569,7 +11599,7 @@ static int tg3_suspend(struct pci_dev *p tg3_full_lock(tp, 0); tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tp->timer.expires = jiffies + tp->timer_offset; add_timer(&tp->timer); @@ -11603,7 +11633,7 @@ static int tg3_resume(struct pci_dev *pd tg3_full_lock(tp, 0); tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; - tg3_init_hw(tp); + tg3_init_hw(tp, 1); tp->timer.expires = jiffies + tp->timer_offset; add_timer(&tp->timer); diff -puN drivers/net/tg3.h~git-net drivers/net/tg3.h --- devel/drivers/net/tg3.h~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/drivers/net/tg3.h 2006-04-30 00:30:17.000000000 -0700 @@ -2215,6 +2215,7 @@ struct tg3 { #define TG3_FLG2_HW_TSO_2 0x08000000 #define TG3_FLG2_HW_TSO (TG3_FLG2_HW_TSO_1 | TG3_FLG2_HW_TSO_2) #define TG3_FLG2_1SHOT_MSI 0x10000000 +#define TG3_FLG2_PHY_JITTER_BUG 0x20000000 u32 split_mode_max_reqs; #define SPLIT_MODE_5704_MAX_REQ 3 diff -puN include/linux/list.h~git-net include/linux/list.h --- devel/include/linux/list.h~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/include/linux/list.h 2006-04-30 00:30:17.000000000 -0700 @@ -619,7 +619,7 @@ static inline void hlist_del_rcu(struct static inline void hlist_del_init(struct hlist_node *n) { - if (n->pprev) { + if (!hlist_unhashed(n)) { __hlist_del(n); INIT_HLIST_NODE(n); } diff -puN include/net/inet_timewait_sock.h~git-net include/net/inet_timewait_sock.h --- devel/include/net/inet_timewait_sock.h~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/include/net/inet_timewait_sock.h 2006-04-30 00:30:17.000000000 -0700 @@ -150,7 +150,7 @@ static inline void inet_twsk_add_bind_no static inline int inet_twsk_dead_hashed(const struct inet_timewait_sock *tw) { - return tw->tw_death_node.pprev != NULL; + return !hlist_unhashed(&tw->tw_death_node); } static inline void inet_twsk_dead_node_init(struct inet_timewait_sock *tw) diff -puN include/net/sock.h~git-net include/net/sock.h --- devel/include/net/sock.h~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/include/net/sock.h 2006-04-30 00:30:17.000000000 -0700 @@ -279,7 +279,7 @@ static inline int sk_unhashed(const stru static inline int sk_hashed(const struct sock *sk) { - return sk->sk_node.pprev != NULL; + return !sk_unhashed(sk); } static __inline__ void sk_node_init(struct hlist_node *node) diff -puN net/ipv4/af_inet.c~git-net net/ipv4/af_inet.c --- devel/net/ipv4/af_inet.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/ipv4/af_inet.c 2006-04-30 00:30:17.000000000 -0700 @@ -1257,7 +1257,7 @@ out_unregister_udp_proto: goto out; } -module_init(inet_init); +fs_initcall(inet_init); /* ------------------------------------------------------------------------ */ diff -puN net/ipv4/tcp_output.c~git-net net/ipv4/tcp_output.c --- devel/net/ipv4/tcp_output.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/ipv4/tcp_output.c 2006-04-30 00:30:17.000000000 -0700 @@ -465,7 +465,7 @@ static int tcp_transmit_skb(struct sock TCP_INC_STATS(TCP_MIB_OUTSEGS); err = icsk->icsk_af_ops->queue_xmit(skb, 0); - if (unlikely(err <= 0)) + if (likely(err <= 0)) return err; tcp_enter_cwr(sk); diff -puN net/ipv4/xfrm4_output.c~git-net net/ipv4/xfrm4_output.c --- devel/net/ipv4/xfrm4_output.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/ipv4/xfrm4_output.c 2006-04-30 00:30:17.000000000 -0700 @@ -62,7 +62,7 @@ static void xfrm4_encap(struct sk_buff * top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ? 0 : (iph->frag_off & htons(IP_DF)); if (!top_iph->frag_off) - __ip_select_ident(top_iph, dst, 0); + __ip_select_ident(top_iph, dst->child, 0); top_iph->ttl = dst_metric(dst->child, RTAX_HOPLIMIT); diff -puN net/ipv6/route.c~git-net net/ipv6/route.c --- devel/net/ipv6/route.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/ipv6/route.c 2006-04-30 00:30:17.000000000 -0700 @@ -317,7 +317,7 @@ static struct rt6_info *rt6_select(struc __FUNCTION__, head, head ? *head : NULL, oif); for (rt = rt0, metric = rt0->rt6i_metric; - rt && rt->rt6i_metric == metric; + rt && rt->rt6i_metric == metric && (!last || rt != rt0); rt = rt->u.next) { int m; @@ -343,9 +343,12 @@ static struct rt6_info *rt6_select(struc (strict & RT6_SELECT_F_REACHABLE) && last && last != rt0) { /* no entries matched; do round-robin */ + static spinlock_t lock = SPIN_LOCK_UNLOCKED; + spin_lock(&lock); *head = rt0->u.next; rt0->u.next = last->u.next; last->u.next = rt0; + spin_unlock(&lock); } RT6_TRACE("%s() => %p, score=%d\n", diff -puN net/netlink/af_netlink.c~git-net net/netlink/af_netlink.c --- devel/net/netlink/af_netlink.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/netlink/af_netlink.c 2006-04-30 00:30:17.000000000 -0700 @@ -62,7 +62,6 @@ #include #include -#define Nprintk(a...) #define NLGRPSZ(x) (ALIGN(x, sizeof(unsigned long) * 8) / 8) struct netlink_sock { diff -puN net/sched/sch_netem.c~git-net net/sched/sch_netem.c --- devel/net/sched/sch_netem.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/sched/sch_netem.c 2006-04-30 00:30:17.000000000 -0700 @@ -167,7 +167,7 @@ static int netem_enqueue(struct sk_buff if (count == 0) { sch->qstats.drops++; kfree_skb(skb); - return NET_XMIT_DROP; + return NET_XMIT_BYPASS; } /* diff -puN net/x25/x25_timer.c~git-net net/x25/x25_timer.c --- devel/net/x25/x25_timer.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/x25/x25_timer.c 2006-04-30 00:30:17.000000000 -0700 @@ -114,8 +114,9 @@ static void x25_heartbeat_expiry(unsigne if (sock_flag(sk, SOCK_DESTROY) || (sk->sk_state == TCP_LISTEN && sock_flag(sk, SOCK_DEAD))) { + bh_unlock_sock(sk); x25_destroy_socket(sk); - goto unlock; + return; } break; @@ -128,7 +129,6 @@ static void x25_heartbeat_expiry(unsigne } restart_heartbeat: x25_start_heartbeat(sk); -unlock: bh_unlock_sock(sk); } diff -puN net/xfrm/xfrm_policy.c~git-net net/xfrm/xfrm_policy.c --- devel/net/xfrm/xfrm_policy.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/xfrm/xfrm_policy.c 2006-04-30 00:30:17.000000000 -0700 @@ -57,12 +57,12 @@ int xfrm_register_type(struct xfrm_type return -EAFNOSUPPORT; typemap = afinfo->type_map; - write_lock(&typemap->lock); + write_lock_bh(&typemap->lock); if (likely(typemap->map[type->proto] == NULL)) typemap->map[type->proto] = type; else err = -EEXIST; - write_unlock(&typemap->lock); + write_unlock_bh(&typemap->lock); xfrm_policy_put_afinfo(afinfo); return err; } @@ -78,12 +78,12 @@ int xfrm_unregister_type(struct xfrm_typ return -EAFNOSUPPORT; typemap = afinfo->type_map; - write_lock(&typemap->lock); + write_lock_bh(&typemap->lock); if (unlikely(typemap->map[type->proto] != type)) err = -ENOENT; else typemap->map[type->proto] = NULL; - write_unlock(&typemap->lock); + write_unlock_bh(&typemap->lock); xfrm_policy_put_afinfo(afinfo); return err; } @@ -1251,7 +1251,7 @@ int xfrm_policy_register_afinfo(struct x return -EINVAL; if (unlikely(afinfo->family >= NPROTO)) return -EAFNOSUPPORT; - write_lock(&xfrm_policy_afinfo_lock); + write_lock_bh(&xfrm_policy_afinfo_lock); if (unlikely(xfrm_policy_afinfo[afinfo->family] != NULL)) err = -ENOBUFS; else { @@ -1268,7 +1268,7 @@ int xfrm_policy_register_afinfo(struct x afinfo->garbage_collect = __xfrm_garbage_collect; xfrm_policy_afinfo[afinfo->family] = afinfo; } - write_unlock(&xfrm_policy_afinfo_lock); + write_unlock_bh(&xfrm_policy_afinfo_lock); return err; } EXPORT_SYMBOL(xfrm_policy_register_afinfo); @@ -1280,7 +1280,7 @@ int xfrm_policy_unregister_afinfo(struct return -EINVAL; if (unlikely(afinfo->family >= NPROTO)) return -EAFNOSUPPORT; - write_lock(&xfrm_policy_afinfo_lock); + write_lock_bh(&xfrm_policy_afinfo_lock); if (likely(xfrm_policy_afinfo[afinfo->family] != NULL)) { if (unlikely(xfrm_policy_afinfo[afinfo->family] != afinfo)) err = -EINVAL; @@ -1294,7 +1294,7 @@ int xfrm_policy_unregister_afinfo(struct afinfo->garbage_collect = NULL; } } - write_unlock(&xfrm_policy_afinfo_lock); + write_unlock_bh(&xfrm_policy_afinfo_lock); return err; } EXPORT_SYMBOL(xfrm_policy_unregister_afinfo); diff -puN net/xfrm/xfrm_state.c~git-net net/xfrm/xfrm_state.c --- devel/net/xfrm/xfrm_state.c~git-net 2006-04-30 00:30:17.000000000 -0700 +++ devel-akpm/net/xfrm/xfrm_state.c 2006-04-30 00:30:17.000000000 -0700 @@ -1061,7 +1061,7 @@ int xfrm_state_register_afinfo(struct xf return -EINVAL; if (unlikely(afinfo->family >= NPROTO)) return -EAFNOSUPPORT; - write_lock(&xfrm_state_afinfo_lock); + write_lock_bh(&xfrm_state_afinfo_lock); if (unlikely(xfrm_state_afinfo[afinfo->family] != NULL)) err = -ENOBUFS; else { @@ -1069,7 +1069,7 @@ int xfrm_state_register_afinfo(struct xf afinfo->state_byspi = xfrm_state_byspi; xfrm_state_afinfo[afinfo->family] = afinfo; } - write_unlock(&xfrm_state_afinfo_lock); + write_unlock_bh(&xfrm_state_afinfo_lock); return err; } EXPORT_SYMBOL(xfrm_state_register_afinfo); @@ -1081,7 +1081,7 @@ int xfrm_state_unregister_afinfo(struct return -EINVAL; if (unlikely(afinfo->family >= NPROTO)) return -EAFNOSUPPORT; - write_lock(&xfrm_state_afinfo_lock); + write_lock_bh(&xfrm_state_afinfo_lock); if (likely(xfrm_state_afinfo[afinfo->family] != NULL)) { if (unlikely(xfrm_state_afinfo[afinfo->family] != afinfo)) err = -EINVAL; @@ -1091,7 +1091,7 @@ int xfrm_state_unregister_afinfo(struct afinfo->state_bydst = NULL; } } - write_unlock(&xfrm_state_afinfo_lock); + write_unlock_bh(&xfrm_state_afinfo_lock); return err; } EXPORT_SYMBOL(xfrm_state_unregister_afinfo); _