kernel/kernel-generic.git
14 years agoxfrm: clone mark when cloning policy
Jamal Hadi Salim [Tue, 23 Feb 2010 23:09:53 +0000 (15:09 -0800)]
xfrm: clone mark when cloning policy

When we clone the SP, we should also clone the mark.
Useful for socket based SPs.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000: correct wrong coding style for "else"
Jiri Pirko [Tue, 23 Feb 2010 09:19:22 +0000 (01:19 -0800)]
e1000: correct wrong coding style for "else"

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Allow user space manipulation of SPD mark
Jamal Hadi Salim [Mon, 22 Feb 2010 11:33:00 +0000 (11:33 +0000)]
xfrm: Allow user space manipulation of SPD mark

Add ability for netlink userspace to manipulate the SPD
and manipulate the mark, retrieve it and get events with a defined
mark, etc.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Allow user space config of SAD mark
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:59 +0000 (11:32 +0000)]
xfrm: Allow user space config of SAD mark

Add ability for netlink userspace to manipulate the SAD
and manipulate the mark, retrieve it and get events with a defined
mark.
MIGRATE may be added later.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: SP lookups with mark
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:58 +0000 (11:32 +0000)]
xfrm: SP lookups with mark

Allow mark to be used when doing SP lookup

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: SP lookups signature with mark
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:57 +0000 (11:32 +0000)]
xfrm: SP lookups signature with mark

pass mark to all SP lookups to prepare them for when we add code
to have them search.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: SA lookups with mark
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:56 +0000 (11:32 +0000)]
xfrm: SA lookups with mark

Allow mark to be added to the SA lookup

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: SA lookups signature with mark
Jamal Hadi Salim [Tue, 23 Feb 2010 00:20:22 +0000 (16:20 -0800)]
xfrm: SA lookups signature with mark

pass mark to all SA lookups to prepare them for when we add code
to have them search.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: introduce basic mark infrastructure
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:54 +0000 (11:32 +0000)]
xfrm: introduce basic mark infrastructure

Add basic structuring and accessors for xfrm mark

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_key: locking change
stephen hemminger [Mon, 22 Feb 2010 07:57:19 +0000 (07:57 +0000)]
af_key: locking change

Get rid of custom locking that was using wait queue, lock, and atomic
to basically build a queued mutex.  Use RCU for read side.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopacket: convert socket list to RCU (v3)
stephen hemminger [Mon, 22 Feb 2010 07:57:18 +0000 (07:57 +0000)]
packet: convert socket list to RCU (v3)

Convert AF_PACKET to use RCU, eliminating one more reader/writer lock.

There is no need for a real sk_del_node_init_rcu(), because sk_del_node_init
is doing the equivalent thing to hlst_del_init_rcu already; but added
some comments to try and make that obvious.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoseq_file: add RCU versions of new hlist/list iterators (v3)
stephen hemminger [Mon, 22 Feb 2010 07:57:17 +0000 (07:57 +0000)]
seq_file: add RCU versions of new hlist/list iterators (v3)

Many usages of seq_file use RCU protected lists, so non RCU
iterators will not work safely.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan:ti_hecc: Add pm hook-up
Sriram [Mon, 22 Feb 2010 03:35:36 +0000 (03:35 +0000)]
can:ti_hecc: Add pm hook-up

Added the suspend and resume implementation in the HECC (CAN)
driver.

Signed-off-by: K R Baalaaji <krbaalaaji@ti.com>
Signed-off-by: Sriramakrishnan <srk@ti.com>
Acked-by: Anant Gole <anantgole@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoisdn: fix a few Kconfig imperfections
Tilman Schmidt [Mon, 22 Feb 2010 11:09:38 +0000 (11:09 +0000)]
isdn: fix a few Kconfig imperfections

1. Rewrite the outdated help texts for config options ISDN and ISDN_CAPI.
2. The MISDN config option appeared between ISDN_I4L and the I4L hardware
   driver options; move it to a less irritating place.
3. HYSDN is not in fact an I4L driver, and needn't depend on ISDN_I4L, so
   move it from the I4L section to the general section.
4. ISDN_HDLC is now also used by drivers outside I4L.  Move it from the
   I4L section to the general section, too.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: convert multiple drivers to use netdev_for_each_mc_addr, part4
Jiri Pirko [Mon, 22 Feb 2010 09:22:26 +0000 (09:22 +0000)]
net: convert multiple drivers to use netdev_for_each_mc_addr, part4

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000: convert to use netdev_for_each_mc_addr
Jiri Pirko [Mon, 22 Feb 2010 09:10:44 +0000 (09:10 +0000)]
e1000: convert to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: convert multiple drivers to use netdev_for_each_mc_addr, part3
Jiri Pirko [Sat, 20 Feb 2010 00:13:58 +0000 (00:13 +0000)]
net: convert multiple drivers to use netdev_for_each_mc_addr, part3

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/arm: convert to use netdev_for_each_mc_addr
Jiri Pirko [Fri, 19 Feb 2010 23:06:27 +0000 (23:06 +0000)]
net/arm: convert to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/typhoon.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Sun, 21 Feb 2010 17:08:47 +0000 (17:08 +0000)]
drivers/net/typhoon.c: Use (pr|netdev)_<level> macro helpers

David Dillow took my suggestions and improved on them.
Here is this latest version.

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Remove #define ERR_PFX
Remove now unused member name from struct typhoon
Use pr_<level>
Use netdev_<level>
Coalesce long formats
Remove version information

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David Dillow <dave@thedillows.org>
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob44: use netdev_alloc_skb instead of dev_alloc_skb
Hauke Mehrtens [Sat, 20 Feb 2010 10:55:26 +0000 (10:55 +0000)]
b44: use netdev_alloc_skb instead of dev_alloc_skb

The conversion in bf0dcbd929faf036f1a4f2918090344d0e249cf5 missed the
new allocation in b44_rx.
This patch was used in OpenWRT for a long time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob44: Set PHY address to NO_PHY if reset fails.
Hauke Mehrtens [Sat, 20 Feb 2010 10:55:25 +0000 (10:55 +0000)]
b44: Set PHY address to NO_PHY if reset fails.

Do a PHY reset to test if there is an active phy and set the PHY address
to B44_PHY_ADDR_NO_PHY in case of an not active phy. This is needed for
the Linksys WRTSL54GS and Asus WL-500W.
This patch was used in OpenWRT for a long time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopci: add support for 82576NS serdes to existing SR-IOV quirk
Alexander Duyck [Fri, 19 Feb 2010 17:57:46 +0000 (17:57 +0000)]
pci: add support for 82576NS serdes to existing SR-IOV quirk

This patch adds support for the 82576NS Serdes adapter to the existing pci
quirk for 82576 parts.

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>
14 years agoixgbe: prevent speculative processing of descriptors before ready
Milton Miller [Fri, 19 Feb 2010 17:44:42 +0000 (17:44 +0000)]
ixgbe: prevent speculative processing of descriptors before ready

The PowerPC architecture does not require loads to independent bytes to be
ordered without adding an explicit barrier.

In ixgbe_clean_rx_irq we load the status bit then load the packet data.
With packet split disabled if these loads go out of order we get a
stale packet, but we will notice the bad sequence numbers and drop it.

The problem occurs with packet split enabled where the TCP/IP header and data
are in different descriptors. If the reads go out of order we may have data
that doesn't match the TCP/IP header. Since we use hardware checksumming this
bad data is never verified and it makes it all the way to the application.

This bug was found during stress testing and adding this barrier has been shown
to fix it.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
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>
14 years agoeepro: fix netdev_mc_count conversion
Alexander Beregalov [Sun, 21 Feb 2010 02:48:25 +0000 (18:48 -0800)]
eepro: fix netdev_mc_count conversion

Fix commit 4cd24eaf0 (net: use netdev_mc_count and netdev_mc_empty when
appropriate)

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMAINTAINERS: Add two maintainers for be2net driver
Ajit Khaparde [Fri, 19 Feb 2010 14:00:03 +0000 (14:00 +0000)]
MAINTAINERS: Add two maintainers for be2net driver

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Bump the driver version number
Ajit Khaparde [Fri, 19 Feb 2010 13:58:21 +0000 (13:58 +0000)]
be2net: Bump the driver version number

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: Maintain tx and rx counters in driver
Ajit Khaparde [Fri, 19 Feb 2010 13:57:12 +0000 (13:57 +0000)]
be2net: Maintain tx and rx counters in driver

For certain skews of the BE adapter, H/W Tx and Rx
counters could be common for more than one interface.
Add Tx and Rx counters in the adapter structure
(to maintain stats on a per interfae basis).

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: update copyright dates
Ajit Khaparde [Fri, 19 Feb 2010 13:54:58 +0000 (13:54 +0000)]
be2net: update copyright dates

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: enable 64-bit DMA by default for PCI Express devices (v2)
Robert Hancock [Sat, 20 Feb 2010 01:10:15 +0000 (17:10 -0800)]
r8169: enable 64-bit DMA by default for PCI Express devices (v2)

Currently use of 64-bit DMA is disabled in r8169 unless the user passes the
use_dac module option. This is reasonable for conventional PCI devices where
broken chipsets may not handle dual-address-cycle transfers properly for
32-bit slots and so this may not be safe. However, PCI Express should not have
this problem and not using 64-bit DMA results in DMA transfers needlessly using
the IOMMU or SWIOTLB. Set the use_dac module parameter to a new default value of
-1 which results in 64-bit DMA being enabled by default for PCI Express devices
only.

Signed-off-by: Robert Hancock <hancockrwd@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomlx4: replace the dma_sync_single_range_for_cpu/device API
FUJITA Tomonori [Thu, 4 Feb 2010 18:57:42 +0000 (18:57 +0000)]
mlx4: replace the dma_sync_single_range_for_cpu/device API

There are only two users of the dma_sync_single_range_for_cpu/device
API in mainline (mlx4 and ssb). The
dma_sync_single_range_for_cpu/device API has never been documented and
the dma_sync_single_for_cpu/device API also support a partial sync.

This converts mlx4 to use the dma_sync_single_for_cpu/device API
(preparations for the removal of the dma_sync_single_range_for_cpu/device API).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogreth: some driver cleanups
kirjanov@gmail.com [Fri, 19 Feb 2010 05:00:52 +0000 (05:00 +0000)]
greth: some driver cleanups

On Fri, Feb 19, 2010 at 13:51 +0100, Jiri Pirko wrote:
>
> <snip>
> >>@@ -1031,7 +1029,7 @@ static void greth_set_multicast_list(struct net_device *dev)
> >>  return;
> >>  }
> >>
> >>- if (dev->mc_count == 0) {
> >>+ if (!netdev_mc_count(dev)) {
> also please use netdev_mc_empty() here.
Some driver cleanups:
* convert to use phy_find_first/phy_direct_connect
* convert to use netdev_mc_* helpers
* fixed missing validate_addr hook
* removed netdev_priv castings

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/pcmcia: convert to use netdev_for_each_mc_addr
Jiri Pirko [Fri, 19 Feb 2010 08:48:47 +0000 (08:48 +0000)]
net/pcmcia: convert to use netdev_for_each_mc_addr

removed fill_multicast_tbl function in smc91c92_cs and do the work inline

rewritten set_addresses function in xirc2ps_cs. This was kinda headache.
Simulated the original and new functions and they bahave the same.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SPD generates false events
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:42 +0000 (02:00 +0000)]
xfrm: Flushing empty SPD generates false events

To see the effect make sure you have an empty SPD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.

Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Flushing empty SAD generates false events
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:41 +0000 (02:00 +0000)]
xfrm: Flushing empty SAD generates false events

To see the effect make sure you have an empty SAD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.

Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopfkey: fix SA and SP flush sequence
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:40 +0000 (02:00 +0000)]
pfkey: fix SA and SP flush sequence

RFC 2367 says flushing behavior should be:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush event to ALL listeners

This is not realistic today in the presence of selinux policies
which may reject the flush etc. So we make the sequence become:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush response to originater from #1
4) if there were no errors then:
kernel -> user space: flush event to ALL listeners

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Fri, 19 Feb 2010 20:45:20 +0000 (12:45 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/kaber/nf-next-2.6

14 years agonetfilter: nf_queue: fix NF_STOLEN skb leak
Eric Dumazet [Fri, 19 Feb 2010 14:28:38 +0000 (15:28 +0100)]
netfilter: nf_queue: fix NF_STOLEN skb leak

commit 3bc38712e3a6e059 (handle NF_STOP and unknown verdicts in
nf_reinject) was a partial fix to packet leaks.

If user asks NF_STOLEN status, we must free the skb as well.

Reported-by: Afi Gjermund <afigjermund@gmail.com>
Signed-off-by: Eric DUmazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: ctnetlink: fix creation of conntrack with helpers
Pablo Neira Ayuso [Fri, 19 Feb 2010 13:24:39 +0000 (14:24 +0100)]
netfilter: ctnetlink: fix creation of conntrack with helpers

This patch fixes a bug that triggers an assertion if you create
a conntrack entry with a helper and netfilter debugging is enabled.
Basically, we hit the assertion because the confirmation flag is
set before the conntrack extensions are added. To fix this, we
move the extension addition before the aforementioned flag is
set.

This patch also removes the possibility of setting a helper for
existing conntracks. This operation would also trigger the
assertion since we are not allowed to add new extensions for
existing conntracks. We know noone that could benefit from
this operation sanely.

Thanks to Eric Dumazet for initial posting a preliminary patch
to address this issue.

Reported-by: David Ramblewski <David.Ramblewski@atosorigin.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonet: Make GRETH driver depend on SPARC.
David S. Miller [Fri, 19 Feb 2010 07:32:26 +0000 (23:32 -0800)]
net: Make GRETH driver depend on SPARC.

Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: restore POST_ROUTING hook in NF_HOOK_COND
Patrick McHardy [Fri, 19 Feb 2010 07:03:28 +0000 (08:03 +0100)]
netfilter: restore POST_ROUTING hook in NF_HOOK_COND

Commit 2249065 ("netfilter: get rid of the grossness in netfilter.h")
inverted the logic for conditional hook invocation, breaking the
POST_ROUTING hook invoked by ip_output().

Correct the logic and remove an unnecessary initialization.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agodrivers/net/sis190.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 20:00:17 +0000 (20:00 +0000)]
drivers/net/sis190.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level> and netif_msg_<test>
Remove local #define net_<test> macros
Remove periods from formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tg3.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 19:44:19 +0000 (19:44 +0000)]
drivers/net/tg3.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from most formats
Coalesce long formats
Use printk_once

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoOrphan DECnet
Chrissie Caulfield [Thu, 18 Feb 2010 01:33:13 +0000 (01:33 +0000)]
Orphan DECnet

Due to lack of time, space, motivation, hardware and probably expertise,
I have reluctantly decided to orphan the DECnet code in the kernel.

Judging by the deafening silence on the linux-decnet mailing list I
suspect it's either not being used anyway, or the few people that are
using it are happy with their older kernels.

Signed-Off-By: Christine Caulfield <christine.caulfield@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: free tx buffers when completions never arrive
Sathya Perla [Thu, 18 Feb 2010 00:37:17 +0000 (00:37 +0000)]
be2net: free tx buffers when completions never arrive

be2net: free tx buffers when completions never arrive

In cases like when a pci device is disconnected on an error,
pending tx completions will never arrive. Unmap and free such
buffers in the tx cleanup path.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR
jamal [Thu, 18 Feb 2010 03:35:07 +0000 (03:35 +0000)]
xfrm: Introduce LINUX_MIB_XFRMFWDHDRERROR

XFRMINHDRERROR counter is ambigous when validating forwarding
path. It makes it tricky to debug when you have both in and fwd
validation.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: TCP thin dupack
Andreas Petlund [Thu, 18 Feb 2010 04:48:19 +0000 (04:48 +0000)]
net: TCP thin dupack

This patch enables fast retransmissions after one dupACK for
TCP if the stream is identified as thin. This will reduce
latencies for thin streams that are not able to trigger fast
retransmissions due to high packet interarrival time. This
mechanism is only active if enabled by iocontrol or syscontrol
and the stream is identified as thin.

Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: TCP thin linear timeouts
Andreas Petlund [Thu, 18 Feb 2010 02:47:01 +0000 (02:47 +0000)]
net: TCP thin linear timeouts

This patch will make TCP use only linear timeouts if the
stream is thin. This will help to avoid the very high latencies
that thin stream suffer because of exponential backoff. This
mechanism is only active if enabled by iocontrol or syscontrol
and the stream is identified as thin. A maximum of 6 linear
timeouts is tried before exponential backoff is resumed.

Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: TCP thin-stream detection
Andreas Petlund [Thu, 18 Feb 2010 02:45:45 +0000 (02:45 +0000)]
net: TCP thin-stream detection

Inline function to dynamically detect thin streams based on
the number of packets in flight. Used to dynamically trigger
thin-stream mechanisms if enabled by ioctl or sysctl.

Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotokenring: convert to use netdev_for_each_mc_addr
Jiri Pirko [Thu, 18 Feb 2010 02:47:07 +0000 (02:47 +0000)]
tokenring: convert to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agostaging: convert to use netdev_for_each_mc_addr
Jiri Pirko [Thu, 18 Feb 2010 05:10:14 +0000 (05:10 +0000)]
staging: convert to use netdev_for_each_mc_addr

removed needless checks in arlan-main.c and slicoss.c
fixed bug in et131x_netdev.c to actually fill addresses in.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/usb: convert to use netdev_for_each_mc_addr
Jiri Pirko [Thu, 18 Feb 2010 04:02:26 +0000 (04:02 +0000)]
net/usb: convert to use netdev_for_each_mc_addr

also removed needless checks in smsc95xx

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip: convert to use netdev_for_each_mc_addr
Jiri Pirko [Thu, 18 Feb 2010 03:34:54 +0000 (03:34 +0000)]
tulip: convert to use netdev_for_each_mc_addr

also bug in de2104x.c was corrected:
for (i = 0; i < 32; i++) loop should be outside mc_list iteration.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: convert multiple drivers to use netdev_for_each_mc_addr, part2
Jiri Pirko [Thu, 18 Feb 2010 00:42:54 +0000 (00:42 +0000)]
net: convert multiple drivers to use netdev_for_each_mc_addr, part2

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: convert to use netdev_for_each_mc_addr
Jiri Pirko [Wed, 17 Feb 2010 23:22:38 +0000 (23:22 +0000)]
smsc911x: convert to use netdev_for_each_mc_addr

also removed unnecessary checks

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago3c5xx: use netdev_mc_* helpers
Jiri Pirko [Wed, 17 Feb 2010 23:12:15 +0000 (23:12 +0000)]
3c5xx: use netdev_mc_* helpers

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodepca: remove forgotten needless inicialization
Jiri Pirko [Wed, 17 Feb 2010 22:55:07 +0000 (22:55 +0000)]
depca: remove forgotten needless inicialization

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoconst: struct nla_policy
Alexey Dobriyan [Thu, 18 Feb 2010 08:14:31 +0000 (08:14 +0000)]
const: struct nla_policy

Make remaining netlink policies as const.
Fixup coding style where needed.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: drop unused "dev" arg of icmpv6_send()
Alexey Dobriyan [Thu, 18 Feb 2010 08:25:24 +0000 (08:25 +0000)]
ipv6: drop unused "dev" arg of icmpv6_send()

Dunno, what was the idea, it wasn't used for a long time.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: use standard lists for FIB walks
Alexey Dobriyan [Thu, 18 Feb 2010 08:13:30 +0000 (08:13 +0000)]
ipv6: use standard lists for FIB walks

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: remove stale MIB definitions
Alexey Dobriyan [Thu, 18 Feb 2010 08:12:20 +0000 (08:12 +0000)]
ipv6: remove stale MIB definitions

ICMP6 MIB statistics was per-netns for quite a time.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoAF_UNIX: update locking comment
Stephen Hemminger [Thu, 18 Feb 2010 22:12:06 +0000 (14:12 -0800)]
AF_UNIX: update locking comment

The lock used in unix_state_lock() is a spin_lock not reader-writer.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacvtap: add GSO/csum offload support
Arnd Bergmann [Thu, 18 Feb 2010 05:48:17 +0000 (05:48 +0000)]
macvtap: add GSO/csum offload support

Added flags field to macvtap_queue to enable/disable processing of
virtio_net_hdr via IFF_VNET_HDR. This flag is checked to prepend virtio_net_hdr
in the receive path and process/skip virtio_net_hdr in the send path.

Original patch by Sridhar, further changes by Arnd.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/macvtap: add vhost support
Arnd Bergmann [Thu, 18 Feb 2010 05:46:50 +0000 (05:46 +0000)]
net/macvtap: add vhost support

This adds support for passing a macvtap file descriptor into
vhost-net, much like we already do for tun/tap.

Most of the new code is taken from the respective patch
in the tun driver and may get consolidated in the future.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomacvtap: rework object lifetime rules
Arnd Bergmann [Thu, 18 Feb 2010 05:45:36 +0000 (05:45 +0000)]
macvtap: rework object lifetime rules

This reworks the change done by the previous patch
in a more complete way.

The original macvtap code has a number of problems
resulting from the use of RCU for protecting the
access to struct macvtap_queue from open files.

This includes
- need for GFP_ATOMIC allocations for skbs
- potential deadlocks when copy_*_user sleeps
- inability to work with vhost-net

Changing the lifetime of macvtap_queue to always
depend on the open file solves all these. The
RCU reference simply moves one step down to
the reference on the macvlan_dev, which we
only need for nonblocking operations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: nf_defrag_ipv4: fix compilation error with NF_CONNTRACK=n
Patrick McHardy [Thu, 18 Feb 2010 18:04:44 +0000 (19:04 +0100)]
netfilter: nf_defrag_ipv4: fix compilation error with NF_CONNTRACK=n

As reported by Randy Dunlap <randy.dunlap@oracle.com>, compilation
of nf_defrag_ipv4 fails with:

include/net/netfilter/nf_conntrack.h:94: error: field 'ct_general' has incomplete type
include/net/netfilter/nf_conntrack.h:178: error: 'const struct sk_buff' has no member named 'nfct'
include/net/netfilter/nf_conntrack.h:185: error: implicit declaration of function 'nf_conntrack_put'
include/net/netfilter/nf_conntrack.h:294: error: 'const struct sk_buff' has no member named 'nfct'
net/ipv4/netfilter/nf_defrag_ipv4.c:45: error: 'struct sk_buff' has no member named 'nfct'
net/ipv4/netfilter/nf_defrag_ipv4.c:46: error: 'struct sk_buff' has no member named 'nfct'

net/nf_conntrack.h must not be included with NF_CONNTRACK=n, add a
few #ifdefs. Long term the header file should be fixed to be usable
even with NF_CONNTRACK=n.

Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoipvs: SCTP Trasport Loadbalancing Support
Venkata Mohan Reddy [Thu, 18 Feb 2010 11:31:05 +0000 (12:31 +0100)]
ipvs: SCTP Trasport Loadbalancing Support

Enhance IPVS to load balance SCTP transport protocol packets. This is done
based on the SCTP rfc 4960. All possible control chunks have been taken
care. The state machine used in this code looks some what lengthy. I tried
to make the state machine easy to understand.

Signed-off-by: Venkata Mohan Reddy Koppula <mohanreddykv@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agoMerge branch 'ebt_config_compat_v4' of git://git.breakpoint.cc/fw/nf-next-2.6
Patrick McHardy [Thu, 18 Feb 2010 10:41:39 +0000 (11:41 +0100)]
Merge branch 'ebt_config_compat_v4' of git://git.breakpoint.cc/fw/nf-next-2.6

14 years agoIPv6: convert mc_lock to spinlock
Stephen Hemminger [Thu, 18 Feb 2010 02:48:44 +0000 (18:48 -0800)]
IPv6: convert mc_lock to spinlock

Only used for writing, so convert to spinlock

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tehuti.c: Reapply use DEFINE_PCI_DEVICE_TABLE()
Joe Perches [Thu, 18 Feb 2010 02:48:11 +0000 (18:48 -0800)]
drivers/net/tehuti.c: Reapply use DEFINE_PCI_DEVICE_TABLE()

Commit 865a21a5e3d1b384c559a44c898fcad93e187b82 overwrote
commit a3aa18842a5303fc28fcc4d57dbd16618bd830a0

Fix it.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/yellowfin.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:02:02 +0000 (15:02 +0000)]
drivers/net/yellowfin.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/sky2.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:59 +0000 (15:01 +0000)]
drivers/net/sky2.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/skge.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:58 +0000 (15:01 +0000)]
drivers/net/skge.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Checkpatch cleaning

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/skge.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:57 +0000 (15:01 +0000)]
drivers/net/skge.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/pci-skeleton.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:55 +0000 (15:01 +0000)]
drivers/net/pci-skeleton.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Checkpatch cleaning
Convert formats like 0x%08x to %#08x
Remove periods from formats
Coalesce long formats
Use print_hex_dump

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/cnic.c: Use (pr|netdev)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:54 +0000 (15:01 +0000)]
drivers/net/cnic.c: Use (pr|netdev)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from formats
Coalesce long formats
Use __func__

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/cassini.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:53 +0000 (15:01 +0000)]
drivers/net/cassini.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/bnx2x: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:52 +0000 (15:01 +0000)]
drivers/net/bnx2x: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert struct bnx2x member msglevel to msg_enable for netif_msg_<foo> macros
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/bnx2.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:51 +0000 (15:01 +0000)]
drivers/net/bnx2.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Coalesce some printks

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/b44.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:50 +0000 (15:01 +0000)]
drivers/net/b44.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:49 +0000 (15:01 +0000)]
drivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Use print_hex_dump

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/8139cp.c: Use (pr|netdev|netif)_<level> macro helpers
Joe Perches [Wed, 17 Feb 2010 15:01:48 +0000 (15:01 +0000)]
drivers/net/8139cp.c: Use (pr|netdev|netif)_<level> macro helpers

Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Update version to 3.108
Matt Carlson [Wed, 17 Feb 2010 15:17:05 +0000 (15:17 +0000)]
tg3: Update version to 3.108

This patch updates the tg3 version to 3.108.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Push phylib definitions to phylib
Matt Carlson [Wed, 17 Feb 2010 15:17:04 +0000 (15:17 +0000)]
tg3: Push phylib definitions to phylib

This patch pushes phylib definitions out to phylib headers.  For phy
IDs, this removes some code duplication.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Rename tg3 phy ID preprocessor definitions
Matt Carlson [Wed, 17 Feb 2010 15:17:03 +0000 (15:17 +0000)]
tg3: Rename tg3 phy ID preprocessor definitions

The phylib presents the phy ID in a different format than the one tg3
has traditionally used.  To highlight the distinction, this patch
prepends the tg3 native phy ID format with TG3.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Reformat SSID to phy ID table
Matt Carlson [Wed, 17 Feb 2010 15:17:02 +0000 (15:17 +0000)]
tg3: Reformat SSID to phy ID table

This patch reformats the SSID to phy ID table, replacing constants with
preprocessor definitions.  This patch is also prep work for the
following patch, which will push line lengths beyond 80 chars.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Discover phy address once
Matt Carlson [Wed, 17 Feb 2010 15:17:01 +0000 (15:17 +0000)]
tg3: Discover phy address once

The phy address will not change after it has been identified.  Move the
discovery code to a location that only gets executed once.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Reduce indent level of tg3_rx_prodring_alloc
Matt Carlson [Wed, 17 Feb 2010 15:17:00 +0000 (15:17 +0000)]
tg3: Reduce indent level of tg3_rx_prodring_alloc

This patch adds an inverted "jumbo ring enable" test and jumps to the exit
if it succeeds.  The change reduces the indent level of the remaining
code making it more readable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE
Matt Carlson [Wed, 17 Feb 2010 15:16:59 +0000 (15:16 +0000)]
tg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE

The STD part of this preprocessor definition is a bit of a misnomer.
This flag is a coarse control of the RGMII inband status facilities.
This patch renames the definition to be more accurate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add more partno entries for fallback path
Matt Carlson [Wed, 17 Feb 2010 15:16:58 +0000 (15:16 +0000)]
tg3: Add more partno entries for fallback path

This patch adds 57765 asic partno entries for the path executed if VPD
is not present in NVRAM.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Allow phylib flowctrl changes anytime
Matt Carlson [Wed, 17 Feb 2010 15:16:57 +0000 (15:16 +0000)]
tg3: Allow phylib flowctrl changes anytime

This patch loosens the restriction that the phylib interface must be up
and running to change the flow control parameters.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add support for 2 new selfboot formats
Matt Carlson [Wed, 17 Feb 2010 15:16:56 +0000 (15:16 +0000)]
tg3: Add support for 2 new selfboot formats

This patch adds new offsets to the bootcode version extraction code to
support NVRAM format versions 4 and 5.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Make 57791 and 57795 10/100 only
Matt Carlson [Wed, 17 Feb 2010 15:16:55 +0000 (15:16 +0000)]
tg3: Make 57791 and 57795 10/100 only

This patch adds the 57791 and 57795 to the list of devices that only
support 10 and 100 Mbps speeds.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Enforce DMA mapping / skb assignment ordering
Matt Carlson [Wed, 17 Feb 2010 15:16:54 +0000 (15:16 +0000)]
tg3: Enforce DMA mapping / skb assignment ordering

Michael Chan noted that there is nothing in the code that would prevent
the compiler from delaying the access of the "mapping" member of the
newly arrived packet until much later.  If this happened after the
skb = NULL assignment, it is possible for the driver to pass a bad
dma_addr value to pci_unmap_single().  To enforce this ordering, we need
a write memory barrier.  The pairing read memory barrier already exists
in tg3_rx_prodring_xfer() under the comments starting with
"Ensure that updates to the...".

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: socket filter support
Michael S. Tsirkin [Sun, 14 Feb 2010 01:01:10 +0000 (01:01 +0000)]
tun: socket filter support

This patch adds Linux Socket Filter support to
tun driver.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: export attach/detach filter routines
Michael S. Tsirkin [Sun, 14 Feb 2010 01:01:00 +0000 (01:01 +0000)]
net: export attach/detach filter routines

Export sk_attach_filter/sk_detach_filter routines,
so that tun module can use them.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agochelsio: convert to use netdev_for_each_mc_addr
Jiri Pirko [Wed, 17 Feb 2010 11:56:45 +0000 (11:56 +0000)]
chelsio: convert to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: convert to use netdev_for_each_addr
Jiri Pirko [Wed, 17 Feb 2010 12:27:14 +0000 (12:27 +0000)]
cxgb3: convert to use netdev_for_each_addr

Removed whole t3_rx_mode structure and appropriate helpers cause they are no
longer needed.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: replace manual phy lookup.
kirjanov@gmail.com [Tue, 16 Feb 2010 21:54:58 +0000 (21:54 +0000)]
smsc911x: replace manual phy lookup.

Use phy_find_first() function instead of manual lookup.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: bug fix for vlan + gro issue
Ajit Khaparde [Tue, 16 Feb 2010 20:25:43 +0000 (20:25 +0000)]
net: bug fix for vlan + gro issue

Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
Even the tcp handshake was not taking place.
This is because, the eth_type_trans call before the netif_receive_skb
in napi_gro_finish() resets the skb->dev to napi->dev from the previously
set vlan netdev interface. This causes the ip_route_input to drop the
incoming packet considering it as a packet coming from a martian source.

I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
With this fix, the traffic starts and the test runs fine on both vlan
and non-vlan interfaces.

CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomv643xx_eth: fix missing validate_addr hook
kirjanov@gmail.com [Tue, 16 Feb 2010 20:40:11 +0000 (20:40 +0000)]
mv643xx_eth: fix missing validate_addr hook

Fix missing validate_addr hook.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>