Skip to content

Commit 75fa677

Browse files
committed
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.
2 parents 4edfd20 + bbb770e commit 75fa677

File tree

11 files changed

+64
-32
lines changed

11 files changed

+64
-32
lines changed

drivers/net/Kconfig

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,9 +2010,13 @@ config IGB_LRO
20102010
If in doubt, say N.
20112011

20122012
config IGB_DCA
2013-
bool "Enable DCA"
2013+
bool "Direct Cache Access (DCA) Support"
20142014
default y
20152015
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.
20162020

20172021
source "drivers/net/ixp2000/Kconfig"
20182022

@@ -2437,9 +2441,13 @@ config IXGBE
24372441
will be called ixgbe.
24382442

24392443
config IXGBE_DCA
2440-
bool
2444+
bool "Direct Cache Access (DCA) Support"
24412445
default y
24422446
depends on IXGBE && DCA && !(IXGBE=y && DCA=m)
2447+
---help---
2448+
Say Y here if you want to use Direct Cache Access (DCA) in the
2449+
driver. DCA is a method for warming the CPU cache before data
2450+
is used, with the intent of lessening the impact of cache misses.
24432451

24442452
config IXGB
24452453
tristate "Intel(R) PRO/10GbE support"
@@ -2489,9 +2497,13 @@ config MYRI10GE
24892497
will be called myri10ge.
24902498

24912499
config MYRI10GE_DCA
2492-
bool
2500+
bool "Direct Cache Access (DCA) Support"
24932501
default y
24942502
depends on MYRI10GE && DCA && !(MYRI10GE=y && DCA=m)
2503+
---help---
2504+
Say Y here if you want to use Direct Cache Access (DCA) in the
2505+
driver. DCA is a method for warming the CPU cache before data
2506+
is used, with the intent of lessening the impact of cache misses.
24952507

24962508
config NETXEN_NIC
24972509
tristate "NetXen Multi port (1/10) Gigabit Ethernet NIC"

drivers/net/bnx2x_init.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,15 @@ static const struct arb_line write_arb_addr[NUM_WR_Q-1] = {
564564

565565
static void bnx2x_init_pxp(struct bnx2x *bp)
566566
{
567+
u16 devctl;
567568
int r_order, w_order;
568569
u32 val, i;
569570

570571
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);
575576

576577
if (r_order > MAX_RD_ORD) {
577578
DP(NETIF_MSG_HW, "read order of %d order adjusted to %d\n",

drivers/net/bnx2x_main.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
#include "bnx2x.h"
6060
#include "bnx2x_init.h"
6161

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"
6464
#define BNX2X_BC_VER 0x040200
6565

6666
/* Time in jiffies before concluding the transmitter is hung */
@@ -6481,6 +6481,7 @@ static int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
64816481
bnx2x_free_irq(bp);
64826482
load_error:
64836483
bnx2x_free_mem(bp);
6484+
bp->port.pmf = 0;
64846485

64856486
/* TBD we really need to reset the chip
64866487
if we want to recover from this */
@@ -6791,6 +6792,7 @@ static int bnx2x_nic_unload(struct bnx2x *bp, int unload_mode)
67916792
/* Report UNLOAD_DONE to MCP */
67926793
if (!BP_NOMCP(bp))
67936794
bnx2x_fw_command(bp, DRV_MSG_CODE_UNLOAD_DONE);
6795+
bp->port.pmf = 0;
67946796

67956797
/* Free SKBs, SGEs, TPA pool and driver internals */
67966798
bnx2x_free_skbs(bp);
@@ -10204,8 +10206,6 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
1020410206
return -ENOMEM;
1020510207
}
1020610208

10207-
netif_carrier_off(dev);
10208-
1020910209
bp = netdev_priv(dev);
1021010210
bp->msglevel = debug;
1021110211

@@ -10229,6 +10229,8 @@ static int __devinit bnx2x_init_one(struct pci_dev *pdev,
1022910229
goto init_one_exit;
1023010230
}
1023110231

10232+
netif_carrier_off(dev);
10233+
1023210234
bp->common.name = board_info[ent->driver_data].name;
1023310235
printk(KERN_INFO "%s: %s (%c%d) PCI-E x%d %s found at mem %lx,"
1023410236
" IRQ %d, ", dev->name, bp->common.name,

drivers/net/fs_enet/fs_enet-main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,9 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
10991099
ndev->stop = fs_enet_close;
11001100
ndev->get_stats = fs_enet_get_stats;
11011101
ndev->set_multicast_list = fs_set_multicast_list;
1102-
1102+
#ifdef CONFIG_NET_POLL_CONTROLLER
1103+
ndev->poll_controller = fs_enet_netpoll;
1104+
#endif
11031105
if (fpi->use_napi)
11041106
netif_napi_add(ndev, &fep->napi, fs_enet_rx_napi,
11051107
fpi->napi_weight);
@@ -1209,7 +1211,7 @@ static void __exit fs_cleanup(void)
12091211
static void fs_enet_netpoll(struct net_device *dev)
12101212
{
12111213
disable_irq(dev->irq);
1212-
fs_enet_interrupt(dev->irq, dev, NULL);
1214+
fs_enet_interrupt(dev->irq, dev);
12131215
enable_irq(dev->irq);
12141216
}
12151217
#endif

drivers/net/mv643xx_eth.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,9 +1066,12 @@ static int smi_wait_ready(struct mv643xx_eth_shared_private *msp)
10661066
return 0;
10671067
}
10681068

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+
}
10721075

10731076
return 0;
10741077
}

drivers/net/niu.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8667,7 +8667,6 @@ static void __devinit niu_device_announce(struct niu *np)
86678667
static int __devinit niu_pci_init_one(struct pci_dev *pdev,
86688668
const struct pci_device_id *ent)
86698669
{
8670-
unsigned long niureg_base, niureg_len;
86718670
union niu_parent_id parent_id;
86728671
struct net_device *dev;
86738672
struct niu *np;
@@ -8758,10 +8757,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
87588757

87598758
dev->features |= (NETIF_F_SG | NETIF_F_HW_CSUM);
87608759

8761-
niureg_base = pci_resource_start(pdev, 0);
8762-
niureg_len = pci_resource_len(pdev, 0);
8763-
8764-
np->regs = ioremap_nocache(niureg_base, niureg_len);
8760+
np->regs = pci_ioremap_bar(pdev, 0);
87658761
if (!np->regs) {
87668762
dev_err(&pdev->dev, PFX "Cannot map device registers, "
87678763
"aborting.\n");

drivers/net/smc911x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static void smc911x_hardware_send_pkt(struct net_device *dev)
499499
#else
500500
SMC_PUSH_DATA(lp, buf, len);
501501
dev->trans_start = jiffies;
502-
dev_kfree_skb(skb);
502+
dev_kfree_skb_irq(skb);
503503
#endif
504504
if (!lp->tx_throttle) {
505505
netif_wake_queue(dev);

drivers/net/smc91x.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,7 @@ static int smc_request_attrib(struct platform_device *pdev,
20602060
struct net_device *ndev)
20612061
{
20622062
struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2063+
struct smc_local *lp __maybe_unused = netdev_priv(ndev);
20632064

20642065
if (!res)
20652066
return 0;
@@ -2074,6 +2075,7 @@ static void smc_release_attrib(struct platform_device *pdev,
20742075
struct net_device *ndev)
20752076
{
20762077
struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
2078+
struct smc_local *lp __maybe_unused = netdev_priv(ndev);
20772079

20782080
if (res)
20792081
release_mem_region(res->start, ATTRIB_SIZE);

net/ipv6/udp.c

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
138138
int peeked;
139139
int err;
140140
int is_udplite = IS_UDPLITE(sk);
141+
int is_udp4;
141142

142143
if (addr_len)
143144
*addr_len=sizeof(struct sockaddr_in6);
@@ -158,6 +159,8 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
158159
else if (copied < ulen)
159160
msg->msg_flags |= MSG_TRUNC;
160161

162+
is_udp4 = (skb->protocol == htons(ETH_P_IP));
163+
161164
/*
162165
* If checksum is needed at all, try to do it while copying the
163166
* 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,
180183
if (err)
181184
goto out_free;
182185

183-
if (!peeked)
184-
UDP6_INC_STATS_USER(sock_net(sk),
185-
UDP_MIB_INDATAGRAMS, is_udplite);
186+
if (!peeked) {
187+
if (is_udp4)
188+
UDP_INC_STATS_USER(sock_net(sk),
189+
UDP_MIB_INDATAGRAMS, is_udplite);
190+
else
191+
UDP6_INC_STATS_USER(sock_net(sk),
192+
UDP_MIB_INDATAGRAMS, is_udplite);
193+
}
186194

187195
sock_recv_timestamp(msg, sk, skb);
188196

@@ -196,7 +204,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
196204
sin6->sin6_flowinfo = 0;
197205
sin6->sin6_scope_id = 0;
198206

199-
if (skb->protocol == htons(ETH_P_IP))
207+
if (is_udp4)
200208
ipv6_addr_set(&sin6->sin6_addr, 0, 0,
201209
htonl(0xffff), ip_hdr(skb)->saddr);
202210
else {
@@ -207,7 +215,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
207215
}
208216

209217
}
210-
if (skb->protocol == htons(ETH_P_IP)) {
218+
if (is_udp4) {
211219
if (inet->cmsg_flags)
212220
ip_cmsg_recv(msg, skb);
213221
} else {
@@ -228,8 +236,14 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,
228236

229237
csum_copy_err:
230238
lock_sock(sk);
231-
if (!skb_kill_datagram(sk, skb, flags))
232-
UDP6_INC_STATS_USER(sock_net(sk), UDP_MIB_INERRORS, is_udplite);
239+
if (!skb_kill_datagram(sk, skb, flags)) {
240+
if (is_udp4)
241+
UDP_INC_STATS_USER(sock_net(sk),
242+
UDP_MIB_INERRORS, is_udplite);
243+
else
244+
UDP6_INC_STATS_USER(sock_net(sk),
245+
UDP_MIB_INERRORS, is_udplite);
246+
}
233247
release_sock(sk);
234248

235249
if (flags & MSG_DONTWAIT)

net/xfrm/xfrm_policy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
315315
return;
316316
}
317317

318-
spin_lock(&xfrm_policy_gc_lock);
318+
spin_lock_bh(&xfrm_policy_gc_lock);
319319
hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
320-
spin_unlock(&xfrm_policy_gc_lock);
320+
spin_unlock_bh(&xfrm_policy_gc_lock);
321321

322322
schedule_work(&xfrm_policy_gc_work);
323323
}

net/xfrm/xfrm_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ static int copy_to_user_kmaddress(struct xfrm_kmaddress *k, struct sk_buff *skb)
18161816
uk.family = k->family;
18171817
uk.reserved = k->reserved;
18181818
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));
18201820

18211821
return nla_put(skb, XFRMA_KMADDRESS, sizeof(uk), &uk);
18221822
}

0 commit comments

Comments
 (0)