]> Pileus Git - ~andy/linux/log
~andy/linux
10 years agoudp6: Fix udp fragmentation for tunnel traffic.
Pravin B Shelar [Thu, 30 May 2013 06:45:27 +0000 (06:45 +0000)]
udp6: Fix udp fragmentation for tunnel traffic.

udp6 over GRE tunnel does not work after to GRE tso changes. GRE
tso handler passes inner packet but keeps track of outer header
start in SKB_GSO_CB(skb)->mac_offset.  udp6 fragment need to
take care of outer header, which start at the mac_offset, while
adding fragment header.
This bug is introduced by commit 68c3316311 (GRE: Add TCP
segmentation offload for GRE).

Reported-by: Dmitry Kravkov <dkravkov@gmail.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Tested-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/core: dev_mc_sync_multiple calls wrong helper
Jay Vosburgh [Fri, 31 May 2013 11:57:29 +0000 (11:57 +0000)]
net/core: dev_mc_sync_multiple calls wrong helper

The dev_mc_sync_multiple function is currently calling
__hw_addr_sync, and not __hw_addr_sync_multiple.  This will result in
addresses only being synced to the first device from the set.

Corrected by calling the _multiple variant.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/core: __hw_addr_sync_one / _multiple broken
Jay Vosburgh [Fri, 31 May 2013 11:57:28 +0000 (11:57 +0000)]
net/core: __hw_addr_sync_one / _multiple broken

Currently, __hw_addr_sync_one is called in a loop by
__hw_addr_sync_multiple to sync each of a "from" device's hw addresses
to a "to" device.  __hw_addr_sync_one calls __hw_addr_add_ex to attempt
to add each address.  __hw_addr_add_ex is called with global=false, and
sync=true.

__hw_addr_add_ex checks to see if the new address matches an
address already on the list.  If so, it tests global and sync.  In this
case, sync=true, and it then checks if the address is already synced,
and if so, returns 0.

This 0 return causes __hw_addr_sync_one to increment the sync_cnt
and refcount for the "from" list's address entry, even though the address
is already synced and has a reference and sync_cnt.  This will cause
the sync_cnt and refcount to increment without bound every time an
addresses is added to the "from" device and synced to the "to" device.

The fix here has two parts:

First, when __hw_addr_add_ex finds the address already exists
and is synced, return -EEXIST instead of 0.

Second, __hw_addr_sync_one checks the error return for -EEXIST,
and if so, it (a) does not add a refcount/sync_cnt, and (b) returns 0
itself so that __hw_addr_sync_multiple will not return an error.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/core: __hw_addr_unsync_one "from" address not marked synced
Jay Vosburgh [Fri, 31 May 2013 11:57:27 +0000 (11:57 +0000)]
net/core: __hw_addr_unsync_one "from" address not marked synced

When an address is added to a subordinate interface (the "to"
list), the address entry in the "from" list is not marked "synced" as
the entry added to the "to" list is.

When performing the unsync operation (e.g., dev_mc_unsync),
__hw_addr_unsync_one calls __hw_addr_del_entry with the "synced"
parameter set to true for the case when the address reference is being
released from the "from" list.  This causes a test inside to fail,
with the result being that the reference count on the "from" address
is not properly decremeted and the address on the "from" list will
never be freed.

Correct this by having __hw_addr_unsync_one call the
__hw_addr_del_entry function with the "sync" flag set to false for the
"remove from the from list" case.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/core: __hw_addr_create_ex does not initialize sync_cnt
Jay Vosburgh [Fri, 31 May 2013 11:57:26 +0000 (11:57 +0000)]
net/core: __hw_addr_create_ex does not initialize sync_cnt

The sync_cnt field is not being initialized, which can result
in arbitrary values in the field.  Fixed by initializing it to zero.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Reviewed-by: Vlad Yasevich <vyasevic@redhat.com>
Tested-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosnmp6: remove IPSTATS_MIB_CSUMERRORS
Nicolas Dichtel [Fri, 31 May 2013 05:37:57 +0000 (05:37 +0000)]
snmp6: remove IPSTATS_MIB_CSUMERRORS

This stat is not relevant in IPv6, there is no checksum in IPv6 header.
Just leave a comment to explain the hole.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Fri, 31 May 2013 09:38:19 +0000 (02:38 -0700)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

John W. Linville says:

====================
Please pull this batch of fixes intended for the 3.10 stream...

Regarding the NFC bits, Samuel says:

"This is the first batch of NFC fixes for 3.10, and it contains:

- 3 fixes for the NFC MEI support:
        * We now depend on the correct Kconfig symbol.
        * We register an MEI event callback whenever we enable an NFC device,
          otherwise we fail to read anything after an enable/disable cycle.
        * We only disable an MEI device from its disable mey_phy_ops,
          preventing useless consecutive disable calls.

- An NFC Makefile cleanup, as I forgot to remove a commented out line when
  moving the LLCP code to the NFC top level directory."

As for the mac80211 bits, Johannes says:

"This time I have a fix from Stanislaw for a stupid mistake I made in the
auth/assoc timeout changes, a fix from Felix for 64-bit traffic counters
and one from Helmut for address mask handling in mac80211. I also have a
few fixes myself for four different crashes reported by a few people."

And Johannes says this about the iwlwifi bit:

"This fixes a brown paper-bag bug that we really should've caught in
review. More details in the changelog for the fix."

On top of that...

Arend van Spriel and Hante Meuleman cooperate to send a series of AP
and P2P mode fixes for brcmfmac.

Gabor Juhos corrects a register offset for AR9550, avoiding a bus
error.

Dan Carpenter provides a fixup to some dmesg output in the atmel
driver.

And, finally...

Felix Fietkau not only gives us a trio of small AR934x fixes, but
also refactors the ath9k aggregation session start/stop handling
(using the generic mac80211 support) in order to avoid a deadlock.

Please let me know if there are problems!
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobe2net: Fix crash on 2nd invocation of PCI AER/EEH error_detected hook
Somnath Kotur [Wed, 29 May 2013 22:56:17 +0000 (22:56 +0000)]
be2net: Fix crash on 2nd invocation of PCI AER/EEH error_detected hook

During a PCI EEH/AER error recovery flow, if the device did not successfully
restart, the error_detected() hook may be called a second time with a
"perm_failure" state. This patch skips over driver cleanup for the second
invocation of the callback.

Also, Lancer error recovery code is fixed-up to handle these changes.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobe2net: Mark checksum fail for IP fragmented packets
Somnath Kotur [Wed, 29 May 2013 22:55:56 +0000 (22:55 +0000)]
be2net: Mark checksum fail for IP fragmented packets

HW does not compute L4 checksum for IP Fragmented packets.

Signed-off-by: Kalesh AP <kalesh.purayil@emulex.com>
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
David S. Miller [Thu, 30 May 2013 23:38:38 +0000 (16:38 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

====================
The following patchset contains Netfilter/IPVS fixes for 3.10-rc3,
they are:

* fix xt_addrtype with IPv6, from Florian Westphal. This required
  a new hook for IPv6 functions in the netfilter core to avoid
  hard dependencies with the ipv6 subsystem when this match is
  only used for IPv4.

* fix connection reuse case in IPVS. Currently, if an reused
  connection are directed to the same server. If that server is
  down, those connection would fail. Therefore, clear the
  connection and choose a new server among the available ones.

* fix possible non-nul terminated string sent to user-space if
  ipt_ULOG is used as the default netfilter logging stub, from
  Chen Gang.

* fix mark logging of IPv6 packets in xt_LOG, from Michal Kubecek.
  This bug has been there since 2.6.26.

* Fix breakage ip_vs_sh due to incorrect structure layout for
  RCU, from Jan Beulich.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipvs: ip_vs_sh: fix build
Jan Beulich [Wed, 29 May 2013 12:33:51 +0000 (13:33 +0100)]
ipvs: ip_vs_sh: fix build

kfree_rcu() requires offsetof(..., rcu_head) < 4096, which can
get violated with a sufficiently high CONFIG_IP_VS_SH_TAB_BITS.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 29 May 2013 14:59:35 +0000 (10:59 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem

10 years agonetfilter: xt_LOG: fix mark logging for IPv6 packets
Michal Kubeček [Tue, 28 May 2013 22:37:03 +0000 (22:37 +0000)]
netfilter: xt_LOG: fix mark logging for IPv6 packets

In dump_ipv6_packet(), the "recurse" parameter is zero only if
dumping contents of a packet embedded into an ICMPv6 error
message. Therefore we want to log packet mark if recurse is
non-zero, not when it is zero.

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
10 years agotuntap: forbid changing mq flag for persistent device
Jason Wang [Tue, 28 May 2013 18:32:11 +0000 (18:32 +0000)]
tuntap: forbid changing mq flag for persistent device

We currently allow changing the mq flag (IFF_MULTI_QUEUE) for a persistent
device. This will result a mismatch between the number the queues in netdev and
tuntap. This is because we only allocate a 1q netdevice when IFF_MULTI_QUEUE was
not specified, so when we set the IFF_MULTI_QUEUE and try to attach more queues
later, netif_set_real_num_tx_queues() may fail which result a single queue
netdevice with multiple sockets attached.

Solve this by disallowing changing the mq flag for persistent device.

Bug was introduced by commit edfb6a148ce62e5e19354a1dcd9a34e00815c2a1
(tuntap: reduce memory using of queues).

Reported-by: Sriram Narasimhan <sriram.narasimhan@hp.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet/core/sock.c: add missing VSOCK string in af_family_*_key_strings
Federico Vaga [Tue, 28 May 2013 05:02:44 +0000 (05:02 +0000)]
net/core/sock.c: add missing VSOCK string in af_family_*_key_strings

The three arrays of strings: af_family_key_strings,
af_family_slock_key_strings and af_family_clock_key_strings have not
VSOCK's string

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg
Andy Lutomirski [Wed, 22 May 2013 21:07:44 +0000 (14:07 -0700)]
net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg

To: linux-kernel@vger.kernel.org
Cc: x86@kernel.org, trinity@vger.kernel.org, Andy Lutomirski <luto@amacapital.net>, netdev@vger.kernel.org, "David S.
Miller" <davem@davemloft.net>
Subject: [PATCH 5/5] net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg

MSG_CMSG_COMPAT is (AFAIK) not intended to be part of the API --
it's a hack that steals a bit to indicate to other networking code
that a compat entry was used.  So don't allow it from a non-compat
syscall.

This prevents an oops when running this code:

int main()
{
int s;
struct sockaddr_in addr;
struct msghdr *hdr;

char *highpage = mmap((void*)(TASK_SIZE_MAX - 4096), 4096,
                      PROT_READ | PROT_WRITE,
                      MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
if (highpage == MAP_FAILED)
err(1, "mmap");

s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s == -1)
err(1, "socket");

        addr.sin_family = AF_INET;
        addr.sin_port = htons(1);
        addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
if (connect(s, (struct sockaddr*)&addr, sizeof(addr)) != 0)
err(1, "connect");

void *evil = highpage + 4096 - COMPAT_MSGHDR_SIZE;
printf("Evil address is %p\n", evil);

if (syscall(__NR_sendmmsg, s, evil, 1, MSG_CMSG_COMPAT) < 0)
err(1, "sendmmsg");

return 0;
}

Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoath9k: use correct OTP register offsets for AR9550
Gabor Juhos [Tue, 28 May 2013 12:52:19 +0000 (14:52 +0200)]
ath9k: use correct OTP register offsets for AR9550

Accessing the OTP memory on AR9950 causes a data bus
like this:

  Data bus error, epc == 801f7774, ra == 801f7774
  Oops[#1]:
  CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.0-rc3 #592
  task: 87c28000 ti: 87c22000 task.ti: 87c22000
  $ 0   : 00000000 00000061 deadc0de 00000000
  $ 4   : b8115f18 00015f18 00000007 00000004
  $ 8   : 00000001 7c7c3c7c 7c7c7c7c 7c7c7c7c
  $12   : 7c7c3c7c 80320a68 00000000 7c7c7c3c
  $16   : 87cd8010 00015f18 00000007 00000000
  $20   : 00000064 00000004 87c23c7c 8035210c
  $24   : 00000000 801f3674
  $28   : 87c22000 87c23b48 00000001 801f7774
  Hi    : 00000000
  Lo    : 00000064
  epc   : 801f7774 ath9k_hw_wait+0x58/0xb0
      Not tainted
  ra    : 801f7774 ath9k_hw_wait+0x58/0xb0
  Status: 1000cc03 KERNEL EXL IE
  Cause : 4080801c
  PrId  : 00019750 (MIPS 74Kc)
  Modules linked in:
  Process swapper (pid: 1, threadinfo=87c22000, task=87c28000, ts=00000000)
  Stack : 0000000f 00000061 00002710 8006240c 00000001 87cd8010 87c23bb0 87cd8010
          00000000 00000004 00000003 80210c7c 000000b3 67fa8000 0000032a 000006fe
          000003e8 00000002 00000028 87c23bf0 000003ff 80210d24 803e5630 80210e28
          00000000 00000007 87cd8010 00007044 00000004 00000061 000003ff 000001ff
          87c26000 87cd8010 00000220 87cd8bb8 80210000 8020fcf4 87c22000 87c23c08
          ...
  Call Trace:
  [<801f7774>] ath9k_hw_wait+0x58/0xb0
  [<80210c7c>] ar9300_otp_read_word+0x80/0xd4
  [<80210d24>] ar9300_read_otp+0x54/0xb0
  [<8020fcf4>] ar9300_check_eeprom_header+0x1c/0x40
  [<80210fe4>] ath9k_hw_ar9300_fill_eeprom+0x118/0x39c
  [<80206650>] ath9k_hw_eeprom_init+0x74/0xb4
  [<801f96d0>] ath9k_hw_init+0x7ec/0x96c
  [<801e65ec>] ath9k_init_device+0x340/0x758
  [<801f35d0>] ath_ahb_probe+0x21c/0x2c0
  [<801c041c>] driver_probe_device+0xc0/0x1e4
  [<801c05ac>] __driver_attach+0x6c/0xa4
  [<801bea08>] bus_for_each_dev+0x64/0xa8
  [<801bfa40>] bus_add_driver+0xcc/0x24c
  [<801c0954>] driver_register+0xbc/0x17c
  [<803f8fc0>] ath9k_init+0x5c/0x88
  [<800608fc>] do_one_initcall+0xec/0x1a0
  [<803e6a68>] kernel_init_freeable+0x13c/0x200
  [<80309cdc>] kernel_init+0x1c/0xe4
  [<80062450>] ret_from_kernel_thread+0x10/0x18

On the AR9550, the OTP registers are located at
the same address as on the AR9340. Use the correct
values to avoid the error.

Cc: stable@vger.kernel.org # 3.6+
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Disable powersave mode for P2P link.
Hante Meuleman [Mon, 27 May 2013 19:09:59 +0000 (21:09 +0200)]
brcmfmac: Disable powersave mode for P2P link.

For p2p client mode powersave mode should be kept disabled. It is
working but inefficient. In general p2p links do no benefit from this
mode, because these links are setup temporarily to transfer data.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Add multi channel support for P2P.
Hante Meuleman [Mon, 27 May 2013 19:09:58 +0000 (21:09 +0200)]
brcmfmac: Add multi channel support for P2P.

Multi channel support was disabled. This patch will enable it and
configure the P2P GO on the correct frequency when multi channel
is used.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: use struct net_device::destructor to remove interfaces
Arend van Spriel [Mon, 27 May 2013 19:09:57 +0000 (21:09 +0200)]
brcmfmac: use struct net_device::destructor to remove interfaces

Upon deleting a P2P_CLIENT/GO interface the vif and consequently
the wdev is freed before the net_device is actually being unregistered
but cfg80211 still needs to access the wdev. Using destructor field
to free the net_device and vif.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: free net device when registration fails
Arend van Spriel [Mon, 27 May 2013 19:09:56 +0000 (21:09 +0200)]
brcmfmac: free net device when registration fails

When registration fails the net device is no longer needed. Free
the net device and remove reference to private data from the
driver.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add additional parameter to brcmf_free_vif()
Arend van Spriel [Mon, 27 May 2013 19:09:55 +0000 (21:09 +0200)]
brcmfmac: add additional parameter to brcmf_free_vif()

Pass the struct brcmf_cfg80211_info instance instead of obtaining
through vif itself using vif->wdev. This is needed as the netdev
associated with this vif is already unregistered.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Fix p2p setup when connected to ap on 5G.
Hante Meuleman [Mon, 27 May 2013 19:09:54 +0000 (21:09 +0200)]
brcmfmac: Fix p2p setup when connected to ap on 5G.

The firmware requires that on p2p setup when net interfaces
are created or updated that they start initially with the same
channel as the channel in use for the current connection
(if any). If none exists take default channel 11.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: Turn off ARP offloading when configured for AP.
Hante Meuleman [Mon, 27 May 2013 19:09:53 +0000 (21:09 +0200)]
brcmfmac: Turn off ARP offloading when configured for AP.

ARP offloading should only be used in STA or P2P client mode. It
is currently configured once at init. When being configured for AP
ARP offloading should be turned off and when AP mode is left it can
be turned back on.

Cc: stable@vger.kernel.org
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Tue, 28 May 2013 17:39:40 +0000 (13:39 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes

10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Tue, 28 May 2013 17:38:53 +0000 (13:38 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

10 years agoipv4: fix redirect handling for TCP packets
Michal Kubecek [Tue, 28 May 2013 06:26:49 +0000 (08:26 +0200)]
ipv4: fix redirect handling for TCP packets

Unlike ipv4_redirect() and ipv4_sk_redirect(), ip_do_redirect()
doesn't call __build_flow_key() directly but via
ip_rt_build_flow_key() wrapper. This leads to __build_flow_key()
getting pointer to IPv4 header of the ICMP redirect packet
rather than pointer to the embedded IPv4 header of the packet
initiating the redirect.

As a result, handling of ICMP redirects initiated by TCP packets
is broken. Issue was introduced by

4895c771c ("ipv4: Add FIB nexthop exceptions.")

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet: phy: fix a bug when verify the EEE support
Giuseppe CAVALLARO [Sun, 26 May 2013 21:31:28 +0000 (21:31 +0000)]
net: phy: fix a bug when verify the EEE support

The phy_init_eee has to exit with an error when the
local device and its link partner both do not support EEE.
So this patch fixes a problem when verify this.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoipvs: Fix reuse connection if real server is dead
Grzegorz Lyczba [Mon, 13 May 2013 21:56:24 +0000 (23:56 +0200)]
ipvs: Fix reuse connection if real server is dead

Expire cached connection for new TCP/SCTP connection if real
server is down. Otherwise, IPVS uses the dead server for the
reused connection, instead of a new working one.

Signed-off-by: Grzegorz Lyczba <grzegorz.lyczba@gmail.com>
Acked-by: Hans Schillstrom <hans@schillstrom.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
10 years agoiwlwifi: dvm: fix zero LQ CMD sending avoidance
Emmanuel Grumbach [Wed, 22 May 2013 07:48:10 +0000 (10:48 +0300)]
iwlwifi: dvm: fix zero LQ CMD sending avoidance

In 63b77bf489881747c5118476918cc8c29378ee63

iwlwifi: dvm: don't send zeroed LQ cmd

I tried to avoid to send zeroed LQ cmd, but I made a (very)
stupid mistake in the memcmp.
Since this patch has been ported to stable, the fix should
go to stable too.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=58341

Cc: stable@vger.kernel.org
Reported-by: Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: Allow single vif mac address change with addr_mask
Helmut Schaa [Mon, 27 May 2013 08:43:09 +0000 (10:43 +0200)]
mac80211: Allow single vif mac address change with addr_mask

When changing the MAC address of a single vif mac80211 will check if
the new address fits into the address mask specified by the driver.
This only needs to be done when using multiple BSSIDs. Hence, check
the new address only against all other vifs.

Also fix the MAC address assignment on new interfaces if the user
changed the address of a vif such that perm_addr is not covered by
addr_mask anymore.

Resolves:
https://bugzilla.kernel.org/show_bug.cgi?id=57371

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Reported-by: Alessandro Lannocca <alessandro.lannocca@gmail.com>
Cc: Alessandro Lannocca <alessandro.lannocca@gmail.com>
Cc: Bruno Randolf <br1@thinktube.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: close AP_VLAN interfaces before unregistering all
Johannes Berg [Thu, 23 May 2013 23:06:09 +0000 (01:06 +0200)]
mac80211: close AP_VLAN interfaces before unregistering all

Since Eric's commit efe117ab8 ("Speedup ieee80211_remove_interfaces")
there's a bug in mac80211 when it unregisters with AP_VLAN interfaces
up. If the AP_VLAN interface was registered after the AP it belongs
to (which is the typical case) and then we get into this code path,
unregister_netdevice_many() will crash because it isn't prepared to
deal with interfaces being closed in the middle of it. Exactly this
happens though, because we iterate the list, find the AP master this
AP_VLAN belongs to and dev_close() the dependent VLANs. After this,
unregister_netdevice_many() won't pick up the fact that the AP_VLAN
is already down and will do it again, causing a crash.

Cc: stable@vger.kernel.org [2.6.33+]
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: assign AP_VLAN hw queues correctly
Johannes Berg [Thu, 23 May 2013 21:09:56 +0000 (23:09 +0200)]
mac80211: assign AP_VLAN hw queues correctly

A lot of code in mac80211 assumes that the hw queues are
set up correctly for all interfaces (except for monitor)
but this isn't true for AP_VLAN interfaces. Fix this by
copying the AP master configuration when an AP VLAN is
brought up, after this the AP interface can't change its
configuration any more and needs to be brought down to
change it, which also forces AP_VLAN interfaces down, so
just copying in open() is sufficient.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agoip_tunnel: fix kernel panic with icmp_dest_unreach
Eric Dumazet [Fri, 24 May 2013 05:49:58 +0000 (05:49 +0000)]
ip_tunnel: fix kernel panic with icmp_dest_unreach

Daniel Petre reported crashes in icmp_dst_unreach() with following call
graph:

#3 [ffff88003fc03938] __stack_chk_fail at ffffffff81037f77
#4 [ffff88003fc03948] icmp_send at ffffffff814d5fec
#5 [ffff88003fc03ae8] ipv4_link_failure at ffffffff814a1795
#6 [ffff88003fc03af8] ipgre_tunnel_xmit at ffffffff814e7965
#7 [ffff88003fc03b78] dev_hard_start_xmit at ffffffff8146e032
#8 [ffff88003fc03bc8] sch_direct_xmit at ffffffff81487d66
#9 [ffff88003fc03c08] __qdisc_run at ffffffff81487efd
#10 [ffff88003fc03c48] dev_queue_xmit at ffffffff8146e5a7
#11 [ffff88003fc03c88] ip_finish_output at ffffffff814ab596

Daniel found a similar problem mentioned in
 http://lkml.indiana.edu/hypermail/linux/kernel/1007.0/00961.html

And indeed this is the root cause : skb->cb[] contains data fooling IP
stack.

We must clear IPCB in ip_tunnel_xmit() sooner in case dst_link_failure()
is called. Or else skb->cb[] might contain garbage from GSO segmentation
layer.

A similar fix was tested on linux-3.9, but gre code was refactored in
linux-3.10. I'll send patches for stable kernels as well.

Many thanks to Daniel for providing reports, patches and testing !

Reported-by: Daniel Petre <daniel.petre@rcs-rds.ro>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoptp_pch: fix error handling in pch_probe()
Wei Yongjun [Wed, 22 May 2013 23:59:28 +0000 (23:59 +0000)]
ptp_pch: fix error handling in pch_probe()

Fix to release resources when ptp_clock_register() fail instead
of return error code directly.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoqlge: add missing free_netdev() on error in qlge_probe()
Wei Yongjun [Wed, 22 May 2013 23:09:50 +0000 (23:09 +0000)]
qlge: add missing free_netdev() on error in qlge_probe()

Add the missing free_netdev() before return from function
qlge_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoath9k_hw: improve performance for AR934x v1.3+
Felix Fietkau [Thu, 23 May 2013 10:20:56 +0000 (12:20 +0200)]
ath9k_hw: improve performance for AR934x v1.3+

AR934x v1.3 no longer needs the DCU backoff reduction workaround for
preventing rx overruns, but in turn needs the number of usable Tx
buffers to be reduced slightly.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: fix host interface reset on AR934x
Felix Fietkau [Thu, 23 May 2013 10:20:55 +0000 (12:20 +0200)]
ath9k_hw: fix host interface reset on AR934x

If a local bus timeout has been detected, the host interface needs to be
reset to clear the errors. AR934x uses a different synchronous interrupt
bit to indicate this, so the check needs to be fixed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: fix spur mitigation issues on AR934x
Felix Fietkau [Thu, 23 May 2013 10:20:54 +0000 (12:20 +0200)]
ath9k_hw: fix spur mitigation issues on AR934x

Do not subtract spur power from noise floor on this chip, as it can lead
to packet loss and other connectivity issues.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes
Linus Torvalds [Fri, 24 May 2013 15:58:53 +0000 (08:58 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes

Pull gfs2 fixes from Steven Whitehouse:
 "This time there are just four fixes.  There are a couple of minor
  updates to the quota code, a fix for KConfig to ensure that only valid
  combinations including GFS2 can be built, and a fix for a typo
  affecting end i/o processing when writing the journal.

  Also, there is a temporary fix for a performance regression relating
  to block reservations and directories.  A longer fix will be applied
  in due course, but this deals with the most immediate problem for now"

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
  GFS2: Fix typo in gfs2_log_end_write loop
  GFS2: fix DLM depends to fix build errors
  GFS2: Use single-block reservations for directories
  GFS2: two minor quota fixups

11 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Fri, 24 May 2013 15:57:38 +0000 (08:57 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
 "Some more P8 related bits, a bunch of fixes for our P7+/P8 HW crypto
  drivers, some added workarounds for those radeons that don't do proper
  64-bit MSIs and a couple of other trivialities by myself."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
  powerpc/powernv: Build a zImage.epapr
  powerpc: Make radeon 32-bit MSI quirk work on powernv
  powerpc: Context switch more PMU related SPRs
  powerpc/powernv: Fix condition for when to invalidate the TCE cache
  powerpc/pci: Fix bogus message at boot about empty memory resources
  powerpc: Fix TLB cleanup at boot on POWER8
  drivers/crypto/nx: Fixes for multiple races and issues

11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 24 May 2013 15:27:32 +0000 (08:27 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "It's been a while since my last pull request so quite a few fixes have
  piled up."

Indeed.

 1) Fix nf_{log,queue} compilation with PROC_FS disabled, from Pablo
    Neira Ayuso.

 2) Fix data corruption on some tg3 chips with TSO enabled, from Michael
    Chan.

 3) Fix double insertion of VLAN tags in be2net driver, from Sarveshwar
    Bandi.

 4) Don't have TCP's MD5 support pass > PAGE_SIZE page offsets in
    scatter-gather entries into the crypto layer, the crypto layer can't
    handle that.  From Eric Dumazet.

 5) Fix lockdep splat in 802.1Q MRP code, also from Eric Dumazet.

 6) Fix OOPS in netfilter log module when called from conntrack, from
    Hans Schillstrom.

 7) FEC driver needs to use netif_tx_{lock,unlock}_bh() rather than the
    non-BH disabling variants.  From Fabio Estevam.

 8) TCP GSO can generate out-of-order packets, fix from Eric Dumazet.

 9) vxlan driver doesn't update 'used' field of fdb entries when it
    should, from Sridhar Samudrala.

10) ipv6 should use kzalloc() to allocate inet6 socket cork options,
    otherwise we can OOPS in ip6_cork_release().  From Eric Dumazet.

11) Fix races in bonding set mode, from Nikolay Aleksandrov.

12) Fix checksum generation regression added by "r8169: fix 8168evl
    frame padding.", from Francois Romieu.

13) ip_gre can look at stale SKB data pointer, fix from Eric Dumazet.

14) Fix checksum handling when GSO is enabled in bnx2x driver with
    certain chips, from Yuval Mintz.

15) Fix double free in batman-adv, from Martin Hundebøll.

16) Fix device startup synchronization with firmware in tg3 driver, from
    Nithin Sujit.

17) perf networking dropmonitor doesn't work at all due to mixed up
    trace parameter ordering, from Ben Hutchings.

18) Fix proportional rate reduction handling in tcp_ack(), from Nandita
    Dukkipati.

19) IPSEC layer doesn't return an error when a valid state is detected,
    causing an OOPS.  Fix from Timo Teräs.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits)
  be2net: bug fix on returning an invalid nic descriptor
  tcp: xps: fix reordering issues
  net: Revert unused variable changes.
  xfrm: properly handle invalid states as an error
  virtio_net: enable napi for all possible queues during open
  tcp: bug fix in proportional rate reduction.
  net: ethernet: sun: drop unused variable
  net: ethernet: korina: drop unused variable
  net: ethernet: apple: drop unused variable
  qmi_wwan: Added support for Cinterion's PLxx WWAN Interface
  perf: net_dropmonitor: Remove progress indicator
  perf: net_dropmonitor: Use bisection in symbol lookup
  perf: net_dropmonitor: Do not assume ordering of dictionaries
  perf: net_dropmonitor: Fix symbol-relative addresses
  perf: net_dropmonitor: Fix trace parameter order
  net: fec: use a more proper compatible string for MVF type device
  qlcnic: Fix updating netdev->features
  qlcnic: remove netdev->trans_start updates within the driver
  qlcnic: Return proper error codes from probe failure paths
  tg3: Update version to 3.132
  ...

11 years agoGFS2: Fix typo in gfs2_log_end_write loop
Steven Whitehouse [Tue, 21 May 2013 11:49:07 +0000 (12:49 +0100)]
GFS2: Fix typo in gfs2_log_end_write loop

There was a missing _all in this loop iterator

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agoGFS2: fix DLM depends to fix build errors
Randy Dunlap [Tue, 14 May 2013 17:02:48 +0000 (10:02 -0700)]
GFS2: fix DLM depends to fix build errors

Fix build errors by correcting DLM dependencies in GFS2.
Build errors happen when CONFIG_GFS2_FS_LOCKING_DLM=y and CONFIG_DLM=m:

fs/built-in.o: In function `gfs2_lock':
file.c:(.text+0xc7abd): undefined reference to `dlm_posix_get'
file.c:(.text+0xc7ad0): undefined reference to `dlm_posix_unlock'
file.c:(.text+0xc7ad9): undefined reference to `dlm_posix_lock'
fs/built-in.o: In function `gdlm_unmount':
lock_dlm.c:(.text+0xd6e5b): undefined reference to `dlm_release_lockspace'
fs/built-in.o: In function `sync_unlock':
lock_dlm.c:(.text+0xd6e9e): undefined reference to `dlm_unlock'
fs/built-in.o: In function `sync_lock':
lock_dlm.c:(.text+0xd6fb6): undefined reference to `dlm_lock'
fs/built-in.o: In function `gdlm_put_lock':
lock_dlm.c:(.text+0xd7238): undefined reference to `dlm_unlock'
fs/built-in.o: In function `gdlm_mount':
lock_dlm.c:(.text+0xd753e): undefined reference to `dlm_new_lockspace'
lock_dlm.c:(.text+0xd79d3): undefined reference to `dlm_release_lockspace'
fs/built-in.o: In function `gdlm_lock':
lock_dlm.c:(.text+0xd8179): undefined reference to `dlm_lock'
fs/built-in.o: In function `gdlm_cancel':
lock_dlm.c:(.text+0xd6b22): undefined reference to `dlm_unlock'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agoGFS2: Use single-block reservations for directories
Bob Peterson [Tue, 14 May 2013 17:04:29 +0000 (13:04 -0400)]
GFS2: Use single-block reservations for directories

This patch changes the multi-block allocation code, such that
directory inodes only get a single block reserved in the bitmap.
That way, the bitmaps are more tightly packed together, and there
are fewer spans of free blocks for in-use block reservations.
This means it takes less time to find a free span of blocks in the
bitmap, which speeds things up. This increases the performance of
some workloads by almost 2X. In Nate's mockup.py script (which does
(1) create dir, (2) create dir in dir, (3) create file in that dir)
the test executes in 23 steps rather than 43 steps, a 47%
performance improvement.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agoGFS2: two minor quota fixups
Bob Peterson [Fri, 10 May 2013 15:59:18 +0000 (11:59 -0400)]
GFS2: two minor quota fixups

This patch fixes two regression problems that Abhi found in the
GFS2 quota code.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
11 years agopowerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support
Brian King [Wed, 22 May 2013 11:07:46 +0000 (11:07 +0000)]
powerpc/pseries: Make 32-bit MSI quirk work on systems lacking firmware support

Recent commit e61133dda480062d221f09e4fc18f66763f8ecd0 added support
for a new firmware feature to force an adapter to use 32 bit MSIs.
However, this firmware is not available for all systems. The hack below
allows devices needing 32 bit MSIs to work on these systems as well.
It is careful to only enable this on Gen2 slots, which should limit
this to configurations where this hack is needed and tested to work.

[Small change to factor out the hack into a separate function -- BenH]

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/powernv: Build a zImage.epapr
Benjamin Herrenschmidt [Tue, 21 May 2013 23:00:22 +0000 (23:00 +0000)]
powerpc/powernv: Build a zImage.epapr

The zImage.epapr wrapper allows to use zImages when booting via a flat
device-tree which can be used on powernv.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Make radeon 32-bit MSI quirk work on powernv
Benjamin Herrenschmidt [Tue, 21 May 2013 22:58:21 +0000 (22:58 +0000)]
powerpc: Make radeon 32-bit MSI quirk work on powernv

This moves the quirk itself to pci_64.c as to get built on all ppc64
platforms (the only ones with a pci_dn), factors the two implementations
of get_pdn() into a single pci_get_dn() and use the quirk to do 32-bit
MSIs on IODA based powernv platforms.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Context switch more PMU related SPRs
Michael Ellerman [Tue, 21 May 2013 16:31:12 +0000 (16:31 +0000)]
powerpc: Context switch more PMU related SPRs

In commit 9353374 "Context switch the new EBB SPRs" we added support for
context switching some new EBB SPRs. However despite four of us signing
off on that patch we missed some. To be fair these are not actually new
SPRs, but they are now potentially user accessible so need to be context
switched.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/powernv: Fix condition for when to invalidate the TCE cache
Benjamin Herrenschmidt [Mon, 20 May 2013 17:25:15 +0000 (17:25 +0000)]
powerpc/powernv: Fix condition for when to invalidate the TCE cache

We use two flags, one to indicate an invalidation is needed after
creating a new entry and one to indicate an invalidation is needed
after removing an entry. However we were testing the wrong flag
in the remove case.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pci: Fix bogus message at boot about empty memory resources
Benjamin Herrenschmidt [Mon, 20 May 2013 17:24:39 +0000 (17:24 +0000)]
powerpc/pci: Fix bogus message at boot about empty memory resources

The message is only meant to be displayed if resource 0 is empty,
but was displayed if any is.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Fix TLB cleanup at boot on POWER8
Benjamin Herrenschmidt [Mon, 20 May 2013 17:23:22 +0000 (17:23 +0000)]
powerpc: Fix TLB cleanup at boot on POWER8

The TLB has 512 congruence classes (2048 entries 4 way set associative)
while P7 had 128

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agodrivers/crypto/nx: Fixes for multiple races and issues
Kent Yoder [Fri, 12 Apr 2013 17:13:59 +0000 (17:13 +0000)]
drivers/crypto/nx: Fixes for multiple races and issues

Fixes a race on driver init with registering algorithms where the
driver status flag wasn't being set before self testing started.

  Added the cra_alignmask field for CBC and ECB modes.

  Fixed a bug in GCM where AES block size was being used instead of
authsize.

  Removed use of blkcipher_walk routines for scatterlist processing.
Corner cases in the code prevent us from processing an entire
scatterlist at a time and walking the buffers in block sized chunks
turns out to be unecessary anyway.

  Fixed off-by-one error in saving off extra data in the sha code.

  Fixed accounting error for number of bytes processed in the sha code.

Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agobe2net: bug fix on returning an invalid nic descriptor
Wei Yang [Wed, 22 May 2013 15:58:22 +0000 (15:58 +0000)]
be2net: bug fix on returning an invalid nic descriptor

In function be_get_nic_desc(), it will go through the descriptor array
returned from f/w. By comparing the desc_type field, it determines whether
there is a nic descriptor in the array or not. In the case of no nic
descriptor, this function should return NULL.

The code may return an invalide descriptor, when there is no nic descriptor
in the array and the desc_count is less than MAX_RESOURCE_DESC. In this case,
even there is no nic descriptor, it will still return the lase descriptor
since the i doesn't equal to MAX_RESOURCE_DESC.

This patch fix this issue by returning the descriptor when find it and return
NULL for other cases.

Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
Reviewed-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Reviewed-by: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Acked-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: xps: fix reordering issues
Eric Dumazet [Thu, 23 May 2013 07:44:20 +0000 (07:44 +0000)]
tcp: xps: fix reordering issues

commit 3853b5841c01a ("xps: Improvements in TX queue selection")
introduced ooo_okay flag, but the condition to set it is slightly wrong.

In our traces, we have seen ACK packets being received out of order,
and RST packets sent in response.

We should test if we have any packets still in host queue.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'gpio-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linus...
Linus Torvalds [Fri, 24 May 2013 01:24:10 +0000 (18:24 -0700)]
Merge tag 'gpio-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 - An OMAP fix that makes ethernet work again.
 - Fix for build problem when building the MCP23S08 driver as module.
 - IRQ conflicts in the Langwell driver.
 - Fix IRQ coherency issues in the MXS driver.
 - Return correct errorcode on errorpath when removing GPIO chips.

* tag 'gpio-fixes-v3.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: Don't override the error code in probe error handling
  gpio: mxs: Use set and clear capabilities of the gpio controller
  gpio-langwell: fix irq conflicts when DT is not used
  gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
  gpio/omap: ensure gpio context is initialised

11 years agoMerge tag 'pci-v3.10-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Thu, 23 May 2013 20:50:53 +0000 (13:50 -0700)]
Merge tag 'pci-v3.10-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI updates from Bjorn Helgaas:
 "Here are some more fixes for v3.10.  The Moorestown update broke Intel
  Medfield devices, so I reverted it.  The acpiphp change fixes a
  regression: we broke hotplug notifications to host bridges when we
  split acpiphp into the host-bridge related part and the
  endpoint-related part.

  Moorestown
      Revert "x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0"
  Hotplug
      PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check"

* tag 'pci-v3.10-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  Revert "x86/pci/mrst: Use configuration mechanism 1 for 00:00.0, 00:02.0, 00:03.0"
  PCI: acpiphp: Re-enumerate devices when host bridge receives Bus Check

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 23 May 2013 20:50:03 +0000 (13:50 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
 "A few fixups to Wacom and eGalax touchscreen driver"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - add an eraser to DTH2242/DTK2241
  Input: wacom - add a few new styli for Cintiq series
  Input: wacom - add three new display tablets
  Input: egalax_ts - ABS_MT_POSITION_Y not reported well

11 years agocfg80211: fix reporting 64-bit station info tx bytes
Felix Fietkau [Thu, 23 May 2013 13:05:59 +0000 (15:05 +0200)]
cfg80211: fix reporting 64-bit station info tx bytes

Copy & paste mistake - STATION_INFO_TX_BYTES64 is the name of the flag,
not NL80211_STA_INFO_TX_BYTES64.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonet: Revert unused variable changes.
David S. Miller [Thu, 23 May 2013 19:15:32 +0000 (12:15 -0700)]
net: Revert unused variable changes.

This reverts commits:

c573972c111eb4c6b3f3250ad71e7c75cc799833
1a5904342c7380ceddd61c0b37544d752d0b1433
da2e2c214953f37c2a6be20226537ca5a329724c

They were meant for net-next not net.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomac80211: fix queue handling crash
Johannes Berg [Thu, 23 May 2013 19:04:38 +0000 (21:04 +0200)]
mac80211: fix queue handling crash

The code I added in "mac80211: don't start new netdev queues
if driver stopped" crashes for monitor and AP VLAN interfaces
because while they have a netdev, they don't have queues set
up by the driver.

To fix the crash, exclude these from queue accounting here
and just start their netdev queues unconditionally.

For monitor, this is the best we can do, as we can redirect
frames there to any other interface and don't know which one
that will since it can be different for each frame.

For AP VLAN interfaces, we can do better later and actually
properly track the queue status. Not doing this is really a
separate bug though.

Reported-by: Ilan Peer <ilan.peer@intel.com>
Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge tag 'tty-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Thu, 23 May 2013 16:28:34 +0000 (09:28 -0700)]
Merge tag 'tty-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg Kroah-Hartman:
 "Here are some tty / serial driver fixes for 3.10-rc2.

  Nothing huge, although the rocket driver fix looks large, it's just
  moving the code around to fix the reported build issues in it.  Other
  than that, this has the fix for the of-reported lockdep warning from
  the vt layer, as well as some other needed bugfixes.

  All of these have been in linux-next for a while"

* tag 'tty-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: mxser: Fix build warning introduced by dfc7b837c7f9 (Re: linux-next: build warning after merge of the tty.current tree)
  tty: mxser: fix usage of opmode_ioaddr
  serial: 8250_dw: add ACPI ID for Intel BayTrail
  TTY: Fix tty miss restart after we turn off flow-control
  tty/vt: Fix vc_deallocate() lock order
  TTY: ehv_bytechan: add missing platform_driver_unregister() when module exit
  TTY: rocket, fix more no-PCI warnings
  serial: mcf: missing uart_unregister_driver() on error in mcf_init()
  tty: serial: mpc5xxx: fix error handing in mpc52xx_uart_init()
  serial: samsung: add missing platform_driver_unregister() when module exit
  serial: pl011: protect attribute read from NULL platform data struct
  tty: nwpserial: Pass correct pointer to free_irq()
  serial: 8250_dw: Add valid clk pointer check

11 years agoMerge tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Thu, 23 May 2013 16:27:49 +0000 (09:27 -0700)]
Merge tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg Kroah-Hartman:
 "Here are some staging tree driver fixes for 3.10-rc2

  The drivers/iio/ changes are here as they are still tied into
  drivers/staging/iio/.

  Nothing major, just a number of small bugfixes, and a larger
  documentation update for the ramster code."

* tag 'staging-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (28 commits)
  staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFS
  iio: exynos_adc: fix wrong structure extration in suspend and resume
  iio:common:st: added disable function after read info raw data
  iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
  staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe()
  staging/iio/mxs-lradc: fix preenable for multiple buffers
  staging: imx-drm: imx-tve: Check the return value of 'regulator_enable()'
  staging: video: imx: Select VIDEOMODE_HELPERS for parallel display
  staging: ramster: add how-to document
  staging: dwc2: Fix dma-enabled platform devices using a default dma_mask
  staging: vt6656: [bug] Fix missing spin lock in iwctl_siwpower.
  staging: Swap zram and zsmalloc in Kconfig
  staging: android: logger: use kuid_t instead of uid_t
  staging: zcache: Fix incorrect module_param_array types
  staging/solo6x10: depend on CONFIG_FONTS
  staging/drm: imx: add missing dependencies
  staging: ste_rmi4: Suppress 'ignoring return value of ‘regulator_enable()' warning
  staging: sep: fix driver build and kconfig
  staging: nvec: cleanup childs on remove
  staging: nvec: implement unregistering of notifiers
  ...

11 years agoMerge tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 23 May 2013 16:27:08 +0000 (09:27 -0700)]
Merge tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg Kroah-Hartman:
 "Here are 3 tiny driver core fixes for 3.10-rc2.

  A needed symbol export, a change to make it easier to track down
  offending sysfs files with incorrect attributes, and a klist bugfix.

  All have been in linux-next for a while"

* tag 'driver-core-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  klist: del waiter from klist_remove_waiters before wakeup waitting process
  driver core: print sysfs attribute name when warning about bogus permissions
  driver core: export subsys_virtual_register

11 years agoMerge tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
Linus Torvalds [Thu, 23 May 2013 16:26:32 +0000 (09:26 -0700)]
Merge tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg Kroah-Hartman:
 "Here are some small char/misc driver fixes for 3.10-rc2.

  Nothing major here, just a number of fixes for things that people have
  reported, and a MAINTAINERS update for the recent changes for the
  hyperv files that went into 3.10-rc1."

* tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port
  uio: UIO_DMEM_GENIRQ should depend on HAS_DMA
  MAINTAINERS: update Hyper-V file list
  mei: bus: Reset event_cb when disabling a device
  Drivers: hv: Fix a bug in get_vp_index()
  mei: fix out of array access to me clients array
  Char: lp, protect LPGETSTATUS with port_mutex
  dummy-irq: require the user to specify an IRQ number

11 years agoMerge tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Thu, 23 May 2013 16:23:32 +0000 (09:23 -0700)]
Merge tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg Kroah-Hartman:
 "Here are a number of tiny USB bugfixes / new device ids for 3.10-rc2

  The majority of these are USB gadget fixes, but they are all small.
  Other than that, some USB host controller fixes, and USB serial driver
  fixes for problems reported with them.

  Also hopefully a fixed up USB_OTG Kconfig dependancy, that one seems
  to be almost impossible to get right for all of the different
  platforms these days."

* tag 'usb-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (56 commits)
  USB: cxacru: potential underflow in cxacru_cm_get_array()
  USB: ftdi_sio: Add support for Newport CONEX motor drivers
  USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card
  usb: ohci: fix goto wrong tag in err case
  usb: isp1760-if: fix memleak when platform_get_resource fail
  usb: ehci-s5p: fix memleak when fallback to pdata
  USB: serial: clean up chars_in_buffer
  USB: ti_usb_3410_5052: fix chars_in_buffer overhead
  USB: io_ti: fix chars_in_buffer overhead
  USB: ftdi_sio: fix chars_in_buffer overhead
  USB: ftdi_sio: clean up get_modem_status
  USB: serial: add generic wait_until_sent implementation
  USB: serial: add wait_until_sent operation
  USB: set device dma_mask without reference to global data
  USB: Blacklisted Cinterion's PLxx WWAN Interface
  usb: option: Add Telewell TW-LTE 4G
  USB: EHCI: remove bogus #error
  USB: reset resume quirk needed by a hub
  USB: usb-stor: realtek_cr: Fix compile error
  usb, chipidea: fix link error when USB_EHCI_HCD is a module
  ...

11 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Thu, 23 May 2013 16:18:08 +0000 (09:18 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm bugfixes from Gleb Natapov.

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM/MIPS32: Wrap calls to gfn_to_pfn() with srcu_read_lock/unlock()
  KVM/MIPS32: Move include/asm/kvm.h => include/uapi/asm/kvm.h since it is a user visible API.
  KVM: take over co-maintainership from Marcelo, fix MAINTAINERS entry

11 years agolib: make iovec obj instead of lib
Randy Dunlap [Thu, 23 May 2013 05:46:09 +0000 (22:46 -0700)]
lib: make iovec obj instead of lib

Fix build error io vmw_vmci.ko when CONFIG_VMWARE_VMCI=m by chaning
iovec.o from lib-y to obj-y.

  ERROR: "memcpy_toiovec" [drivers/misc/vmw_vmci/vmw_vmci.ko] undefined!
  ERROR: "memcpy_fromiovec" [drivers/misc/vmw_vmci/vmw_vmci.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agocfg80211: check wdev->netdev in connection work
Johannes Berg [Thu, 23 May 2013 16:10:21 +0000 (18:10 +0200)]
cfg80211: check wdev->netdev in connection work

If a P2P-Device is present and another virtual interface triggers
the connection work, the system crash because it tries to check
if the P2P-Device's netdev (which doesn't exist) is up. Skip any
wdevs that have no netdev to fix this.

Cc: stable@vger.kernel.org
Reported-by: YanBo <dreamfly281@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoInput: wacom - add an eraser to DTH2242/DTK2241
Ping Cheng [Wed, 15 May 2013 06:34:53 +0000 (23:34 -0700)]
Input: wacom - add an eraser to DTH2242/DTK2241

plus send begin and end of express keys events for
Cintiq 13HD and DTH2242/DTK2241

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
11 years agonetfilter: ipt_ULOG: fix non-null terminated string in the nf_log path
Chen Gang [Thu, 23 May 2013 01:50:46 +0000 (01:50 +0000)]
netfilter: ipt_ULOG: fix non-null terminated string in the nf_log path

If nf_log uses ipt_ULOG as logging output, we can deliver non-null
terminated strings to user-space since the maximum length of the
prefix that is passed by nf_log is NF_LOG_PREFIXLEN but pm->prefix
is 32 bytes long (ULOG_PREFIX_LEN).

This is actually happening already from nf_conntrack_tcp if ipt_ULOG
is used, since it is passing strings longer than 32 bytes.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agonetfilter: add nf_ipv6_ops hook to fix xt_addrtype with IPv6
Florian Westphal [Fri, 17 May 2013 03:56:10 +0000 (03:56 +0000)]
netfilter: add nf_ipv6_ops hook to fix xt_addrtype with IPv6

Quoting https://bugzilla.netfilter.org/show_bug.cgi?id=812:

[ ip6tables -m addrtype ]
When I tried to use in the nat/PREROUTING it messes up the
routing cache even if the rule didn't matched at all.
[..]
If I remove the --limit-iface-in from the non-working scenario, so just
use the -m addrtype --dst-type LOCAL it works!

This happens when LOCAL type matching is requested with --limit-iface-in,
and the default ipv6 route is via the interface the packet we test
arrived on.

Because xt_addrtype uses ip6_route_output, the ipv6 routing implementation
creates an unwanted cached entry, and the packet won't make it to the
real/expected destination.

Silently ignoring --limit-iface-in makes the routing work but it breaks
rule matching (--dst-type LOCAL with limit-iface-in is supposed to only
match if the dst address is configured on the incoming interface;
without --limit-iface-in it will match if the address is reachable
via lo).

The test should call ipv6_chk_addr() instead.  However, this would add
a link-time dependency on ipv6.

There are two possible solutions:

1) Revert the commit that moved ipt_addrtype to xt_addrtype,
   and put ipv6 specific code into ip6t_addrtype.
2) add new "nf_ipv6_ops" struct to register pointers to ipv6 functions.

While the former might seem preferable, Pablo pointed out that there
are more xt modules with link-time dependeny issues regarding ipv6,
so lets go for 2).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
11 years agoxfrm: properly handle invalid states as an error
Timo Teräs [Wed, 22 May 2013 01:40:47 +0000 (01:40 +0000)]
xfrm: properly handle invalid states as an error

The error exit path needs err explicitly set. Otherwise it
returns success and the only caller, xfrm_output_resume(),
would oops in skb_dst(skb)->ops derefence as skb_dst(skb) is
NULL.

Bug introduced in commit bb65a9cb (xfrm: removes a superfluous
check and add a statistic).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Cc: Li RongQing <roy.qing.li@gmail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovirtio_net: enable napi for all possible queues during open
Jason Wang [Tue, 21 May 2013 20:03:58 +0000 (20:03 +0000)]
virtio_net: enable napi for all possible queues during open

Commit 55257d72bd1c51f25106350f4983ec19f62ed1fa (virtio-net: fill only rx
queues which are being used) only does the napi enabling during open for
curr_queue_pairs. This will break multiqueue receiving since napi of new queues
were still disabled after changing the number of queues.

This patch fixes this by enabling napi for all possible queues during open.

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotcp: bug fix in proportional rate reduction.
Nandita Dukkipati [Tue, 21 May 2013 15:12:07 +0000 (15:12 +0000)]
tcp: bug fix in proportional rate reduction.

This patch is a fix for a bug triggering newly_acked_sacked < 0
in tcp_ack(.).

The bug is triggered by sacked_out decreasing relative to prior_sacked,
but packets_out remaining the same as pior_packets. This is because the
snapshot of prior_packets is taken after tcp_sacktag_write_queue() while
prior_sacked is captured before tcp_sacktag_write_queue(). The problem
is: tcp_sacktag_write_queue (tcp_match_skb_to_sack() -> tcp_fragment)
adjusts the pcount for packets_out and sacked_out (MSS change or other
reason). As a result, this delta in pcount is reflected in
(prior_sacked - sacked_out) but not in (prior_packets - packets_out).

This patch does the following:
1) initializes prior_packets at the start of tcp_ack() so as to
capture the delta in packets_out created by tcp_fragment.
2) introduces a new "previous_packets_out" variable that snapshots
packets_out right before tcp_clean_rtx_queue, so pkts_acked can be
correctly computed as before.
3) Computes pkts_acked using previous_packets_out, and computes
newly_acked_sacked using prior_packets.

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Thu, 23 May 2013 07:08:36 +0000 (00:08 -0700)]
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge

Included change:
- fix double free in case of failure during mesh initialisation

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: sun: drop unused variable
Emilio López [Wed, 22 May 2013 13:57:37 +0000 (13:57 +0000)]
net: ethernet: sun: drop unused variable

Commit bfd428d ("net: ethernet: sun: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: korina: drop unused variable
Emilio López [Wed, 22 May 2013 13:57:36 +0000 (13:57 +0000)]
net: ethernet: korina: drop unused variable

Commit e998fd4 ("net: ethernet: korina: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: apple: drop unused variable
Emilio López [Wed, 22 May 2013 13:57:35 +0000 (13:57 +0000)]
net: ethernet: apple: drop unused variable

Commit 3b0aaef ("net: ethernet: apple: initialize variables directly")
dropped the only loop that was using i but did not remove the actual
variable, therefore causing a warning when building. This patch drops
the now redundant line.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt...
Linus Torvalds [Thu, 23 May 2013 01:06:57 +0000 (18:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32

Pull AVR32 update from Hans-Christian Egtvedt:
 "wow, it has gone 10 releases since my last request :("

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
  avr32: fix building warnings caused by redefinitions of HZ
  avr32: fix relocation check for signed 18-bit offset
  avr32: move NODES_SHIFT into Kconfig and delete numnodes.h

11 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Thu, 23 May 2013 01:05:45 +0000 (18:05 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS update from Ralf Baechle:
 - Fix a build error if <linux/printk.h> is included without
   <linux/linkage.h> having been included before.
 - Cleanup and fix the damage done by the generic idle loop patch.
 - A kprobes fix that brings the MIPS code in line with what other
   architectures are for quite a while already.
 - Wire up the native getdents64(2) syscall for 64 bit - for some reason
   it was only for the compat ABIs.  This has been reported to cause an
   application issue.  This turned out bigger than I meant but the wait
   instruction support code was driving me nuts.

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: N64: Wire getdents64(2)
  kprobes/mips: Fix to check double free of insn slot
  MIPS: Idle: Break r4k_wait into two functions and fix it.
  MIPS: Idle: Do address fiddlery in helper functions.
  MIPS: Idle: Consolidate all declarations in <asm/idle.h>.
  MIPS: Idle: Don't call local_irq_disable() in cpu_wait() implementations.
  MIPS: Idle: Re-enable irqs at the end of r3081, au1k and loongson2 cpu_wait.
  MIPS: Idle: Make call of function pointer readable.
  MIPS: Idle: Consistently reformat inline assembler.
  MIPS: Idle: cleaup SMTC idle hook as per Linux coding style.
  MIPS: Consolidate idle loop / WAIT instruction support in a single file.
  MIPS: clock.h: Remove declaration of cpu_wait.
  Add include dependencies to <linux/printk.h>.
  MIPS: Rewrite pfn_valid to work in modules, too.

11 years agostaging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFS
Paul Zimmerman [Wed, 22 May 2013 22:10:15 +0000 (15:10 -0700)]
staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFS

Remove the compile-time warning for this config option, and instead
warn that it is experimental in the Kconfig text

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoqmi_wwan: Added support for Cinterion's PLxx WWAN Interface
Hans-Christoph Schemmel [Tue, 21 May 2013 02:07:17 +0000 (02:07 +0000)]
qmi_wwan: Added support for Cinterion's PLxx WWAN Interface

Added support for Cinterion's PLxx WWAN Interface by adding QMI_FIXED_INTF with
Cinterion's Vendor ID as well as Product ID and WWAN Interface Number.

Signed-off-by: Hans-Christoph Schemmel <hans-christoph.schemmel@gemalto.com>
Signed-off-by: Christian Schmiedl <christian.schmiedl@gemalto.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'iio-fixes-for-3.10a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Wed, 22 May 2013 22:11:31 +0000 (15:11 -0700)]
Merge tag 'iio-fixes-for-3.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First round of IIO fixes for the 3.10 cycle.

The usual mixed bag of little fixes.

1) A fix for mxs-lradc having missed out on some global abi changes that and
   hence being unable to start up buffered output.
2) Clean up error handling in tsl2x7x
3) A build fix for some of the dac drivers when they have spi master support
   built in, but i2c support build as a module.
4) Add a missing disable after a oneshot capture to the st sensor core.
5) Exynos adc driver took a novel an incorrect route to get at its private
   data store.

11 years agoMerge branch 'perf_net_dropmonitor'
David S. Miller [Wed, 22 May 2013 22:10:25 +0000 (15:10 -0700)]
Merge branch 'perf_net_dropmonitor'

Ben Hutchings says:

====================
Somewhat surprisingly, the net_dropmonitor reporting script doesn't work
at all.  This series fixes it and then makes it slightly more efficient.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
11 years agoperf: net_dropmonitor: Remove progress indicator
Ben Hutchings [Mon, 20 May 2013 14:45:57 +0000 (14:45 +0000)]
perf: net_dropmonitor: Remove progress indicator

We can read /proc/kallsyms in a fraction of a second, so why waste
a further fraction of a second showing progress?

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoperf: net_dropmonitor: Use bisection in symbol lookup
Ben Hutchings [Mon, 20 May 2013 14:45:42 +0000 (14:45 +0000)]
perf: net_dropmonitor: Use bisection in symbol lookup

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoperf: net_dropmonitor: Do not assume ordering of dictionaries
Ben Hutchings [Mon, 20 May 2013 14:45:34 +0000 (14:45 +0000)]
perf: net_dropmonitor: Do not assume ordering of dictionaries

The sort order of dictionaries in Python is undocumented.  Use
tuples instead, which are documented to be lexically ordered.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoperf: net_dropmonitor: Fix symbol-relative addresses
Ben Hutchings [Mon, 20 May 2013 14:45:26 +0000 (14:45 +0000)]
perf: net_dropmonitor: Fix symbol-relative addresses

The comparison between traced and symbol addresses is backwards: if
the traced address doesn't exactly match a symbol (which we don't
expect it to), we'll show the next symbol and the offset to it,
whereas we should show the previous symbol and the offset from it.

Cc: stable@vger.kernel.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoperf: net_dropmonitor: Fix trace parameter order
Ben Hutchings [Mon, 20 May 2013 14:44:43 +0000 (14:44 +0000)]
perf: net_dropmonitor: Fix trace parameter order

This works much better if we don't treat protocol numbers as addresses.

Cc: stable@vger.kernel.org
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: use a more proper compatible string for MVF type device
Shawn Guo [Sun, 19 May 2013 04:38:46 +0000 (04:38 +0000)]
net: fec: use a more proper compatible string for MVF type device

MVF is a family while MVF600 is a particular SoC in the family.  We
generally prefer to use SoC rather than family name in compatible string
to define a particular type of fec device.  And this is how fec_dt_ids
works for all those IMX fec variants.  Let's change mvf to mvf600 to
have it work in the same way.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Fix updating netdev->features
Shahed Shaikh [Tue, 21 May 2013 09:27:01 +0000 (09:27 +0000)]
qlcnic: Fix updating netdev->features

o After change in EPORT features of 82xx adapter, netdev->features needs to
  be updated to reflect EPORT feature updates but driver was manipulating
  netdev->features at wrong place.
o This patch uses netdev_update_features() and .ndo_fix_features() to
  update netdev->features properly.

Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: remove netdev->trans_start updates within the driver
Sony Chacko [Tue, 21 May 2013 09:27:00 +0000 (09:27 +0000)]
qlcnic: remove netdev->trans_start updates within the driver

Code is removed because netdev->trans_start updates made by the driver
will be ignored by the kernel.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqlcnic: Return proper error codes from probe failure paths
Sony Chacko [Tue, 21 May 2013 09:26:59 +0000 (09:26 +0000)]
qlcnic: Return proper error codes from probe failure paths

Fix error paths in probe to assign proper error codes to probe return value.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotg3: Update version to 3.132
Nithin Sujir [Tue, 21 May 2013 12:57:33 +0000 (12:57 +0000)]
tg3: Update version to 3.132

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agotg3: Ensure boot code has completed initialization before accessing hardware
Nithin Sujir [Tue, 21 May 2013 12:57:32 +0000 (12:57 +0000)]
tg3: Ensure boot code has completed initialization before accessing hardware

After resetting the device, the driver waits for a signature to be
updated to know that firmware has completed initialization. However, the
call to tg3_poll_fw() is being done too late and we're writing to the
GRC_MODE register before it has completely initialized, causing
contention with firmware.  This logic has existed since day one but is
causing PCIE link to go down randomly at startup on one platform once
every few hundred reboots.

Move the tg3_poll_fw() up to before we write to the GRC_MODE register
after reset.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoiio: exynos_adc: fix wrong structure extration in suspend and resume
Naveen Krishna Chatradhi [Mon, 20 May 2013 06:34:00 +0000 (07:34 +0100)]
iio: exynos_adc: fix wrong structure extration in suspend and resume

The exynos_adc device structure was wrongly extracted from the dev*
correcting the same.

Using the regular conversion of
struct device* -> struct platform_device* -> struct exynos_adc* seems wrong.
Instead we should be doing
struct device* -> struct iio_dev* -> struct exynos_adc*

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:common:st: added disable function after read info raw data
Denis CIOCCA [Thu, 9 May 2013 13:35:00 +0000 (14:35 +0100)]
iio:common:st: added disable function after read info raw data

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
Axel Lin [Thu, 9 May 2013 07:49:00 +0000 (08:49 +0100)]
iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m:

drivers/built-in.o: In function `ad5064_i2c_write':
drivers/iio/dac/ad5064.c:608: undefined reference to `i2c_master_send'
drivers/built-in.o: In function `ad5064_i2c_register_driver':
drivers/iio/dac/ad5064.c:646: undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `ad5064_i2c_unregister_driver':
drivers/iio/dac/ad5064.c:651: undefined reference to `i2c_del_driver'
make: *** [vmlinux] Error 1

When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support.
Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m.

The real fix though is to break the driver apart into a SPI part, an I2C part
and a common part. But that's something for 3.11 while this is something for
3.10/stable.

Reported-by: Wu Fengguang <fengguang.wu@intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>