Commit 75fa6770 authored by Linus Torvalds's avatar Linus Torvalds

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