]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Nov 2008 16:30:12 +0000 (08:30 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Nov 2008 16:30:12 +0000 (08:30 -0800)
* 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.

drivers/net/Kconfig
drivers/net/bnx2x_init.h
drivers/net/bnx2x_main.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/mv643xx_eth.c
drivers/net/niu.c
drivers/net/smc911x.c
drivers/net/smc91x.c
net/ipv6/udp.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_user.c

index f749b40f954e65e7ed5965320749c8261e76842e..11f143f4adf6d379682833679bb9ffa7cb99346c 100644 (file)
@@ -2010,9 +2010,13 @@ config IGB_LRO
          If in doubt, say N.
 
 config IGB_DCA
-       bool "Enable DCA"
+       bool "Direct Cache Access (DCA) Support"
        default y
        depends on IGB && DCA && !(IGB=y && DCA=m)
+       ---help---
+         Say Y here if you want to use Direct Cache Access (DCA) in the
+         driver.  DCA is a method for warming the CPU cache before data
+         is used, with the intent of lessening the impact of cache misses.
 
 source "drivers/net/ixp2000/Kconfig"
 
@@ -2437,9 +2441,13 @@ config IXGBE
          will be called ixgbe.
 
 config IXGBE_DCA
-       bool
+       bool "Direct Cache Access (DCA) Support"
        default y
        depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
+       ---help---
+         Say Y here if you want to use Direct Cache Access (DCA) in the
+         driver.  DCA is a method for warming the CPU cache before data
+         is used, with the intent of lessening the impact of cache misses.
 
 config IXGB
        tristate "Intel(R) PRO/10GbE support"
@@ -2489,9 +2497,13 @@ config MYRI10GE
          will be called myri10ge.
 
 config MYRI10GE_DCA
-       bool
+       bool "Direct Cache Access (DCA) Support"
        default y
        depends on MYRI10GE && DCA && !(MYRI10GE=y && DCA=m)
+       ---help---
+         Say Y here if you want to use Direct Cache Access (DCA) in the
+         driver.  DCA is a method for warming the CPU cache before data
+         is used, with the intent of lessening the impact of cache misses.
 
 config NETXEN_NIC
        tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC"
index 130927cfc75b63c79f986280029ddc4596f81c46..a6c0b3abba290a9cd75c7b7c4a764874c4e55801 100644 (file)
@@ -564,14 +564,15 @@ static const struct arb_line write_arb_addr[NUM_WR_Q-1] = {
 
 static void bnx2x_init_pxp(struct bnx2x *bp)
 {
+       u16 devctl;
        int r_order, w_order;
        u32 val, i;
 
        pci_read_config_word(bp->pdev,
-                            bp->pcie_cap + PCI_EXP_DEVCTL, (u16 *)&val);
-       DP(NETIF_MSG_HW, "read 0x%x from devctl\n", (u16)val);
-       w_order = ((val & PCI_EXP_DEVCTL_PAYLOAD) >> 5);
-       r_order = ((val & PCI_EXP_DEVCTL_READRQ) >> 12);
+                            bp->pcie_cap + PCI_EXP_DEVCTL, &devctl);
+       DP(NETIF_MSG_HW, "read 0x%x from devctl\n", devctl);
+       w_order = ((devctl & PCI_EXP_DEVCTL_PAYLOAD) >> 5);
+       r_order = ((devctl & PCI_EXP_DEVCTL_READRQ) >> 12);
 
        if (r_order > MAX_RD_ORD) {
                DP(NETIF_MSG_HW, "read order of %d  order adjusted to %d\n",
index fce745148ff9a9896640be5e4c4fa780d3fc6b72..600210d7eff95da4f60840b530f149cec8259e45 100644 (file)
@@ -59,8 +59,8 @@
 #include "bnx2x.h"
 #include "bnx2x_init.h"
 
-#define DRV_MODULE_VERSION     "1.45.22"
-#define DRV_MODULE_RELDATE     "2008/09/09"
+#define DRV_MODULE_VERSION     "1.45.23"
+#define DRV_MODULE_RELDATE     "2008/11/03"
 #define BNX2X_BC_VER           0x040200
 
 /* Time in jiffies before concluding the transmitter is hung */
@@ -6481,6 +6481,7 @@ load_int_disable:
        bnx2x_free_irq(bp);
 load_error:
        bnx2x_free_mem(bp);
+       bp->port.pmf = 0;
 
        /* TBD we really need to reset the chip
           if we want to recover from this */
@@ -6791,6 +6792,7 @@ unload_error:
        /* Report UNLOAD_DONE to MCP */
        if (!BP_NOMCP(bp))
                bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE);
+       bp->port.pmf = 0;
 
        /* Free SKBs, SGEs, TPA pool and driver internals */
        bnx2x_free_skbs(bp);
@@ -10204,8 +10206,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
                return -ENOMEM;
        }
 
-       netif_carrier_off(dev);
-
        bp = netdev_priv(dev);
        bp->msglevel = debug;
 
@@ -10229,6 +10229,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
                goto init_one_exit;
        }
 
+       netif_carrier_off(dev);
+
        bp->common.name = board_info[ent->driver_data].name;
        printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
               " IRQ %d, ", dev->name, bp->common.name,
index cb51c1fb0338e722334dcab4f72e6f9abb79137d..a6f49d02578711ed090a7625a34152e4b36655bc 100644 (file)
@@ -1099,7 +1099,9 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
        ndev->stop = fs_enet_close;
        ndev->get_stats = fs_enet_get_stats;
        ndev->set_multicast_list = fs_set_multicast_list;
-
+#ifdef CONFIG_NET_POLL_CONTROLLER
+       ndev->poll_controller = fs_enet_netpoll;
+#endif
        if (fpi->use_napi)
                netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi,
                               fpi->napi_weight);
@@ -1209,7 +1211,7 @@ static void __exit fs_cleanup(void)
 static void fs_enet_netpoll(struct net_device *dev)
 {
        disable_irq(dev->irq);
-       fs_enet_interrupt(dev->irq, dev, NULL);
+       fs_enet_interrupt(dev->irq, dev);
        enable_irq(dev->irq);
 }
 #endif
index a9c8c08044b1847ebe560964433ad3ee4a564322..b9dcdbd369f87b87e5e9e12650e50d7ada6d9465 100644 (file)
@@ -1066,9 +1066,12 @@ static int smi_wait_ready(struct mv643xx_eth_shared_private *msp)
                return 0;
        }
 
-       if (!wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp),
-                               msecs_to_jiffies(100)))
-               return -ETIMEDOUT;
+       if (!smi_is_done(msp)) {
+               wait_event_timeout(msp->smi_busy_wait, smi_is_done(msp),
+                                  msecs_to_jiffies(100));
+               if (!smi_is_done(msp))
+                       return -ETIMEDOUT;
+       }
 
        return 0;
 }
index ebc81270290339d09b94c3f6e46a8a921a68b2a4..9acb5d70a3ae310c4ac179469a7d5f18ae721b32 100644 (file)
@@ -8667,7 +8667,6 @@ static void __devinit niu_device_announce(struct niu *np)
 static int __devinit niu_pci_init_one(struct pci_dev *pdev,
                                      const struct pci_device_id *ent)
 {
-       unsigned long niureg_base, niureg_len;
        union niu_parent_id parent_id;
        struct net_device *dev;
        struct niu *np;
@@ -8758,10 +8757,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
 
        dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM);
 
-       niureg_base = pci_resource_start(pdev, 0);
-       niureg_len = pci_resource_len(pdev, 0);
-
-       np->regs = ioremap_nocache(niureg_base, niureg_len);
+       np->regs = pci_ioremap_bar(pdev, 0);
        if (!np->regs) {
                dev_err(&pdev->dev, PFX "Cannot map device registers, "
                        "aborting.\n");
index f59c7772f34435a13eb91cfccbd399210205a83a..5051554ff05b06f6c90c0a7f2ed006b96e3fafc0 100644 (file)
@@ -499,7 +499,7 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
 #else
        SMC_PUSH_DATA(lp, buf, len);
        dev->trans_start = jiffies;
-       dev_kfree_skb(skb);
+       dev_kfree_skb_irq(skb);
 #endif
        if (!lp->tx_throttle) {
                netif_wake_queue(dev);
index 6f9895d4e5bdf3016b5930d8b6716a81bf714ed7..fc80f250da31e8940bcc2d89d781de5eca66d7f2 100644 (file)
@@ -2060,6 +2060,7 @@ static int smc_request_attrib(struct platform_device *pdev,
                              struct net_device *ndev)
 {
        struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
+       struct smc_local *lp __maybe_unused = netdev_priv(ndev);
 
        if (!res)
                return 0;
@@ -2074,6 +2075,7 @@ static void smc_release_attrib(struct platform_device *pdev,
                               struct net_device *ndev)
 {
        struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
+       struct smc_local *lp __maybe_unused = netdev_priv(ndev);
 
        if (res)
                release_mem_region(res->start, ATTRIB_SIZE);
index 71e259e866a16c93cad70fb65a9bab6313da4b93..8b48512ebf6ac98ce279a7ca69daa6639970f1e3 100644 (file)
@@ -138,6 +138,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
        int peeked;
        int err;
        int is_udplite = IS_UDPLITE(sk);
+       int is_udp4;
 
        if (addr_len)
                *addr_len=sizeof(struct sockaddr_in6);
@@ -158,6 +159,8 @@ try_again:
        else if (copied < ulen)
                msg->msg_flags |= MSG_TRUNC;
 
+       is_udp4 = (skb->protocol == htons(ETH_P_IP));
+
        /*
         * If checksum is needed at all, try to do it while copying the
         * data.  If the data is truncated, or if we only want a partial
@@ -180,9 +183,14 @@ try_again:
        if (err)
                goto out_free;
 
-       if (!peeked)
-               UDP6_INC_STATS_USER(sock_net(sk),
-                               UDP_MIB_INDATAGRAMS, is_udplite);
+       if (!peeked) {
+               if (is_udp4)
+                       UDP_INC_STATS_USER(sock_net(sk),
+                                       UDP_MIB_INDATAGRAMS, is_udplite);
+               else
+                       UDP6_INC_STATS_USER(sock_net(sk),
+                                       UDP_MIB_INDATAGRAMS, is_udplite);
+       }
 
        sock_recv_timestamp(msg, sk, skb);
 
@@ -196,7 +204,7 @@ try_again:
                sin6->sin6_flowinfo = 0;
                sin6->sin6_scope_id = 0;
 
-               if (skb->protocol == htons(ETH_P_IP))
+               if (is_udp4)
                        ipv6_addr_set(&sin6->sin6_addr, 0, 0,
                                      htonl(0xffff), ip_hdr(skb)->saddr);
                else {
@@ -207,7 +215,7 @@ try_again:
                }
 
        }
-       if (skb->protocol == htons(ETH_P_IP)) {
+       if (is_udp4) {
                if (inet->cmsg_flags)
                        ip_cmsg_recv(msg, skb);
        } else {
@@ -228,8 +236,14 @@ out:
 
 csum_copy_err:
        lock_sock(sk);
-       if (!skb_kill_datagram(sk, skb, flags))
-               UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
+       if (!skb_kill_datagram(sk, skb, flags)) {
+               if (is_udp4)
+                       UDP_INC_STATS_USER(sock_net(sk),
+                                       UDP_MIB_INERRORS, is_udplite);
+               else
+                       UDP6_INC_STATS_USER(sock_net(sk),
+                                       UDP_MIB_INERRORS, is_udplite);
+       }
        release_sock(sk);
 
        if (flags & MSG_DONTWAIT)
index 25872747762ca76b7ccd889d72549db0f6a694a3..058f04f54b9024857eb418321d6842bd448c744a 100644 (file)
@@ -315,9 +315,9 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
                return;
        }
 
-       spin_lock(&xfrm_policy_gc_lock);
+       spin_lock_bh(&xfrm_policy_gc_lock);
        hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
-       spin_unlock(&xfrm_policy_gc_lock);
+       spin_unlock_bh(&xfrm_policy_gc_lock);
 
        schedule_work(&xfrm_policy_gc_work);
 }
index 4a8a1abb59ee8ae7c611d85def77d363ca96380e..a278a6f3b9913eedb9d80f8e46e930520704ae3f 100644 (file)
@@ -1816,7 +1816,7 @@ static int copy_to_user_kmaddress(struct xfrm_kmaddress *k, struct sk_buff *skb)
        uk.family = k->family;
        uk.reserved = k->reserved;
        memcpy(&uk.local, &k->local, sizeof(uk.local));
-       memcpy(&uk.remote, &k->local, sizeof(uk.remote));
+       memcpy(&uk.remote, &k->remote, sizeof(uk.remote));
 
        return nla_put(skb, XFRMA_KMADDRESS, sizeof(uk), &uk);
 }