pandora-kernel.git
12 years agoKSZ8851-SNL: Add ethtool support for EEPROM via eeprom_93cx6
Ben Dooks [Mon, 21 Nov 2011 08:58:00 +0000 (08:58 +0000)]
KSZ8851-SNL: Add ethtool support for EEPROM via eeprom_93cx6

Add ethtool EEPROM read/write support using the eeprom_93cx6
library instead of open-coding the functions.

Depends on eeprom_93cx6 driver getting EEPROM write support.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
[sboyd@codeaurora.org: Removed previous eeprom implementation]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoKSZ8851-SNL: Fix MAC address change problem
Tristram Ha [Mon, 21 Nov 2011 08:57:59 +0000 (08:57 +0000)]
KSZ8851-SNL: Fix MAC address change problem

When device is off it is under power saving mode. Changing the MAC address
in that situation will result in the device not communicating as the first
write to the MAC address register is not executed.

Signed-off-by: Tristram Ha <Tristram.Ha@micrel.com>
[ben@simtec.co.uk: cleaned up header]
Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoKSZ8851-SNL: Add support for EEPROM MAC address
Ben Dooks [Mon, 21 Nov 2011 08:57:58 +0000 (08:57 +0000)]
KSZ8851-SNL: Add support for EEPROM MAC address

Add support for reading the MAC address from the system registers if there
is an EEPROM present. This involves caching the KS_CCR register for later
use (will also be useful for ETHTOOL support) and adding a print to say
that there is an EEPROM present.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoeeprom_93cx6: Add write support
Ben Dooks [Mon, 21 Nov 2011 08:57:57 +0000 (08:57 +0000)]
eeprom_93cx6: Add write support

Add support for writing data to EEPROM.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoeeprom_93cx6: Add data direction control.
Ben Dooks [Mon, 21 Nov 2011 08:57:56 +0000 (08:57 +0000)]
eeprom_93cx6: Add data direction control.

Some devices need to know if the data is to be output or read, so add a
data direction into the eeprom structure to tell the driver whether the
data line should be driven.

The user in this case is the Micrel KS8851 which has a direction
control for the EEPROM data line and thus needs to know whether
to drive it (writing) or to tristate it for receiving.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix non utilization of RX queues
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:53 +0000 (05:48 +0000)]
be2net: Fix non utilization of RX queues

When non power of two MSIX vectors are given to driver, some RX queues
are not utilized. Program RSS table in such a way that all queues
are utilized.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Use new hash key
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:38 +0000 (05:48 +0000)]
be2net: Use new hash key

This new hash key gives better distribution of packets across RX
queues.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Add error handling for Lancer
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:23 +0000 (05:48 +0000)]
be2net: Add error handling for Lancer

Detect error in Lancer by polling a HW register and
recover from this error if it is recoverable.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix error recovery paths
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:06 +0000 (05:48 +0000)]
be2net: Fix error recovery paths

When TX queues are created again after error recovery,
netif_set_real_num_tx_queues() is invoked to update number of real
TX queues created. rtnl lock needs to be held when invoking this routine.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Move to new SR-IOV implementation in Lancer
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:47:26 +0000 (05:47 +0000)]
be2net: Move to new SR-IOV implementation in Lancer

SR-IOV implementation is Lancer has changed in following ways -
1)PF driver assigns one MAC addresses for VF using COMMON_SET_IFACE_MAC_LIST.
2)VF driver queries its MAC address using COMMON_GET_IFACE_MAC_LIST command
and assigns it to its interface.

Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobonding: Remove obsolete source file 'bond_ipv6.c'
Ben Hutchings [Thu, 24 Nov 2011 08:16:21 +0000 (08:16 +0000)]
bonding: Remove obsolete source file 'bond_ipv6.c'

This file is now unused and should have been removed by commit
7c89943236750537d26421d9bbb6f6575e2d1e1b ("bonding, ipv4, ipv6, vlan:
Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS").

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Use IS_ENABLED() in netdevice.h as appropriate
Ben Hutchings [Fri, 25 Nov 2011 14:40:26 +0000 (14:40 +0000)]
net: Use IS_ENABLED() in netdevice.h as appropriate

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodsa: Allow core and drivers to be built as modules
Ben Hutchings [Fri, 25 Nov 2011 14:38:38 +0000 (14:38 +0000)]
dsa: Allow core and drivers to be built as modules

Change the kconfig types to tristate and adjust the condition for
declaring net_device::dsa_ptr to allow for this.

Adjust the makefile so that if NET_DSA_MV88E6123_61_65=y and
NET_DSA_MV88E6131=m or vice versa then both drivers are built-in.  We
could leave these options as bool and make NET_DSA_MV88E6XXX a
user-selected option, but that would break existing configurations.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodsa: Define module author, description, license and aliases for drivers
Ben Hutchings [Fri, 25 Nov 2011 14:37:16 +0000 (14:37 +0000)]
dsa: Define module author, description, license and aliases for drivers

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomv88e6xxx: Combine mv88e6131 and mv88e612_61_65 drivers
Ben Hutchings [Fri, 25 Nov 2011 14:36:19 +0000 (14:36 +0000)]
mv88e6xxx: Combine mv88e6131 and mv88e612_61_65 drivers

These drivers share a lot of code, so if we make them modular they
should be built into the same module.  Therefore, link them together
and merge their respective module init and exit functions.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodsa: Combine core and tagging code
Ben Hutchings [Fri, 25 Nov 2011 14:35:02 +0000 (14:35 +0000)]
dsa: Combine core and tagging code

These files have circular dependencies, so if we make DSA modular then
they must be built into the same module.  Therefore, link them
together and merge their respective module init and exit functions.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodsa: Export functions from core to modules
Ben Hutchings [Fri, 25 Nov 2011 14:34:07 +0000 (14:34 +0000)]
dsa: Export functions from core to modules

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions
Ben Hutchings [Fri, 25 Nov 2011 14:32:52 +0000 (14:32 +0000)]
dsa: Change dsa_uses_{dsa, trailer}_tags() into inline functions

eth_type_trans() will use these functions if DSA is enabled, which
blocks building DSA as a module.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Sat, 26 Nov 2011 19:47:03 +0000 (14:47 -0500)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
net/ipv4/inet_diag.c

12 years agonet: Revert ARCNET and PHYLIB to tristate options
Ben Hutchings [Fri, 25 Nov 2011 14:40:02 +0000 (14:40 +0000)]
net: Revert ARCNET and PHYLIB to tristate options

commit 88491d8103498a6166f70d5999902fec70924314 ("drivers/net: Kconfig
& Makefile cleanup") changed the type of these options to bool, but
they select code that could (and still can) be built as modules.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Don't use the cached pmtu informations for input routes
Steffen Klassert [Wed, 23 Nov 2011 02:14:50 +0000 (02:14 +0000)]
ipv4: Don't use the cached pmtu informations for input routes

The pmtu informations on the inetpeer are visible for output and
input routes. On packet forwarding, we might propagate a learned
pmtu to the sender. As we update the pmtu informations of the
inetpeer on demand, the original sender of the forwarded packets
might never notice when the pmtu to that inetpeer increases.
So use the mtu of the outgoing device on packet forwarding instead
of the pmtu to the final destination.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoroute: struct rtable can be const in rt_is_input_route and rt_is_output_route
Steffen Klassert [Wed, 23 Nov 2011 02:14:15 +0000 (02:14 +0000)]
route: struct rtable can be const in rt_is_input_route and rt_is_output_route

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Move mtu handling down to the protocol depended handlers
Steffen Klassert [Wed, 23 Nov 2011 02:13:31 +0000 (02:13 +0000)]
net: Move mtu handling down to the protocol depended handlers

We move all mtu handling from dst_mtu() down to the protocol
layer. So each protocol can implement the mtu handling in
a different manner.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Rename the dst_opt default_mtu method to mtu
Steffen Klassert [Wed, 23 Nov 2011 02:12:51 +0000 (02:12 +0000)]
net: Rename the dst_opt default_mtu method to mtu

We plan to invoke the dst_opt->default_mtu() method unconditioally
from dst_mtu(). So rename the method to dst_opt->mtu() to match
the name with the new meaning.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoroute: Use the device mtu as the default for blackhole routes
Steffen Klassert [Wed, 23 Nov 2011 02:12:13 +0000 (02:12 +0000)]
route: Use the device mtu as the default for blackhole routes

As it is, we return null as the default mtu of blackhole routes.
This may lead to a propagation of a bogus pmtu if the default_mtu
method of a blackhole route is invoked. So return dst->dev->mtu
as the default mtu instead.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'for_david' of git://git.open-mesh.org/linux-merge
David S. Miller [Sat, 26 Nov 2011 19:26:24 +0000 (14:26 -0500)]
Merge branch 'for_david' of git://git.open-mesh.org/linux-merge

12 years agonetns: fix proxy ARP entries listing on a netns
Jorge Boncompte [DTI2] [Fri, 25 Nov 2011 18:24:49 +0000 (13:24 -0500)]
netns: fix proxy ARP entries listing on a netns

Skip entries from foreign network namespaces.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/netlabel: copy and paste bug in netlbl_cfg_unlbl_map_add()
Dan Carpenter [Wed, 23 Nov 2011 21:18:20 +0000 (21:18 +0000)]
net/netlabel: copy and paste bug in netlbl_cfg_unlbl_map_add()

This was copy and pasted from the IPv4 code.  We're calling the
ip4 version of that function and map4 is NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: mv643xx_eth: fix build error
Axel Lin [Thu, 24 Nov 2011 05:41:55 +0000 (00:41 -0500)]
net: mv643xx_eth: fix build error

Fix below build error:
  CC      drivers/net/ethernet/marvell/mv643xx_eth.o
drivers/net/ethernet/marvell/mv643xx_eth.c: In function 'mv643xx_eth_get_drvinfo':
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: 'info' undeclared (first use in this function)
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: (Each undeclared identifier is reported only once
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: for each function it appears in.)
make[4]: *** [drivers/net/ethernet/marvell/mv643xx_eth.o] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Save nexthop address of LSRR/SSRR option to IPCB.
Li Wei [Tue, 22 Nov 2011 23:33:10 +0000 (23:33 +0000)]
ipv4: Save nexthop address of LSRR/SSRR option to IPCB.

We can not update iph->daddr in ip_options_rcv_srr(), It is too early.
When some exception ocurred later (eg. in ip_forward() when goto
sr_failed) we need the ip header be identical to the original one as
ICMP need it.

Add a field 'nexthop' in struct ip_options to save nexthop of LSRR
or SSRR option.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoehea: Use round_jiffies_relative to align workqueue
Anton Blanchard [Wed, 23 Nov 2011 00:13:54 +0000 (00:13 +0000)]
ehea: Use round_jiffies_relative to align workqueue

Use round_jiffies_relative to align the ehea workqueue and avoid
extra wakeups.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoehea: Reduce memory usage in buffer pools
Anton Blanchard [Wed, 23 Nov 2011 00:13:02 +0000 (00:13 +0000)]
ehea: Reduce memory usage in buffer pools

Now that we enable multiqueue by default the ehea driver is using
quite a lot of memory for its buffer pools. With 4 queues we
consume 64MB in the jumbo packet ring, 16MB in the medium packet
ring and 16MB in the tiny packet ring.

We should only fill the jumbo ring once the MTU is increased but
for now halve it's size so it consumes 32MB. Also reduce the tiny
packet ring, with 4 queues we had 16k entries which is overkill.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: fix size of external list for TX address descriptors
Thadeu Lima de Souza Cascardo [Wed, 23 Nov 2011 13:10:42 +0000 (13:10 +0000)]
qlge: fix size of external list for TX address descriptors

When transmiting a fragmented skb, qlge fills a descriptor with the
fragment addresses, after DMA-mapping them. If there are more than eight
fragments, it will use the eighth descriptor as a pointer to an external
list. After mapping this external list, called OAL to a structure
containing more descriptors, it fills it with the extra fragments.

However, considering that systems with pages larger than 8KiB would have
less than 8 fragments, which was true before commit a715dea3c8e, it
defined a macro for the OAL size as 0 in those cases.

Now, if a skb with more than 8 fragments (counting skb->data as one
fragment), this would start overwriting the list of addresses already
mapped and would make the driver fail to properly unmap the right
addresses on architectures with pages larger than 8KiB.

Besides that, the list of mappings was one size too small, since it must
have a mapping for the maxinum number of skb fragments plus one for
skb->data and another for the OAL. So, even on architectures with page
sizes 4KiB and 8KiB, a skb with the maximum number of fragments would
make the driver overwrite its counter for the number of mappings, which,
again, would make it fail to unmap the mapped DMA addresses.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: Fix 5461x LED
Yaniv Rosner [Wed, 23 Nov 2011 03:54:08 +0000 (03:54 +0000)]
bnx2x: Fix 5461x LED

Fix port identify test on 5461x PHY by driving LEDs through MDIO.

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: treewide use of RCU_INIT_POINTER
Eric Dumazet [Wed, 23 Nov 2011 07:09:32 +0000 (07:09 +0000)]
net: treewide use of RCU_INIT_POINTER

rcu_assign_pointer(ptr, NULL) can be safely replaced by
RCU_INIT_POINTER(ptr, NULL)

(old rcu_assign_pointer() macro was testing the NULL value and could
omit the smp_wmb(), but this had to be removed because of compiler
warnings)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4 : igmp : fix error handle in ip_mc_add_src()
Jun Zhao [Tue, 22 Nov 2011 17:19:03 +0000 (17:19 +0000)]
ipv4 : igmp : fix error handle in ip_mc_add_src()

When add sources to interface failure, need to roll back the sfcount[MODE]
to before state. We need to match it corresponding.

Acked-by: David L Stevens <dlstevens@us.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: tcp: fix tcp_v6_conn_request()
Eric Dumazet [Wed, 23 Nov 2011 22:29:23 +0000 (17:29 -0500)]
ipv6: tcp: fix tcp_v6_conn_request()

Since linux 2.6.26 (commit c6aefafb7ec6 : Add IPv6 support to TCP SYN
cookies), we can drop a SYN packet reusing a TIME_WAIT socket.

(As a matter of fact we fail to send the SYNACK answer)

As the client resends its SYN packet after a one second timeout, we
accept it, because first packet removed the TIME_WAIT socket before
being dropped.

This probably explains why nobody ever noticed or complained.

Reported-by: Jesse Young <jlyo@jlyo.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agob44: Use dev_kfree_skb_irq() in b44_tx()
Xander Hover [Wed, 23 Nov 2011 21:40:31 +0000 (16:40 -0500)]
b44: Use dev_kfree_skb_irq() in b44_tx()

Reported issues when using dev_kfree_skb() on UP systems and
systems with low numbers of cores.  dev_kfree_skb_irq() will
properly save IRQ state before freeing the skb.

Tested on 3.1.1 and 3.2_rc2

Example of reproducible trace of kernel 3.1.1
------------[ cut here ]------------
   WARNING: at kernel/softirq.c:159 local_bh_enable+0x32/0x79()
   ...
   Pid: 0, comm: swapper Not tainted 3.1.1-gentoo #1
   Call Trace:
    [<c1022970>] warn_slowpath_common+0x65/0x7a
    [<c102699e>] ? local_bh_enable+0x32/0x79
    [<c1022994>] warn_slowpath_null+0xf/0x13
    [<c102699e>] local_bh_enable+0x32/0x79
    [<c134bfd8>] destroy_conntrack+0x7c/0x9b
    [<c134890b>] nf_conntrack_destroy+0x1f/0x26
    [<c132e3a6>] skb_release_head_state+0x74/0x83
    [<c132e286>] __kfree_skb+0xb/0x6b
    [<c132e30a>] consume_skb+0x24/0x26
    [<c127c925>] b44_poll+0xaa/0x449
    [<c1333ca1>] net_rx_action+0x3f/0xea
    [<c1026a44>] __do_softirq+0x5f/0xd5
    [<c10269e5>] ? local_bh_enable+0x79/0x79
    <IRQ>  [<c1026c32>] ? irq_exit+0x34/0x8d
    [<c1003628>] ? do_IRQ+0x74/0x87
    [<c13f5329>] ? common_interrupt+0x29/0x30
    [<c1006e18>] ? default_idle+0x29/0x3e
    [<c10015a7>] ? cpu_idle+0x2f/0x5d
    [<c13e91c5>] ? rest_init+0x79/0x7b
    [<c15c66a9>] ? start_kernel+0x297/0x29c
    [<c15c60b0>] ? i386_start_kernel+0xb0/0xb7
   ---[ end trace 583f33bb1aa207a9 ]---

Signed-off-by: Xander Hover <LKML@hover.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: Remove NOTRACK/RAW dependency on NETFILTER_ADVANCED.
David S. Miller [Wed, 23 Nov 2011 21:07:00 +0000 (16:07 -0500)]
netfilter: Remove NOTRACK/RAW dependency on NETFILTER_ADVANCED.

Distributions are using this in their default scripts, so don't hide
them behind the advanced setting.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: Fix build break
Neil Horman [Wed, 23 Nov 2011 20:52:58 +0000 (15:52 -0500)]
netprio_cgroup: Fix build break

I broke the build with the addition of netprio_cgroups if CONFIG_CGROUPS=n.
This patch corrects it by moving the offending struct into an ifdef
CONFIG_CGROUPS block.  Also clean up a few needless defines and inline functions
that don't get called if CONFIG_CGROUPS isn't defined while Im at it.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: tcp: fix panic in SYN processing
Eric Dumazet [Wed, 23 Nov 2011 20:49:31 +0000 (15:49 -0500)]
ipv6: tcp: fix panic in SYN processing

commit 72a3effaf633bc ([NET]: Size listen hash tables using backlog
hint) added a bug allowing inet6_synq_hash() to return an out of bound
array index, because of u16 overflow.

Bug can happen if system admins set net.core.somaxconn &
net.ipv4.tcp_max_syn_backlog sysctls to values greater than 65536

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: fix a bug in ndisc_send_redirect
Li Wei [Wed, 23 Nov 2011 08:51:54 +0000 (03:51 -0500)]
ipv6: fix a bug in ndisc_send_redirect

Release skb when transmit rate limit _not_ allow

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 22 Nov 2011 21:46:55 +0000 (16:46 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agonet: remove netdev_alloc_page and use __GFP_COLD
Eric Dumazet [Tue, 22 Nov 2011 10:57:41 +0000 (10:57 +0000)]
net: remove netdev_alloc_page and use __GFP_COLD

Given we dont use anymore the struct net_device *dev argument, and this
interface brings litle benefit, remove netdev_{alloc|free}_page(), to
debloat include/linux/skbuff.h a bit.

(Some drivers used a mix of these interfaces and alloc_pages())

When allocating a page given to device for DMA transfer (device to
memory), it makes sense to use a cold one (__GFP_COLD)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoSweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of...
Rick Jones [Mon, 21 Nov 2011 10:54:05 +0000 (10:54 +0000)]
Sweep away N/A fw_version dustbunnies from the .get_drvinfo routine of a number of drivers

Per discussion with Ben Hutchings and David Miller, go through and
remove assignments of "N/A" to fw_version in various drivers'
.get_drvinfo routines.  While there clean-up some use of bare
constants and such.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: remove ipv6_addr_copy()
Alexey Dobriyan [Mon, 21 Nov 2011 03:39:03 +0000 (03:39 +0000)]
net: remove ipv6_addr_copy()

C assignment can handle struct in6_addr copying.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRevert "rt2800pci: handle spurious interrupts"
John W. Linville [Tue, 22 Nov 2011 21:38:19 +0000 (16:38 -0500)]
Revert "rt2800pci: handle spurious interrupts"

This reverts commit 4ba7d9997869d25bd223dea7536fc1ce9fab3b3b.

The original patch was a misguided attempt to improve performance on
some hardware that is apparently prone to spurious interrupt generation.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agotc: comment spelling fixes
stephen hemminger [Mon, 21 Nov 2011 06:53:46 +0000 (06:53 +0000)]
tc: comment spelling fixes

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRevert "rt2x00: handle spurious pci interrupts"
John W. Linville [Tue, 22 Nov 2011 21:36:35 +0000 (16:36 -0500)]
Revert "rt2x00: handle spurious pci interrupts"

This reverts commit 23085d5796561625db4143a671f1de081f66ef08.

The original patch was a misguided attempt to improve performance on
some hardware that is apparently prone to spurious interrupt generation.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet: correct comments of skb_shift
Feng King [Mon, 21 Nov 2011 01:47:11 +0000 (01:47 +0000)]
net: correct comments of skb_shift

when skb_shift, we want to shift paged data from skb to tgt frag area.
Original comments revert the shift order

Signed-off-by: Feng King <kinwin2008@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: Allow MSG_PEEK for atm sockets
Jorge Boncompte [DTI2] [Mon, 21 Nov 2011 10:25:58 +0000 (10:25 +0000)]
atm: Allow MSG_PEEK for atm sockets

Now that the vcc backends do the right thing with respect the receive
queue on registration, allow MSK_PEEK for atm sockets.

This allows a userspace program to inspect the packets and decide what
backend to use to handle them.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: Introduce vcc_process_recv_queue
Jorge Boncompte [DTI2] [Mon, 21 Nov 2011 10:25:57 +0000 (10:25 +0000)]
atm: Introduce vcc_process_recv_queue

This function moves the implementation found in the clip and br2684
modules to common code, correctly unlinks the skb from the queue
before pushing it and makes pppoatm use it.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: clip: move clip_devs check to clip_push
Jorge Boncompte [DTI2] [Mon, 21 Nov 2011 10:25:56 +0000 (10:25 +0000)]
atm: clip: move clip_devs check to clip_push

This will allow further cleanup.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: clip: Don't move counters backwards
Jorge Boncompte [DTI2] [Mon, 21 Nov 2011 10:25:55 +0000 (10:25 +0000)]
atm: clip: Don't move counters backwards

I don't see the point on substracting the skb len from the netdev
stats.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: br2684: Do not move counters backwards
Jorge Boncompte [DTI2] [Mon, 21 Nov 2011 10:25:54 +0000 (10:25 +0000)]
atm: br2684: Do not move counters backwards

This snippet has caused several bugs in the past, and I don't see the
point on substracting the skb len from netdev stats.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet-netlink: fix diag to export IPv4 tos for dual-stack IPv6 sockets
Maciej Żenczykowski [Tue, 22 Nov 2011 21:03:10 +0000 (16:03 -0500)]
net-netlink: fix diag to export IPv4 tos for dual-stack IPv6 sockets

Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Add MDI-X reporting
Matt Carlson [Mon, 21 Nov 2011 15:01:20 +0000 (15:01 +0000)]
tg3: Add MDI-X reporting

This patch adds MDI-X state reporting.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Restrict large prod ring cap devices
Matt Carlson [Mon, 21 Nov 2011 15:01:19 +0000 (15:01 +0000)]
tg3: Restrict large prod ring cap devices

Future devices may or may not be capable of supporting larger rx
producer rings.  This patch changes the code so that this flag is set on
an ASIC rev to ASIC rev basis.  Also, this patch changes a place where
the LRG_PROD_RING_CAP flag was not controlling how the rx standard
producer ring size was set.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Adjust BD replenish thresholds
Matt Carlson [Mon, 21 Nov 2011 15:01:18 +0000 (15:01 +0000)]
tg3: Adjust BD replenish thresholds

The BD replenish thresholds for the 57765 and newer ASIC revs are a
little strict.  They were tuned for a mode that is currently unused.
This patch relaxes the thresholds so that they are set to values more
inline with the resources available.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Make 1000Base-X FC resolution look like 1000T
Matt Carlson [Mon, 21 Nov 2011 15:01:17 +0000 (15:01 +0000)]
tg3: Make 1000Base-X FC resolution look like 1000T

This patch changes tg3's 1000Base-X flow control resolution to look like
the 1000Base-T flow control resolution code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoCDC NCM: Use kzalloc rather than kmalloc followed by memset with 0
Thomas Meyer [Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)]
CDC NCM: Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm: optimize ipv4 selector matching
Alexey Dobriyan [Tue, 22 Nov 2011 06:46:02 +0000 (06:46 +0000)]
xfrm: optimize ipv4 selector matching

Current addr_match() is errh, under-optimized.

Compiler doesn't know that memcmp() branch doesn't trigger for IPv4.
Also, pass addresses by value -- they fit into register.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: add documentation for net_prio cgroups (v4)
Neil Horman [Tue, 22 Nov 2011 05:10:52 +0000 (05:10 +0000)]
net: add documentation for net_prio cgroups (v4)

Add the requisite documentation to explain to new users how net_prio cgroups work

Signed-off-by:Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
CC: Robert Love <robert.w.love@intel.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: add network priority cgroup infrastructure (v4)
Neil Horman [Tue, 22 Nov 2011 05:10:51 +0000 (05:10 +0000)]
net: add network priority cgroup infrastructure (v4)

This patch adds in the infrastructure code to create the network priority
cgroup.  The cgroup, in addition to the standard processes file creates two
control files:

1) prioidx - This is a read-only file that exports the index of this cgroup.
This is a value that is both arbitrary and unique to a cgroup in this subsystem,
and is used to index the per-device priority map

2) priomap - This is a writeable file.  On read it reports a table of 2-tuples
<name:priority> where name is the name of a network interface and priority is
indicates the priority assigned to frames egresessing on the named interface and
originating from a pid in this cgroup

This cgroup allows for skb priority to be set prior to a root qdisc getting
selected. This is benenficial for DCB enabled systems, in that it allows for any
application to use dcb configured priorities so without application modification

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
CC: Robert Love <robert.w.love@intel.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: Fix advertisement handling
Hiroaki SHIMODA [Tue, 22 Nov 2011 04:05:41 +0000 (04:05 +0000)]
tg3: Fix advertisement handling

Commit 28011cf19b (net: Add ethtool to mii advertisment conversion
helpers) added a helper function ethtool_adv_to_mii_100bt() and
tg3_copper_is_advertising_all(), tg3_phy_autoneg_cfg() were
modified to use this.
Before that commit, ethtool to mii advertisement conversion was
done wrt speed, but now pause operation is also taken account.
So, in tg3_copper_is_advertising_all(), below condition becomes
true and this makes link up fails.

if ((adv_reg & ADVERTISE_ALL) != all_mask)
return 0;

To fix this add ADVERTISE_ALL bit and operation to cap speed,
and change default advertisement not including ADVERTISED_Pause.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: use SKB_TRUESIZE() in atm_guess_pdu2truesize()
Eric Dumazet [Mon, 21 Nov 2011 19:51:34 +0000 (19:51 +0000)]
atm: use SKB_TRUESIZE() in atm_guess_pdu2truesize()

SKB_TRUESIZE() provides a better approximation of expected skb truesize.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: fix endian conversion in cffrml_transmit()
Dan Carpenter [Mon, 21 Nov 2011 21:46:24 +0000 (16:46 -0500)]
caif: fix endian conversion in cffrml_transmit()

The "tmp" variable here is used to store the result of cpu_to_le16()
so it should be an __le16 instead of an int.  We want the high bits
set and the current code works on little endian systems but not on
big endian systems.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodccp: fix error propagation in dccp_v4_connect
RongQing.Li [Mon, 21 Nov 2011 21:45:26 +0000 (16:45 -0500)]
dccp: fix error propagation in dccp_v4_connect

The errcode is not updated when ip_route_newports() fails.

Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet, sja1000: Don't include version.h in peak_pci.c when not needed
Jesper Juhl [Sun, 20 Nov 2011 11:07:09 +0000 (11:07 +0000)]
net, sja1000: Don't include version.h in peak_pci.c when not needed

It was pointed out by "make versioncheck" that we do not need to include
version.h in drivers/net/can/sja1000/peak_pci.c
This patch removes the unneeded include.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetfilter: use jump_label for nf_hooks
Eric Dumazet [Fri, 18 Nov 2011 17:32:46 +0000 (17:32 +0000)]
netfilter: use jump_label for nf_hooks

On configs where CONFIG_JUMP_LABEL=y, we can replace in fast path a
load/compare/conditional jump by a single jump with no dcache reference.

Jump target is modified as soon as nf_hooks[pf][hook] switches from
empty state to non empty states. jump_label state is kept outside of
nf_hooks array so has no cost on cpu caches.

This patch removes the test on CONFIG_NETFILTER_DEBUG : No need to call
nf_hook_slow() at all if nf_hooks[pf][hook] is empty, this didnt give
useful information, but slowed down things a lot.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Patrick McHardy <kaber@trash.net>
CC: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotg3: switch to build_skb() infrastructure
Eric Dumazet [Fri, 18 Nov 2011 06:47:01 +0000 (06:47 +0000)]
tg3: switch to build_skb() infrastructure

This is very similar to bnx2x conversion, but simpler since no special
alignement is required, so goal was not to reduce skb truesize.

Using build_skb() reduces cache line misses in the driver, since we
use cache hot skb instead of cold ones. Number of in-flight sk_buff
structures is lower, they are more likely recycled in SLUB caches
while still hot.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Matt Carlson <mcarlson@broadcom.com>
CC: Michael Chan <mchan@broadcom.com>
CC: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxen-netback: use correct index for invalidation in xen_netbk_tx_check_gop()
Jan Beulich [Fri, 18 Nov 2011 05:42:05 +0000 (05:42 +0000)]
xen-netback: use correct index for invalidation in xen_netbk_tx_check_gop()

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agostmmac: mask mmc interrupts
Giuseppe CAVALLARO [Fri, 18 Nov 2011 05:00:20 +0000 (05:00 +0000)]
stmmac: mask mmc interrupts

We need to mask the MMC irq otherwise if we raise the mmc
interrupts that are not handled the driver loops in the
handler.
In fact, by default all mmc counters (only used for stats)
are managed in SW and registers are cleared on each READ.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Change mii to ethtool advertisement function names
Matt Carlson [Thu, 17 Nov 2011 14:30:55 +0000 (14:30 +0000)]
net: Change mii to ethtool advertisement function names

This patch implements advice by Ben Hutchings to change the mii side of
the function names to look more like the register whose values they
convert.  New LPA translation functions have been added as well.

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>
12 years agogianfar: Use kmemdup rather than duplicating its implementation
Thomas Meyer [Thu, 17 Nov 2011 13:05:35 +0000 (13:05 +0000)]
gianfar: Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoRxRPC: Use kmemdup rather than duplicating its implementation
Thomas Meyer [Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)]
RxRPC: Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoksz884x: Use kzalloc rather than kmalloc followed by memset with 0
Thomas Meyer [Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)]
ksz884x: Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
Thomas Meyer [Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)]
ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoirttp: Use kmemdup rather than duplicating its implementation
Thomas Meyer [Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)]
irttp: Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiseries_veth: Fix wrong parameter given to sizeof call
Thomas Jarosch [Thu, 17 Nov 2011 10:33:52 +0000 (10:33 +0000)]
iseries_veth: Fix wrong parameter given to sizeof call

"remote_list" is of type

struct dma_chunk remote_list[VETH_MAX_FRAMES_PER_MSG];

Probably a copy'n'paste error.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoprism54: potential memory corruption in prism54_get_essid()
Dan Carpenter [Mon, 21 Nov 2011 14:47:13 +0000 (17:47 +0300)]
prism54: potential memory corruption in prism54_get_essid()

"dwrq->length" is the capped version of "essid->length".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix regulatory NULL dereference
Johannes Berg [Mon, 21 Nov 2011 09:44:00 +0000 (10:44 +0100)]
cfg80211: fix regulatory NULL dereference

By the time userspace returns with a response to
the regulatory domain request, the wiphy causing
the request might have gone away. If this is so,
reject the update but mark the request as having
been processed anyway.

Cc: Luis R. Rodriguez <lrodriguez@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix endian bug in radiotap header generation
Helmut Schaa [Fri, 18 Nov 2011 16:02:16 +0000 (17:02 +0100)]
mac80211: Fix endian bug in radiotap header generation

I intoduced this bug in commit a2fe81667410723d941a688e1958a49d67ca3346
"mac80211: Build TX radiotap header dynamically"

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix AMSDU rate printout in debugfs.
Ben Greear [Thu, 17 Nov 2011 22:53:36 +0000 (14:53 -0800)]
mac80211: Fix AMSDU rate printout in debugfs.

It was flipped.  See section 7.3.2.56 of the 802.11n
spec for details.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Mon, 21 Nov 2011 18:50:33 +0000 (13:50 -0500)]
Merge git://git./linux/kernel/git/davem/net

The forcedeth changes had a conflict with the conversion over
to atomic u64 statistics in net-next.

The libertas cfg.c code had a conflict with the bss reference
counting fix by John Linville in net-next.

Conflicts:
drivers/net/ethernet/nvidia/forcedeth.c
drivers/net/wireless/libertas/cfg.c

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sun, 20 Nov 2011 22:59:33 +0000 (14:59 -0800)]
Merge git://git./linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (86 commits)
  ipv4: fix redirect handling
  ping: dont increment ICMP_MIB_INERRORS
  sky2: fix hang in napi_disable
  sky2: enforce minimum ring size
  bonding: Don't allow mode change via sysfs with slaves present
  f_phonet: fix page offset of first received fragment
  stmmac: fix pm functions avoiding sleep on spinlock
  stmmac: remove spin_lock in stmmac_ioctl.
  stmmac: parameters auto-tuning through HW cap reg
  stmmac: fix advertising 1000Base capabilties for non GMII iface
  stmmac: use mdelay on timeout of sw reset
  sky2: version 1.30
  sky2: used fixed RSS key
  sky2: reduce default Tx ring size
  sky2: rename up/down functions
  sky2: pci posting issues
  sky2: fix hang on shutdown (and other irq issues)
  r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list
  MAINTAINERS: change email address for shemminger
  pch_gbe: Move #include of module.h
  ...

12 years agoMerge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 20 Nov 2011 22:57:43 +0000 (14:57 -0800)]
Merge branch 'kvm-updates/3.2' of git://git./virt/kvm/kvm

* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM guest: prevent tracing recursion with kvmclock
  Revert "KVM: PPC: Add support for explicit HIOR setting"
  KVM: VMX: Check for automatic switch msr table overflow
  KVM: VMX: Add support for guest/host-only profiling
  KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
  KVM: s390: announce SYNC_MMU
  KVM: s390: Fix tprot locking
  KVM: s390: handle SIGP sense running intercepts
  KVM: s390: Fix RUNNING flag misinterpretation

12 years agoMerge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur...
Linus Torvalds [Sun, 20 Nov 2011 22:34:58 +0000 (14:34 -0800)]
Merge branch 'fixes' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  ARM: wire up process_vm_writev and process_vm_readv syscalls
  ARM: 7160/1: setup: avoid overflowing {elf,arch}_name from proc_info_list
  ARM: 7158/1: add new MFP implement for NUC900
  ARM: 7157/1: fix a building WARNING for nuc900
  ARM: 7156/1: l2x0: fix compile error on !CONFIG_USE_OF
  ARM: 7155/1: arch.h: Declare 'pt_regs' locally
  ARM: 7154/1: mach-bcmring: fix build error in dma.c
  ARM: 7153/1: mach-bcmring: fix build error in core.c
  ARM: 7152/1: distclean: Remove generated .dtb files
  ARM: 7150/1: Allow kernel unaligned accesses on ARMv6+ processors
  ARM: 7149/1: spi/pl022: Enable clock in probe
  Revert "ARM: 7098/1: kdump: copy kernel relocation code at the kexec prepare stage"

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Sun, 20 Nov 2011 22:33:02 +0000 (14:33 -0800)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Suspend: Fix bug in suspend statistics update
  PM / Hibernate: Fix the early termination of test modes
  PM / shmobile: Fix build of sh7372_pm_init() for CONFIG_PM unset
  PM Sleep: Do not extend wakeup paths to devices with ignore_children set
  PM / driver core: disable device's runtime PM during shutdown
  PM / devfreq: correct Kconfig dependency
  PM / devfreq: fix use after free in devfreq_remove_device
  PM / shmobile: Avoid restoring the INTCS state during initialization
  PM / devfreq: Remove compiler error after irq.h update
  PM / QoS: Properly use the WARN() macro in dev_pm_qos_add_request()
  PM / Clocks: Only disable enabled clocks in pm_clk_suspend()
  ARM: mach-shmobile: sh7372 A3SP no_suspend_console fix
  PM / shmobile: Don't skip debugging output in pd_power_up()

12 years agobatman-adv: Fix range check for expected packets
Simon Wunderlich [Sun, 30 Oct 2011 15:22:43 +0000 (16:22 +0100)]
batman-adv: Fix range check for expected packets

The check for new packets in the future used a wrong binary operator,
which makes the check expression always true and accepting too many
packets.

Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: check for tt_reponse packet real length
Antonio Quartulli [Sun, 16 Oct 2011 18:32:03 +0000 (20:32 +0200)]
batman-adv: check for tt_reponse packet real length

Before accessing the TT_RESPONSE packet payload, the node has to ensure that the
packet is long enough as it would expect to be.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: linearise the tt_response skb only if needed
Antonio Quartulli [Sun, 16 Oct 2011 18:32:02 +0000 (20:32 +0200)]
batman-adv: linearise the tt_response skb only if needed

The TT_RESPONSE skb has to be linearised only if the node plans to access the
packet payload (so only if the message is directed to that node). In all the
other cases the node can avoid this memory operation

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: directly write tt entries without buffering
Simon Wunderlich [Sat, 22 Oct 2011 16:15:26 +0000 (18:15 +0200)]
batman-adv: directly write tt entries without buffering

When the translation tables (global and local) are written for debugfs,
it is not neccesary to allocate a buffer, we can directly use
seq_printf() to print them out.

This might actually be safer if the table changes between size
calculation and traversal, and we can't estimate the required size
wrong.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: fixed hash functions type to uint32_t instead of int
Antonio Quartulli [Wed, 5 Oct 2011 15:05:25 +0000 (17:05 +0200)]
batman-adv: fixed hash functions type to uint32_t instead of int

There are two reasons for this fix:
- the result of choose_orig() and vis_choose() is an index and therefore it can't
  be negative. Hence it is correct to make the return type unsigned too.

- sizeof(int) may not be the same on ALL the architectures. Since we plan to use
  choose_orig() as DHT hash function, we need to guarantee that, given the same
  argument, the result is the same. Then it is correct to explicitly express
  the size of the return type (and the second argument). Since the expected
  length is currently 4, uint32_t is the most convenient choice.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: use orig_hash_find() instead of get_orig_node() in TT code
Antonio Quartulli [Wed, 12 Oct 2011 12:54:50 +0000 (14:54 +0200)]
batman-adv: use orig_hash_find() instead of get_orig_node() in TT code

get_orig_node() tries to retrieve an orig_node object based on a mac address
and creates it if not present. This is not the wanted behaviour in the
translation table code as we don't want to create new orig_code objects but
expect a NULL pointer if the object does not exist.

Reported-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: refactoring gateway handling code
Marek Lindner [Thu, 8 Sep 2011 11:12:53 +0000 (13:12 +0200)]
batman-adv: refactoring gateway handling code

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: Replace obsolete strict_strto<foo> with kstrto<foo>
Sven Eckelmann [Fri, 30 Sep 2011 11:32:01 +0000 (13:32 +0200)]
batman-adv: Replace obsolete strict_strto<foo> with kstrto<foo>

strict_strto<foo> is obsolete since v3.1-rc8-8466-g14acc55 and should be
replaced with kstrto<foo>.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: tt_global_del_orig() has to print the correct message
Antonio Quartulli [Mon, 19 Sep 2011 10:29:19 +0000 (12:29 +0200)]
batman-adv: tt_global_del_orig() has to print the correct message

When deleting the entries, tt_global_del_orig() has to print the message passed
as argument instead of a static one.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agobatman-adv: update internal version number
Sven Eckelmann [Mon, 14 Nov 2011 09:22:13 +0000 (10:22 +0100)]
batman-adv: update internal version number

Signed-off-by: Sven Eckelmann <sven@narfation.org>
12 years agoKVM guest: prevent tracing recursion with kvmclock
Avi Kivity [Tue, 15 Nov 2011 12:59:07 +0000 (14:59 +0200)]
KVM guest: prevent tracing recursion with kvmclock

Prevent tracing of preempt_disable() in get_cpu_var() in
kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled,
preempt_disable/enable() are traced and this causes the function_graph
tracer to go into an infinite recursion. By open coding the
preempt_disable() around the get_cpu_var(), we can use the notrace
version which prevents preempt_disable/enable() from being traced and
prevents the recursion.

Based on a similar patch for Xen from Jeremy Fitzhardinge.

Tested-by: Gleb Natapov <gleb@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Avi Kivity <avi@redhat.com>