Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
xfrm: Fix xfrm_policy_gc_lock handling.
niu: Use pci_ioremap_bar().
bnx2x: Version Update
bnx2x: Calling netif_carrier_off at the end of the probe
bnx2x: PCI configuration bug on big-endian
bnx2x: Removing the PMF indication when unloading
mv643xx_eth: fix SMI bus access timeouts
net: kconfig cleanup
fs_enet: fix polling
XFRM: copy_to_user_kmaddress() reports local address twice
SMC91x: Fix compilation on some platforms.
udp: Fix the SNMP counter of UDP_MIB_INERRORS
udp: Fix the SNMP counter of UDP_MIB_INDATAGRAMS
drivers/net/smc911x.c: Fix lockdep warning on xmit.

+64 -32
+15 -3
drivers/net/Kconfig
··· 2010 2010 If in doubt, say N. 2011 2011 2012 2012 config IGB_DCA 2013 - bool "Enable DCA" 2013 + bool "Direct Cache Access (DCA) Support" 2014 2014 default y 2015 2015 depends on IGB && DCA && !(IGB=y && DCA=m) 2016 + ---help--- 2017 + Say Y here if you want to use Direct Cache Access (DCA) in the 2018 + driver. DCA is a method for warming the CPU cache before data 2019 + is used, with the intent of lessening the impact of cache misses. 2016 2020 2017 2021 source "drivers/net/ixp2000/Kconfig" 2018 2022 ··· 2441 2437 will be called ixgbe. 2442 2438 2443 2439 config IXGBE_DCA 2444 - bool 2440 + bool "Direct Cache Access (DCA) Support" 2445 2441 default y 2446 2442 depends on IXGBE && DCA && !(IXGBE=y && DCA=m) 2443 + ---help--- 2444 + Say Y here if you want to use Direct Cache Access (DCA) in the 2445 + driver. DCA is a method for warming the CPU cache before data 2446 + is used, with the intent of lessening the impact of cache misses. 2447 2447 2448 2448 config IXGB 2449 2449 tristate "Intel(R) PRO/10GbE support" ··· 2497 2489 will be called myri10ge. 2498 2490 2499 2491 config MYRI10GE_DCA 2500 - bool 2492 + bool "Direct Cache Access (DCA) Support" 2501 2493 default y 2502 2494 depends on MYRI10GE && DCA && !(MYRI10GE=y && DCA=m) 2495 + ---help--- 2496 + Say Y here if you want to use Direct Cache Access (DCA) in the 2497 + driver. DCA is a method for warming the CPU cache before data 2498 + is used, with the intent of lessening the impact of cache misses. 2503 2499 2504 2500 config NETXEN_NIC 2505 2501 tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC"
+5 -4
drivers/net/bnx2x_init.h
··· 564 564 565 565 static void bnx2x_init_pxp(struct bnx2x *bp) 566 566 { 567 + u16 devctl; 567 568 int r_order, w_order; 568 569 u32 val, i; 569 570 570 571 pci_read_config_word(bp->pdev, 571 - bp->pcie_cap + PCI_EXP_DEVCTL, (u16 *)&val); 572 - DP(NETIF_MSG_HW, "read 0x%x from devctl\n", (u16)val); 573 - w_order = ((val & PCI_EXP_DEVCTL_PAYLOAD) >> 5); 574 - r_order = ((val & PCI_EXP_DEVCTL_READRQ) >> 12); 572 + bp->pcie_cap + PCI_EXP_DEVCTL, &devctl); 573 + DP(NETIF_MSG_HW, "read 0x%x from devctl\n", devctl); 574 + w_order = ((devctl & PCI_EXP_DEVCTL_PAYLOAD) >> 5); 575 + r_order = ((devctl & PCI_EXP_DEVCTL_READRQ) >> 12); 575 576 576 577 if (r_order > MAX_RD_ORD) { 577 578 DP(NETIF_MSG_HW, "read order of %d order adjusted to %d\n",
+6 -4
drivers/net/bnx2x_main.c
··· 59 59 #include "bnx2x.h" 60 60 #include "bnx2x_init.h" 61 61 62 - #define DRV_MODULE_VERSION "1.45.22" 63 - #define DRV_MODULE_RELDATE "2008/09/09" 62 + #define DRV_MODULE_VERSION "1.45.23" 63 + #define DRV_MODULE_RELDATE "2008/11/03" 64 64 #define BNX2X_BC_VER 0x040200 65 65 66 66 /* Time in jiffies before concluding the transmitter is hung */ ··· 6481 6481 bnx2x_free_irq(bp); 6482 6482 load_error: 6483 6483 bnx2x_free_mem(bp); 6484 + bp->port.pmf = 0; 6484 6485 6485 6486 /* TBD we really need to reset the chip 6486 6487 if we want to recover from this */ ··· 6792 6791 /* Report UNLOAD_DONE to MCP */ 6793 6792 if (!BP_NOMCP(bp)) 6794 6793 bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE); 6794 + bp->port.pmf = 0; 6795 6795 6796 6796 /* Free SKBs, SGEs, TPA pool and driver internals */ 6797 6797 bnx2x_free_skbs(bp); ··· 10206 10204 return -ENOMEM; 10207 10205 } 10208 10206 10209 - netif_carrier_off(dev); 10210 - 10211 10207 bp = netdev_priv(dev); 10212 10208 bp->msglevel = debug; 10213 10209 ··· 10228 10228 unregister_netdev(dev); 10229 10229 goto init_one_exit; 10230 10230 } 10231 + 10232 + netif_carrier_off(dev); 10231 10233 10232 10234 bp->common.name = board_info[ent->driver_data].name; 10233 10235 printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
+4 -2
drivers/net/fs_enet/fs_enet-main.c
··· 1099 1099 ndev->stop = fs_enet_close; 1100 1100 ndev->get_stats = fs_enet_get_stats; 1101 1101 ndev->set_multicast_list = fs_set_multicast_list; 1102 - 1102 + #ifdef CONFIG_NET_POLL_CONTROLLER 1103 + ndev->poll_controller = fs_enet_netpoll; 1104 + #endif 1103 1105 if (fpi->use_napi) 1104 1106 netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi, 1105 1107 fpi->napi_weight); ··· 1211 1209 static void fs_enet_netpoll(struct net_device *dev) 1212 1210 { 1213 1211 disable_irq(dev->irq); 1214 - fs_enet_interrupt(dev->irq, dev, NULL); 1212 + fs_enet_interrupt(dev->irq, dev); 1215 1213 enable_irq(dev->irq); 1216 1214 } 1217 1215 #endif
+6 -3
drivers/net/mv643xx_eth.c
··· 1066 1066 return 0; 1067 1067 } 1068 1068 1069 - if (!wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp), 1070 - msecs_to_jiffies(100))) 1071 - return -ETIMEDOUT; 1069 + if (!smi_is_done(msp)) { 1070 + wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp), 1071 + msecs_to_jiffies(100)); 1072 + if (!smi_is_done(msp)) 1073 + return -ETIMEDOUT; 1074 + } 1072 1075 1073 1076 return 0; 1074 1077 }
+1 -5
drivers/net/niu.c
··· 8667 8667 static int __devinit niu_pci_init_one(struct pci_dev *pdev, 8668 8668 const struct pci_device_id *ent) 8669 8669 { 8670 - unsigned long niureg_base, niureg_len; 8671 8670 union niu_parent_id parent_id; 8672 8671 struct net_device *dev; 8673 8672 struct niu *np; ··· 8757 8758 8758 8759 dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM); 8759 8760 8760 - niureg_base = pci_resource_start(pdev, 0); 8761 - niureg_len = pci_resource_len(pdev, 0); 8762 - 8763 - np->regs = ioremap_nocache(niureg_base, niureg_len); 8761 + np->regs = pci_ioremap_bar(pdev, 0); 8764 8762 if (!np->regs) { 8765 8763 dev_err(&pdev->dev, PFX "Cannot map device registers, " 8766 8764 "aborting.\n");
+1 -1
drivers/net/smc911x.c
··· 499 499 #else 500 500 SMC_PUSH_DATA(lp, buf, len); 501 501 dev->trans_start = jiffies; 502 - dev_kfree_skb(skb); 502 + dev_kfree_skb_irq(skb); 503 503 #endif 504 504 if (!lp->tx_throttle) { 505 505 netif_wake_queue(dev);
+2
drivers/net/smc91x.c
··· 2060 2060 struct net_device *ndev) 2061 2061 { 2062 2062 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2063 + struct smc_local *lp __maybe_unused = netdev_priv(ndev); 2063 2064 2064 2065 if (!res) 2065 2066 return 0; ··· 2075 2074 struct net_device *ndev) 2076 2075 { 2077 2076 struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib"); 2077 + struct smc_local *lp __maybe_unused = netdev_priv(ndev); 2078 2078 2079 2079 if (res) 2080 2080 release_mem_region(res->start, ATTRIB_SIZE);
+21 -7
net/ipv6/udp.c
··· 138 138 int peeked; 139 139 int err; 140 140 int is_udplite = IS_UDPLITE(sk); 141 + int is_udp4; 141 142 142 143 if (addr_len) 143 144 *addr_len=sizeof(struct sockaddr_in6); ··· 158 157 copied = ulen; 159 158 else if (copied < ulen) 160 159 msg->msg_flags |= MSG_TRUNC; 160 + 161 + is_udp4 = (skb->protocol == htons(ETH_P_IP)); 161 162 162 163 /* 163 164 * If checksum is needed at all, try to do it while copying the ··· 183 180 if (err) 184 181 goto out_free; 185 182 186 - if (!peeked) 187 - UDP6_INC_STATS_USER(sock_net(sk), 188 - UDP_MIB_INDATAGRAMS, is_udplite); 183 + if (!peeked) { 184 + if (is_udp4) 185 + UDP_INC_STATS_USER(sock_net(sk), 186 + UDP_MIB_INDATAGRAMS, is_udplite); 187 + else 188 + UDP6_INC_STATS_USER(sock_net(sk), 189 + UDP_MIB_INDATAGRAMS, is_udplite); 190 + } 189 191 190 192 sock_recv_timestamp(msg, sk, skb); 191 193 ··· 204 196 sin6->sin6_flowinfo = 0; 205 197 sin6->sin6_scope_id = 0; 206 198 207 - if (skb->protocol == htons(ETH_P_IP)) 199 + if (is_udp4) 208 200 ipv6_addr_set(&sin6->sin6_addr, 0, 0, 209 201 htonl(0xffff), ip_hdr(skb)->saddr); 210 202 else { ··· 215 207 } 216 208 217 209 } 218 - if (skb->protocol == htons(ETH_P_IP)) { 210 + if (is_udp4) { 219 211 if (inet->cmsg_flags) 220 212 ip_cmsg_recv(msg, skb); 221 213 } else { ··· 236 228 237 229 csum_copy_err: 238 230 lock_sock(sk); 239 - if (!skb_kill_datagram(sk, skb, flags)) 240 - UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite); 231 + if (!skb_kill_datagram(sk, skb, flags)) { 232 + if (is_udp4) 233 + UDP_INC_STATS_USER(sock_net(sk), 234 + UDP_MIB_INERRORS, is_udplite); 235 + else 236 + UDP6_INC_STATS_USER(sock_net(sk), 237 + UDP_MIB_INERRORS, is_udplite); 238 + } 241 239 release_sock(sk); 242 240 243 241 if (flags & MSG_DONTWAIT)
+2 -2
net/xfrm/xfrm_policy.c
··· 315 315 return; 316 316 } 317 317 318 - spin_lock(&xfrm_policy_gc_lock); 318 + spin_lock_bh(&xfrm_policy_gc_lock); 319 319 hlist_add_head(&policy->bydst, &xfrm_policy_gc_list); 320 - spin_unlock(&xfrm_policy_gc_lock); 320 + spin_unlock_bh(&xfrm_policy_gc_lock); 321 321 322 322 schedule_work(&xfrm_policy_gc_work); 323 323 }
+1 -1
net/xfrm/xfrm_user.c
··· 1816 1816 uk.family = k->family; 1817 1817 uk.reserved = k->reserved; 1818 1818 memcpy(&uk.local, &k->local, sizeof(uk.local)); 1819 - memcpy(&uk.remote, &k->local, sizeof(uk.remote)); 1819 + memcpy(&uk.remote, &k->remote, sizeof(uk.remote)); 1820 1820 1821 1821 return nla_put(skb, XFRMA_KMADDRESS, sizeof(uk), &uk); 1822 1822 }