pandora-kernel.git
13 years agoisdn/gigaset: avoid copying AT commands twice
Tilman Schmidt [Mon, 5 Jul 2010 14:18:43 +0000 (14:18 +0000)]
isdn/gigaset: avoid copying AT commands twice

Change the Gigaset driver's internal write_cmd interface to accept a
cmdbuf structure instead of a string. This avoids copying formatted
AT commands a second time.

Impact: optimization
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn/gigaset: adjust usb_gigaset tty write buffer limit
Tilman Schmidt [Mon, 5 Jul 2010 14:18:37 +0000 (14:18 +0000)]
isdn/gigaset: adjust usb_gigaset tty write buffer limit

The usb_gigaset driver's write buffer limit was different from those
of the others for no good reason. Set it to the same value, derived
from the Siemens documentation.

Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 7 Jul 2010 22:59:38 +0000 (15:59 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

13 years agogianfar: code cleanup
Eran Liberty [Wed, 7 Jul 2010 22:54:54 +0000 (15:54 -0700)]
gianfar: code cleanup

This patch relates to "[PATCH] gainfar.c : skb_over_panic
(kernel-2.6.32.15)"

While in 2.6.32.15 it actually fixed a bug here it merely cleans up
the previous attempts to fix the bug with a more coherent code.

Currently before queuing skb into the rx_recycle it is
"un-skb_reserve"-ed so when taken out in gfar_new_skb() it wont be
reserved twice.

This patch makes sure the alignment skb_reserve is done once, upon
allocating the skb and not when taken out of the rx_recycle
pool. Eliminating the need to undo anything before queue skb back to
the pool.

NOTE: This patch will compile and is fairly straight forward but I do
not have environment to test it as I did with the 2.6.32.15 fix.

Signed-off-by: Eran Liberty <liberty@extricom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: add support for SH7757's ETHER
Yoshihiro Shimoda [Mon, 5 Jul 2010 18:32:50 +0000 (18:32 +0000)]
net: sh_eth: add support for SH7757's ETHER

The SH7757 has 2 Fast Ethernet controller (ETHER) and 2 Gigabit Ethernet
Controller (GETHER). This patch supports 2 ETHER only.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Set RXHASH for LRO packets
Vladislav Zolotarov [Tue, 6 Jul 2010 04:09:43 +0000 (04:09 +0000)]
bnx2x: Set RXHASH for LRO packets

Set Toeplitz hash both for LRO and none-LRO skbs.
The first CQE (TPA_START) will contain a hash for an LRO packet.

Current code sets skb->rx_hash for none-LRO skbs only.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/ipv4/ip_output.c: Removal of unused variable in ip_fragment()
George Kadianakis [Tue, 6 Jul 2010 11:44:12 +0000 (11:44 +0000)]
net/ipv4/ip_output.c: Removal of unused variable in ip_fragment()

Removal of unused integer variable in ip_fragment().

Signed-off-by: George Kadianakis <desnacked@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoNET: SB1250: Initialize .owner
Ralf Baechle [Tue, 6 Jul 2010 05:18:11 +0000 (05:18 +0000)]
NET: SB1250: Initialize .owner

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
 drivers/net/sb1250-mac.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: fix 64 bit counters on 32 bit arches
Eric Dumazet [Wed, 7 Jul 2010 21:58:56 +0000 (14:58 -0700)]
net: fix 64 bit counters on 32 bit arches

There is a small possibility that a reader gets incorrect values on 32
bit arches. SNMP applications could catch incorrect counters when a
32bit high part is changed by another stats consumer/provider.

One way to solve this is to add a rtnl_link_stats64 param to all
ndo_get_stats64() methods, and also add such a parameter to
dev_get_stats().

Rule is that we are not allowed to use dev->stats64 as a temporary
storage for 64bit stats, but a caller provided area (usually on stack)

Old drivers (only providing get_stats() method) need no changes.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: show startup message with KERN_INFO
Wu Fengguang [Tue, 6 Jul 2010 03:02:03 +0000 (03:02 +0000)]
vxge: show startup message with KERN_INFO

The original KERN_CRIT will mess up terminals.

CC: Sreenivasa Honnur <Sreenivasa.Honnur@neterion.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoll_temac: Fix missing iounmaps
Denis Kirjanov [Mon, 5 Jul 2010 21:44:20 +0000 (21:44 +0000)]
ll_temac: Fix missing iounmaps

Fix missing iounmaps.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Clear IPCB before possible entry into IP stack
Herbert Xu [Mon, 5 Jul 2010 21:29:28 +0000 (21:29 +0000)]
bridge: Clear IPCB before possible entry into IP stack

The bridge protocol lives dangerously by having incestuous relations
with the IP stack.  In this instance an abomination has been created
where a bogus IPCB area from a bridged packet leads to a crash in
the IP stack because it's interpreted as IP options.

This patch papers over the problem by clearing the IPCB area in that
particular spot.  To fix this properly we'd also need to parse any
IP options if present but I'm way too lazy for that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cheers,
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoforcedeth: correct valid flag
Julia Lawall [Tue, 6 Jul 2010 05:15:47 +0000 (22:15 -0700)]
forcedeth: correct valid flag

Elsewhere in the "optimized" functions, the "2" constants are used.
NV_TX_VALID and NV_TX2_VALID have the same value.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge br_multicast: BUG: unable to handle kernel NULL pointer dereference
Herbert Xu [Mon, 5 Jul 2010 14:50:08 +0000 (14:50 +0000)]
bridge br_multicast: BUG: unable to handle kernel NULL pointer dereference

On Tue, Jul 06, 2010 at 08:48:35AM +0800, Herbert Xu wrote:
>
> bridge: Restore NULL check in br_mdb_ip_get

Resend with proper attribution.

bridge: Restore NULL check in br_mdb_ip_get

Somewhere along the line the NULL check in br_mdb_ip_get went
AWOL, causing crashes when we receive an IGMP packet with no
multicast table allocated.

This patch restores it and ensures all br_mdb_*_get functions
use it.

Reported-by: Frank Arnold <frank.arnold@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Thanks,
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined
Ben Hutchings [Fri, 2 Jul 2010 07:08:44 +0000 (07:08 +0000)]
net: Fix definition of netif_vdbg() when VERBOSE_DEBUG is defined

netif_vdbg() was originally defined as entirely equivalent to
netdev_vdbg(), but I assume that it was intended to take the same
parameters as netif_dbg() etc.  (Currently it is only used by the
sfc driver, in which I worked on that assumption.)

In commit a4ed89c I changed the definition used when VERBOSE_DEBUG is
not defined, but I failed to notice that the definition used when
VERBOSE_DEBUG is defined was also not as I expected.  Change that to
match netif_dbg() as well.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/ne: fix memory leak in ne_drv_probe()
Kulikov Vasiliy [Sat, 3 Jul 2010 05:20:42 +0000 (05:20 +0000)]
net/ne: fix memory leak in ne_drv_probe()

net_device allocated with alloc_eip_netdev() must be freed.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn: avoid calling tty_ldisc_flush() in atomic context
Tilman Schmidt [Mon, 5 Jul 2010 14:18:27 +0000 (14:18 +0000)]
isdn: avoid calling tty_ldisc_flush() in atomic context

Remove the call to tty_ldisc_flush() from the RESULT_NO_CARRIER
branch of isdn_tty_modem_result(), as already proposed in commit
00409bb045887ec5e7b9e351bc080c38ab6bfd33.
This avoids a "sleeping function called from invalid context" BUG
when the hardware driver calls the statcallb() callback with
command==ISDN_STAT_DHUP in atomic context, which in turn calls
isdn_tty_modem_result(RESULT_NO_CARRIER, ~), and from there,
tty_ldisc_flush() which may sleep.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoDocumentation/isdn: CAPI controller interface amendment
Tilman Schmidt [Mon, 5 Jul 2010 14:18:22 +0000 (14:18 +0000)]
Documentation/isdn: CAPI controller interface amendment

Mention that the CAPI controller methods load_firmware() and
reset_ctr() are asynchronous, and should signal completion.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Change version to v1.00.00.25.00.00-01.
Ron Mercer [Mon, 5 Jul 2010 12:19:42 +0000 (12:19 +0000)]
qlge: Change version to v1.00.00.25.00.00-01.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Make adapter drop frame errors and pass up csum errors.
Ron Mercer [Mon, 5 Jul 2010 12:19:41 +0000 (12:19 +0000)]
qlge: Make adapter drop frame errors and pass up csum errors.

Statistics are available and the driver doesn't need the actual frame.
This TCP/UDP and IP headers checksum errors will still be passed to the
driver.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Fix possible endian issue for rx UDP csum.
Ron Mercer [Mon, 5 Jul 2010 12:19:40 +0000 (12:19 +0000)]
qlge: Fix possible endian issue for rx UDP csum.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Reduce print level in data path statements.
Ron Mercer [Mon, 5 Jul 2010 12:19:39 +0000 (12:19 +0000)]
qlge: Reduce print level in data path statements.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Don't use firmware when forcing firmware dump.
Ron Mercer [Mon, 5 Jul 2010 12:19:38 +0000 (12:19 +0000)]
qlge: Don't use firmware when forcing firmware dump.

In some cases the firmware may be dead.  Instead we dump the firmware
parameters and then restart it.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Restore promiscuous setting after reset.
Ron Mercer [Mon, 5 Jul 2010 12:19:37 +0000 (12:19 +0000)]
qlge: Restore promiscuous setting after reset.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoni52: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:23 +0000 (02:14 +0000)]
ni52: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agons83820: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:28 +0000 (02:14 +0000)]
ns83820: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomac89x0: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:09 +0000 (02:14 +0000)]
mac89x0: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonatsemi: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:17 +0000 (02:14 +0000)]
natsemi: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoksz884x: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:58 +0000 (02:13 +0000)]
ksz884x: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agolance: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:03 +0000 (02:14 +0000)]
lance: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohp100: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:46 +0000 (02:13 +0000)]
hp100: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostarfire: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:14:34 +0000 (02:14 +0000)]
starfire: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agohamachi: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:41 +0000 (02:13 +0000)]
hamachi: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocs89x0: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:15 +0000 (02:13 +0000)]
cs89x0: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoepic100: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:20 +0000 (02:13 +0000)]
epic100: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethoc: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:31 +0000 (02:13 +0000)]
ethoc: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofealnx: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:36 +0000 (02:13 +0000)]
fealnx: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodavinci_emac: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:26 +0000 (02:13 +0000)]
davinci_emac: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoioc3-eth: Use the instance of net_device_stats from net_device.
Ralf Baechle [Mon, 5 Jul 2010 02:59:38 +0000 (02:59 +0000)]
ioc3-eth: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats, we can remove the
instance of this from the adapter structure.

Based on original patch by Kulikov Vasiliy.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
 drivers/net/ioc3-eth.c |   49 ++++++++++++++++++++++++-----------------------
 1 files changed, 25 insertions(+), 24 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosun3_82586: Use the instance of net_device_stats from net_device.
Kulikov Vasiliy [Mon, 5 Jul 2010 02:13:10 +0000 (02:13 +0000)]
sun3_82586: Use the instance of net_device_stats from net_device.

Since net_device has an instance of net_device_stats,
we can remove the instance of this from the adapter structure.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: use skb_dst_copy() in ip_copy_metadata()
Eric Dumazet [Thu, 1 Jul 2010 23:48:22 +0000 (23:48 +0000)]
ipv4: use skb_dst_copy() in ip_copy_metadata()

Avoid touching dst refcount in ip_fragment().

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoks8842: Replace usage of dev_dbg with netdev_dbg
Richard Röjfors [Sun, 4 Jul 2010 13:26:39 +0000 (13:26 +0000)]
ks8842: Replace usage of dev_dbg with netdev_dbg

This patch replaces all usage of dev_dbg with netdev_dbg.

A side effect is that the pointer to the platform device in the adapter
struct can be removed.

Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousbnet: remove direct access to urb->status
Oliver Neukum [Fri, 2 Jul 2010 13:51:55 +0000 (15:51 +0200)]
usbnet: remove direct access to urb->status

USB drivers should not use urb->status directly because
it is scheduled to become a parameter. This does the conversion
for drivers/net/usb

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: use netif_<level> instead of netdev_<level>
Emil Tantilov [Thu, 1 Jul 2010 20:05:12 +0000 (20:05 +0000)]
ixgbe: use netif_<level> instead of netdev_<level>

This patch restores the ability to set msglvl through ethtool.
The issue was introduced by:
commit 849c45423c0c108e08d67644728cc9b0ed225fa1

CC: Joe Perches <joe@perches.com>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: drop support for UDP hashing w/ RSS
Alexander Duyck [Thu, 1 Jul 2010 20:01:05 +0000 (20:01 +0000)]
igb: drop support for UDP hashing w/ RSS

This change removes UDP from the supported protocols for RSS hashing.  The
reason for removing this protocol is because IP fragmentation was causing a
network flow to be broken into two streams, one for fragmented, and one for
non-fragmented and this in turn was causing out-of-order issues.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoIB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()
Ben Hutchings [Sat, 3 Jul 2010 09:41:29 +0000 (09:41 +0000)]
IB/{nes, ipoib}: Pass supported flags to ethtool_op_set_flags()

Following commit 1437ce3983bcbc0447a0dedcd644c14fe833d266 "ethtool:
Change ethtool_op_set_flags to validate flags", ethtool_op_set_flags
takes a third parameter and cannot be used directly as an
implementation of ethtool_ops::set_flags.

Changes nes and ipoib driver to pass in the appropriate value.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: fix xfrm by MARK logic
Peter Kosyh [Fri, 2 Jul 2010 07:47:55 +0000 (07:47 +0000)]
xfrm: fix xfrm by MARK logic

While using xfrm by MARK feature in
2.6.34 - 2.6.35 kernels, the mark
is always cleared in flowi structure via memset in
_decode_session4 (net/ipv4/xfrm4_policy.c), so
the policy lookup fails.
IPv6 code is affected by this bug too.

Signed-off-by: Peter Kosyh <p.kosyh@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Update version to 2.0.16.
Michael Chan [Sat, 3 Jul 2010 20:42:18 +0000 (20:42 +0000)]
bnx2: Update version to 2.0.16.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Dump some config space registers during TX timeout.
Michael Chan [Sat, 3 Jul 2010 20:42:17 +0000 (20:42 +0000)]
bnx2: Dump some config space registers during TX timeout.

These config register values will be useful when the memory registers
are returning 0xffffffff which has been reported.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Add support for skb->rxhash.
Michael Chan [Sat, 3 Jul 2010 20:42:16 +0000 (20:42 +0000)]
bnx2: Add support for skb->rxhash.

Add skb->rxhash support for TCP packets only because the bnx2 RSS hash
does not hash UDP ports.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2: Always enable MSI-X on 5709.
Michael Chan [Sat, 3 Jul 2010 20:42:15 +0000 (20:42 +0000)]
bnx2: Always enable MSI-X on 5709.

Minor change to use MSI-X even if there is only one CPU.  This allows
the CNIC driver to always have a dedicated MSI-X vector to handle
iSCSI events, instead of sharing the MSI vector.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdevice.h: Change netif_<level> macros to call netdev_<level> functions
Joe Perches [Sun, 27 Jun 2010 01:02:36 +0000 (01:02 +0000)]
netdevice.h: Change netif_<level> macros to call netdev_<level> functions

Reduces text ~300 bytes of text (woohoo!) in an x86 defconfig

$ size vmlinux*
   text    data     bss     dec     hex filename
7198526  720112 1366288 9284926  8dad3e vmlinux
7198862  720112 1366288 9285262  8dae8e vmlinux.netdev

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions
Joe Perches [Sun, 27 Jun 2010 01:02:35 +0000 (01:02 +0000)]
netdevice.h net/core/dev.c: Convert netdev_<level> logging macros to functions

Reduces an x86 defconfig text and data ~2k.
text is smaller, data is larger.

$ size vmlinux*
   text    data     bss     dec     hex filename
7198862  720112 1366288 9285262  8dae8e vmlinux
7205273  716016 1366288 9287577  8db799 vmlinux.device_h

Uses %pV and struct va_format
Format arguments are verified before printk

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodevice.h drivers/base/core.c Convert dev_<level> logging macros to functions
Joe Perches [Sun, 27 Jun 2010 01:02:34 +0000 (01:02 +0000)]
device.h drivers/base/core.c Convert dev_<level> logging macros to functions

Reduces an x86 defconfig text and data ~55k, .6% smaller.

$ size vmlinux*
   text    data     bss     dec     hex filename
7205273  716016 1366288 9287577  8db799 vmlinux
7258890  719768 1366288 9344946  8e97b2 vmlinux.master

Uses %pV and struct va_format
Format arguments are verified before printk

The dev_info macro is converted to _dev_info because there are
existing uses of variables named dev_info in the kernel tree
like drivers/net/pcmcia/pcnet_cs.c

A dev_info macro is created to call _dev_info

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovsprintf: Recursive vsnprintf: Add "%pV", struct va_format
Joe Perches [Sun, 27 Jun 2010 01:02:33 +0000 (01:02 +0000)]
vsprintf: Recursive vsnprintf: Add "%pV", struct va_format

Add the ability to print a format and va_list from a structure pointer

Allows __dev_printk to be implemented as a single printk while
minimizing string space duplication.

%pV should not be used without some mechanism to verify the
format and argument use ala __attribute__(format (printf(...))).

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Sat, 3 Jul 2010 05:42:06 +0000 (22:42 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

13 years agoMerge branch 'vhost-net' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
David S. Miller [Sat, 3 Jul 2010 05:29:22 +0000 (22:29 -0700)]
Merge branch 'vhost-net' of git://git./linux/kernel/git/mst/vhost

13 years agovirtio_net: fix oom handling on tx
Rusty Russell [Fri, 2 Jul 2010 16:34:01 +0000 (16:34 +0000)]
virtio_net: fix oom handling on tx

virtio net will never try to overflow the TX ring, so the only reason
add_buf may fail is out of memory. Thus, we can not stop the
device until some request completes - there's no guarantee anything
at all is outstanding.

Make the error message clearer as well: error here does not
indicate queue full.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (...and avoid TX_BUSY)
Cc: stable@kernel.org # .34.x (s/virtqueue_/vi->svq->vq_ops->/)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovirtio_net: do not reschedule rx refill forever
Michael S. Tsirkin [Fri, 2 Jul 2010 16:32:55 +0000 (16:32 +0000)]
virtio_net: do not reschedule rx refill forever

We currently fill all of RX ring, then add_buf
returns ENOSPC, which gets mis-detected as an out of
memory condition and causes us to reschedule the work,
and so on forever. Fix this by oom = err == -ENOMEM;

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org # .34.x
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: resolve statistics issues
Jon Mason [Fri, 2 Jul 2010 09:13:49 +0000 (09:13 +0000)]
s2io: resolve statistics issues

This patch resolves a number of issues in the statistics gathering of
the s2io driver.

On Xframe adapters, the received multicast statistics counter includes
pause frames which are not indicated to the driver.  This can cause
issues where the multicast packet count is higher than what has actually
been received, possibly higher than the number of packets received.

The driver software counters are replaced with the adapter hardware
statistics for rx_packets, rx_bytes, and tx_bytes.  It also uses the
overflow registers to determine if the statistics wrapped the 32bit
register (removing the window of having a statistic value less than the
previous call).  rx_length_errors statistic now includes undersized
packets in addition to oversized packets in its counting.  Finally,
rx_crc_errors are now being counted.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Sat, 3 Jul 2010 05:04:49 +0000 (22:04 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-2.6

13 years agolinux/net.h: fix kernel-doc warnings
Randy Dunlap [Thu, 1 Jul 2010 13:18:58 +0000 (13:18 +0000)]
linux/net.h: fix kernel-doc warnings

Fix kernel-doc warnings in linux/net.h:

Warning(include/linux/net.h:151): No description found for parameter 'wq'
Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'fasync_list' description in 'socket'
Warning(include/linux/net.h:151): Excess struct/union/enum/typedef member 'wait' description in 'socket'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: decreasing real_num_tx_queues needs to flush qdisc
John Fastabend [Thu, 1 Jul 2010 13:21:57 +0000 (13:21 +0000)]
net: decreasing real_num_tx_queues needs to flush qdisc

Reducing real_num_queues needs to flush the qdisc otherwise
skbs with queue_mappings greater then real_num_tx_queues can
be sent to the underlying driver.

The flow for this is,

dev_queue_xmit()
dev_pick_tx()
skb_tx_hash()  => hash using real_num_tx_queues
skb_set_queue_mapping()
...
qdisc_enqueue_root() => enqueue skb on txq from hash
...
dev->real_num_tx_queues -= n
...
sch_direct_xmit()
dev_hard_start_xmit()
ndo_start_xmit(skb,dev) => skb queue set with old hash

skbs are enqueued on the qdisc with skb->queue_mapping set
0 < queue_mappings < real_num_tx_queues.  When the driver
decreases real_num_tx_queues skb's may be dequeued from the
qdisc with a queue_mapping greater then real_num_tx_queues.

This fixes a case in ixgbe where this was occurring with DCB
and FCoE. Because the driver is using queue_mapping to map
skbs to tx descriptor rings we can potentially map skbs to
rings that no longer exist.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock
John Fastabend [Thu, 1 Jul 2010 13:21:35 +0000 (13:21 +0000)]
sched: qdisc_reset_all_tx is calling qdisc_reset without qdisc_lock

When calling qdisc_reset() the qdisc lock needs to be held.  In
this case there is at least one driver i4l which is using this
without holding the lock.  Add the locking here.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: fix a eeh handler to not add a pending timer
Breno Leitao [Thu, 1 Jul 2010 03:00:18 +0000 (03:00 +0000)]
qlge: fix a eeh handler to not add a pending timer

On some ocasions the function qlge_io_resume() tries to add a
pending timer, which causes the system to hit the BUG() on
add_timer() function.

This patch removes the timer during the EEH recovery.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Replacing add_timer() to mod_timer()
Breno Leitao [Thu, 1 Jul 2010 03:00:17 +0000 (03:00 +0000)]
qlge: Replacing add_timer() to mod_timer()

Currently qlge driver calls add_timer() instead of mod_timer().
This patch changes add_timer() to mod_timer(), which seems a better
solution.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agousbnet: Set parent device early for netdev_printk()
Ben Hutchings [Sat, 3 Jul 2010 04:49:02 +0000 (21:49 -0700)]
usbnet: Set parent device early for netdev_printk()

netdev_printk() follows the net_device's parent device pointer, so
we must set that earlier than we previously did.

Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Revert "rndis_host: Poll status channel before control channel"
Ben Hutchings [Sat, 3 Jul 2010 04:47:54 +0000 (21:47 -0700)]
net: Revert "rndis_host: Poll status channel before control channel"

This reverts commit c17b274dc2aa538b68c1f02b01a3c4e124b435ba.

That change was reported to break rndis_wlan support for the WUSB54GS.

Reported-by: Luís Picciochi Oliveira <pitxyoki@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT
Eric Dumazet [Fri, 2 Jul 2010 08:05:01 +0000 (10:05 +0200)]
netfilter: ip6t_REJECT: fix a dst leak in ipv6 REJECT

We should release dst if dst->error is set.

Bug introduced in 2.6.14 by commit e104411b82f5c
([XFRM]: Always release dst_entry on error in xfrm_lookup)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agobridge: add per bridge device controls for invoking iptables
Patrick McHardy [Fri, 2 Jul 2010 07:32:57 +0000 (09:32 +0200)]
bridge: add per bridge device controls for invoking iptables

Support more fine grained control of bridge netfilter iptables invocation
by adding seperate brnf_call_*tables parameters for each device using the
sysfs interface. Packets are passed to layer 3 netfilter when either the
global parameter or the per bridge parameter is enabled.

Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agoixgbe: use NETIF_F_LRO
Stanislaw Gruszka [Thu, 1 Jul 2010 13:58:25 +0000 (13:58 +0000)]
ixgbe: use NETIF_F_LRO

Both ETH_FLAG_LRO and NETIF_F_LRO have the same value, but NETIF_F_LRO
is intended to use with netdev->features.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: Add comment
Greg Rose [Thu, 1 Jul 2010 13:39:23 +0000 (13:39 +0000)]
igb: Add comment

Add explanatory comment to avoid confusion when a pointer is set
to the second word of an array instead of the customary cast of a
pointer to the beginning of the array.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: correct link test not being run when link is down
Alexander Duyck [Thu, 1 Jul 2010 13:39:01 +0000 (13:39 +0000)]
igb: correct link test not being run when link is down

The igb online link test was always reporting pass because instead of
checking for if_running it was checking for netif_carrier_ok.

This change corrects the test so that it is run if the interface is running
instead of checking for netif carrier ok.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: Fix Tx hangs seen when loading igb with max_vfs > 7.
Emil Tantilov [Thu, 1 Jul 2010 13:38:40 +0000 (13:38 +0000)]
igb: Fix Tx hangs seen when loading igb with max_vfs > 7.

Check the value of max_vfs at the time of assignment of vfs_allocated_count.

The previous check in igb_probe_vfs was too late as by that time the rx/tx
rings were initialized with the wrong offset.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: Use only a single Tx queue in SR-IOV mode
Greg Rose [Thu, 1 Jul 2010 13:38:16 +0000 (13:38 +0000)]
igb: Use only a single Tx queue in SR-IOV mode

The 82576 expects the second rx queue in any pool to receive L2 switch
loop back packets sent from the second tx queue in another pool.  The
82576 VF driver does not enable the second rx queue so if the PF driver
sends packets destined to a VF from its second tx queue then the VF
driver will never see them.  In SR-IOV mode limit the number of tx queues
used by the PF driver to one. This patch fixes a bug reported in which
the PF cannot communciate with the VF and should be considered for 2.6.34
stable.

CC: stable@kernel.org
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: fix PHY config access on 82580
Nick Nunley [Thu, 1 Jul 2010 13:37:54 +0000 (13:37 +0000)]
igb: fix PHY config access on 82580

82580 NICs can have up to 4 functions. This fixes phy accesses
to use the correct locks for functions 2 and 3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN
Alexander Duyck [Thu, 1 Jul 2010 13:28:27 +0000 (13:28 +0000)]
x86: Drop CONFIG_MCORE2 check around setting of NET_IP_ALIGN

This patch removes the CONFIG_MCORE2 check from around NET_IP_ALIGN.  It is
based on a suggestion from Andi Kleen.  The assumption is that there are
not any x86 cores where unaligned access is really slow, and this change
would allow for a performance improvement to still exist on configurations
that are not necessarily optimized for Core 2.

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoll_temac: add error checking to DMA init path
Denis Kirjanov [Wed, 30 Jun 2010 23:39:05 +0000 (23:39 +0000)]
ll_temac: add error checking to DMA init path

Add error checking to DMA descriptor rings initialization code.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: changes to properly provide phy details
Ajit Khaparde [Thu, 1 Jul 2010 03:51:00 +0000 (03:51 +0000)]
be2net: changes to properly provide phy details

be2net driver is currently not showing correct phy details in certain cases.
This patch fixes it.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoehea: Allocate stats buffer with GFP_KERNEL
Brian King [Wed, 30 Jun 2010 11:59:12 +0000 (11:59 +0000)]
ehea: Allocate stats buffer with GFP_KERNEL

Since ehea_get_stats calls ehea_h_query_ehea_port, which
can sleep, we can also sleep when allocating a page in
this function. This fixes some memory allocation failure
warnings seen under low memory conditions.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodrivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h
Cody Rester [Fri, 2 Jul 2010 04:27:44 +0000 (21:27 -0700)]
drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h

Fixed include error, changed to linux/io.h

Signed-off-by: Cody Rester <codyrester@gmail.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Fri, 2 Jul 2010 00:34:14 +0000 (17:34 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/libertas/host.h

13 years agovhost: add unlikely annotations to error path
Michael S. Tsirkin [Thu, 1 Jul 2010 15:40:12 +0000 (18:40 +0300)]
vhost: add unlikely annotations to error path

patch 'break out of polling loop on error' caused
a minor performance regression on my machine: recover
that performance by adding a bunch of unlikely annotations
in the error handling.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
13 years agox86: Align skb w/ start of cacheline on newer core 2/Xeon Arch
Alexander Duyck [Tue, 29 Jun 2010 18:38:00 +0000 (18:38 +0000)]
x86: Align skb w/ start of cacheline on newer core 2/Xeon Arch

x86 architectures can handle unaligned accesses in hardware, and it has
been shown that unaligned DMA accesses can be expensive on Nehalem
architectures.  As such we should overwrite NET_IP_ALIGN to resolve
this issue.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: add 1g PHY support for 82599
Don Skidmore [Tue, 29 Jun 2010 18:30:59 +0000 (18:30 +0000)]
ixgbe: add 1g PHY support for 82599

Add support for 1G SFP+ PHY's to 82599.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Add support for RX flow hash control
Ben Hutchings [Wed, 30 Jun 2010 05:06:28 +0000 (05:06 +0000)]
sfc: Add support for RX flow hash control

Allow ethtool to query the number of RX rings, the fields used in RX
flow hashing and the hash indirection table.

Allow ethtool to update the RX flow hash indirection table.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Add support for control of RX flow hash indirection
Ben Hutchings [Wed, 30 Jun 2010 05:05:23 +0000 (05:05 +0000)]
ethtool: Add support for control of RX flow hash indirection

Many NICs use an indirection table to map an RX flow hash value to one
of an arbitrary number of queues (not necessarily a power of 2).  It
can be useful to remove some queues from this indirection table so
that they are only used for flows that are specifically filtered
there.  It may also be useful to weight the mapping to account for
user processes with the same CPU-affinity as the RX interrupts.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovmxnet3: Remove incorrect implementation of ethtool_ops::get_flags()
Ben Hutchings [Wed, 30 Jun 2010 02:47:40 +0000 (02:47 +0000)]
vmxnet3: Remove incorrect implementation of ethtool_ops::get_flags()

Only some netdev feature flags correspond directly to ethtool feature
flags.  ethtool_op_get_flags() does the right thing.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flags
Ben Hutchings [Wed, 30 Jun 2010 02:46:56 +0000 (02:46 +0000)]
netdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flags

The documented error code for attempts to set unsupported flags (or
to clear flags that cannot be disabled) is EINVAL, not EOPNOTSUPP.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Change ethtool_op_set_flags to validate flags
Ben Hutchings [Wed, 30 Jun 2010 02:44:32 +0000 (02:44 +0000)]
ethtool: Change ethtool_op_set_flags to validate flags

ethtool_op_set_flags() does not check for unsupported flags, and has
no way of doing so.  This means it is not suitable for use as a
default implementation of ethtool_ops::set_flags.

Add a 'supported' parameter specifying the flags that the driver and
hardware support, validate the requested flags against this, and
change all current callers to pass this parameter.

Change some other trivial implementations of ethtool_ops::set_flags to
call ethtool_op_set_flags().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: Use correct shift factor for extracting the SGE DMA Ingress Padding Boundary
Casey Leedom [Tue, 29 Jun 2010 12:54:12 +0000 (12:54 +0000)]
cxgb4vf: Use correct shift factor for extracting the SGE DMA Ingress Padding Boundary

Use correct shift factor for extracting the SGE DMA Ingress Padding
Boundary.  Was accidentally using the register field's shift which was
close enough (4 instead of the propper value of 5) that it actually
sort of worked for various packet sizes ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocxgb4vf: Remove obsolete comment about the lack of a TX Timer Callback
Casey Leedom [Tue, 29 Jun 2010 12:53:39 +0000 (12:53 +0000)]
cxgb4vf: Remove obsolete comment about the lack of a TX Timer Callback

Remove obsolete comment about the lack of a TX Timer Callback -- which
we now _do_ have ...

Signed-off-by: Casey Leedom <leedom@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: check if clients MAC addr has changed
Flavio Leitner [Tue, 29 Jun 2010 08:24:39 +0000 (08:24 +0000)]
bonding: check if clients MAC addr has changed

When two systems using bonding devices in adaptive load
balancing (ALB) communicates with each other, an endless
ping-pong of ARP replies starts between these two systems.

What happens? In the ALB mode, bonding driver keeps track
of each client connected in a hash table, so it can do the
receive load balancing (RLB). This hash table is updated
when an ARP reply is received, then it scans for the client
entry, updates its MAC address and flag it to be announced
later. Therefore, two seconds later, the alb monitor runs
and send for each updated client entry two ARP replies
updating this specific client. The same process happens on
the receiving system, causing the endless ping-pong of arp
replies.

See more information including the relevant functions below:

   System 1                          System 2
    bond0                             bond0

   ping <system2>
    ARP request  --------->
                           <--------- ARP reply

+->rlb_arp_recv  <---------------------+   <--- loop begins
|  rlb_update_entry_from_arp           |
|  client_info->ntt = 1;               |
|  bond_info->rx_ntt = 1;              |
|                                      |
|         <communication succeed>      |
|                                      |
|  bond_alb_monitor                    |
|  rlb_update_rx_clients               |
|  rlb_update_client                   |
|  arp_create(ARPOP_REPLY)             |
|   send ARP reply -------------->     V
|   send ARP reply -------------->
|                               rlb_arp_recv
|                               rlb_update_entry_from_arp
|                               client_info->ntt = 1;
|                               bond_info->rx_ntt = 1;
|                           < snipped, same as in system 1>
+-------           <-------------- send ARP reply
                   <-------------- send ARP reply

Besides the unneeded networking traffic, this loop breaks
a cluster because a backup system can't take over the IP
address. There is always one system sending an ARP reply
poisoning the network.

This patch fixes the problem adding a check for the MAC
address before updating it. Thus, if the MAC address didn't
change, there is no need to update neither to announce it later.

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofragment: add fast path for in-order fragments
Changli Gao [Tue, 29 Jun 2010 04:39:37 +0000 (04:39 +0000)]
fragment: add fast path for in-order fragments

add fast path for in-order fragments

As the fragments are sent in order in most of OSes, such as Windows, Darwin and
FreeBSD, it is likely the new fragments are at the end of the inet_frag_queue.
In the fast path, we check if the skb at the end of the inet_frag_queue is the
prev we expect.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 include/net/inet_frag.h |    1 +
 net/ipv4/ip_fragment.c  |   12 ++++++++++++
 net/ipv6/reassembly.c   |   11 +++++++++++
 3 files changed, 24 insertions(+)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosnmp: 64bit ipstats_mib for all arches
Eric Dumazet [Wed, 30 Jun 2010 20:31:19 +0000 (13:31 -0700)]
snmp: 64bit ipstats_mib for all arches

/proc/net/snmp and /proc/net/netstat expose SNMP counters.

Width of these counters is either 32 or 64 bits, depending on the size
of "unsigned long" in kernel.

This means user program parsing these files must already be prepared to
deal with 64bit values, regardless of user program being 32 or 64 bit.

This patch introduces 64bit snmp values for IPSTAT mib, where some
counters can wrap pretty fast if they are 32bit wide.

# netstat -s|egrep "InOctets|OutOctets"
    InOctets: 244068329096
    OutOctets: 244069348848

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobe2net: memory barrier fixes on IBM p7 platform
Sathya Perla [Tue, 29 Jun 2010 00:11:17 +0000 (00:11 +0000)]
be2net: memory barrier fixes on IBM p7 platform

The ibm p7 architecure seems to reorder memory accesses more
aggressively than previous ppc64 architectures. This requires memory
barriers to ensure that rx/tx doorbells are pressed only after
memory to be DMAed is written.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocpmac: use resource_size()
Dan Carpenter [Wed, 30 Jun 2010 20:12:01 +0000 (13:12 -0700)]
cpmac: use resource_size()

The original code is off by one because we should start counting at
zero.  So the size of the resource is end - start + 1.  I switched it to
use resource_size() to do the calculation.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoBluetooth: Fix abuse of the preincrement operator
David Howells [Wed, 30 Jun 2010 20:10:09 +0000 (13:10 -0700)]
Bluetooth: Fix abuse of the preincrement operator

Fix abuse of the preincrement operator as detected when building with gcc
4.6.0:

 CC [M]  drivers/bluetooth/hci_bcsp.o
drivers/bluetooth/hci_bcsp.c: In function 'bcsp_prepare_pkt':
drivers/bluetooth/hci_bcsp.c:247:20: warning: operation on 'bcsp->msgq_txseq' may be undefined

Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agomv643xx_eth: use sw csum for big packets
Saeed Bishara [Sun, 27 Jun 2010 00:26:43 +0000 (00:26 +0000)]
mv643xx_eth: use sw csum for big packets

Some controllers (KW, Dove) limits the TX IP/layer4 checksum offloading to a max size.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoact_nat: use stack variable
Changli Gao [Tue, 29 Jun 2010 23:07:09 +0000 (23:07 +0000)]
act_nat: use stack variable

act_nat: use stack variable

structure tc_nat isn't too big for stack, so we can put it in stack.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 net/sched/act_nat.c |   31 ++++++++++---------------------
 1 file changed, 10 insertions(+), 21 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>