Commit Graph

588735 Commits

Author SHA1 Message Date
Christoph Hellwig e6e202edf0 target: initialize the nacl base CIT begfore init_nodeacl
The iSCSI targets wants to add a default group, for which we need to
have the list of default groups initialized previously.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2016-03-30 20:06:43 -07:00
Christoph Hellwig ce7043fd90 target: remove ->fabric_cleanup_nodeacl
Instead we can clean up the list of default ACLs in core code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2016-03-30 20:06:43 -07:00
Sagi Grimberg 572a143489 iser-target: Use ib_drain_qp
Now the rdma core offers a QP draining service in v4.6-rc1,
use it instead of our own.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2016-03-30 20:05:15 -07:00
Linus Torvalds 1e6d88ccf4 nios2 fix for v4.6-rc2
nios2: Replace fdt_translate_address with of_flat_dt_translate_address
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW/G9AAAoJEFWoEK+e3syCo5wP/Ag9hf4ZUMV0y5DmyCDPCufe
 UNx0yZ4EVIftsfN40deV3nrXt5xGgKqM/5/DygnySizD9CcsePSLg3Led6votJly
 0eH6ALzFivBjRq3rhpyrDZAamBNnfIDUsGwvH9TqKm/FPDF2QQNG8yF3x+TqIbks
 f8VEqwJzos6tWV8lEQeqOexJ49xm0E+F261jb2pOUhArD/gbookJUc4KDCgU4Va5
 wjZWyBrsKwdoVp0C+CiyLABLM1Yjz4MonAxj2rEn+8G2WvFGpeThtTUEArf8iVfm
 Xn6mh/pKTi23mDhMQokiAdunzqqJtqNya5XlEdexAhxVTybcJQIH+DMNOOw8/K+W
 IK3qkG/eHALM6axq0JKNuKoVlERX4oxA0immf7fV6zH39XA3YzIais8u6JoaYhHA
 R/VRxKwJTTgUfossVpGZW3PU2Ae85CV0ZJMoOUbUaqn/wvi2e3k2McibHFyacBtK
 b3tiPIUm5WOiMx3LDwQvxDX2Dc+mXyKX9MdbGbiTnm+ldkej1bPHrjxir9/1PjwH
 EW1nGy3Dt+11j6emSGuxTtGWuuCiEGG7/vA6zq31k9k4IbsEpv/whr2p3Ap2VQ2G
 y4wwXO1ucC1xt9AQa5CDo9fUBHLGKE8maoFB91haMA9T9ICo+xvVvetFNgwfO124
 cF4Hlhb6ka5P7Vv5Tgvr
 =jRKM
 -----END PGP SIGNATURE-----

Merge tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2

Pull nios2 fix from Ley Foon Tan:
 "Replace fdt_translate_address with of_flat_dt_translate_address"

Fixes a build failure.

* tag 'nios2-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: Replace fdt_translate_address with of_flat_dt_translate_address
2016-03-30 20:40:42 -05:00
Guenter Roeck 8fe889274c nios2: Replace fdt_translate_address with of_flat_dt_translate_address
nios2 builds fail with the following build error.

arch/nios2/kernel/prom.c: In function 'early_init_dt_scan_serial':
arch/nios2/kernel/prom.c💯2: error:
	implicit declaration of function 'fdt_translate_address'

Commit c90fe9c039 ("of: earlycon: Move address translation to
of_setup_earlycon()") replaced fdt_translate_address() with
of_flat_dt_translate_address() but missed updating the nios2 code.

Fixes: c90fe9c039 ("of: earlycon: Move address translation to of_setup_earlycon()")
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Ley Foon Tan <lftan@altera.com>
2016-03-31 08:15:45 +08:00
Daniel Borkmann c0e760c9c6 bpf: make padding in bpf_tunnel_key explicit
Make the 2 byte padding in struct bpf_tunnel_key between tunnel_ttl
and tunnel_label members explicit. No issue has been observed, and
gcc/llvm does padding for the old struct already, where tunnel_label
was not yet present, so the current code works, but since it's part
of uapi, make sure we don't introduce holes in structs.

Therefore, add tunnel_ext that we can use generically in future
(f.e. to flag OAM messages for backends, etc). Also add the offset
to the compat tests to be sure should some compilers not padd the
tail of the old version of bpf_tunnel_key.

Fixes: 4018ab1875 ("bpf: support flow label for bpf_skb_{set, get}_tunnel_key")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:33 -04:00
Eric Dumazet 2d4212261f ipv6: udp: fix UDP_MIB_IGNOREDMULTI updates
IPv6 counters updates use a different macro than IPv4.

Fixes: 36cbb2452c ("udp: Increment UDP_MIB_IGNOREDMULTI for arriving unmatched multicasts")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Rick Jones <rick.jones2@hp.com>
Cc: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:33 -04:00
Michael Chan 3c02d1bb32 bnxt_en: Fix ethtool -a reporting.
To report flow control tx/rx settings accurately regardless of autoneg
setting, we should use link_info->req_flow_ctrl.  Before this patch,
the reported settings were only correct when autoneg was on.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:33 -04:00
Michael Chan 49b5c7a125 bnxt_en: Fix typo in bnxt_hwrm_set_pause_common().
The typo caused the wrong flow control bit to be set.

Reported by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:33 -04:00
Michael Chan e6ef26991a bnxt_en: Implement proper firmware message padding.
The size of every padded firmware message is specified in the first
HWRM_VER_GET response message.  Use this value to pad every message
after that.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:32 -04:00
Prashant Sreedharan 33e52d888d bnxt_en: Initialize CP doorbell value before ring allocation
The existing code does the following:
    allocate completion ring
    initialize completion ring doorbell
    disable interrupts on this completion ring by writing to the doorbell

We can have a race where firmware sends an asynchronous event to the host
after completion ring allocation and before doorbell is initialized.
When this happens driver can crash while ringing the doorbell using
uninitialized value as part of handling the IRQ/napi request.

Signed-off-by: Prashant Sreedharan <prashant.sreedharan@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 19:01:32 -04:00
Anton Blanchard 9f56c092b9 perf jit: genelf makes assumptions about endian
Commit 9b07e27f88 ("perf inject: Add jitdump mmap injection support")
incorrectly assumed that PowerPC is big endian only.

Simplify things by consolidating the define of GEN_ELF_ENDIAN and checking
for __BYTE_ORDER == __BIG_ENDIAN.

The PowerPC checks were also incorrect, they do not match what gcc
emits. We should first look for __powerpc64__, then __powerpc__.

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Carl Love <cel@us.ibm.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Fixes: 9b07e27f88 ("perf inject: Add jitdump mmap injection support")
Link: http://lkml.kernel.org/r/20160329175944.33a211cc@kryten
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-30 18:12:06 -03:00
Andres Freund 9098903555 perf hists: Fix determination of a callchain node's childlessness
The 4b3a321223 ("perf hists browser: Support flat callchains") commit
over-aggressively tried to optimize callchain_node__init_have_children().

That lead to --tui mode not allowing to expand call chain elements if a
call chain element had only one parent. That's why --inverted callgraphs
looked halfway sane, but plain ones didn't.

Revert that individual optimization, it wasn't really related to the
rest of the commit.

Signed-off-by: Andres Freund <andres@anarazel.de>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Fixes: 4b3a321223 ("perf hists browser: Support flat callchains")
Link: http://lkml.kernel.org/r/20160330190245.GB13305@awork2.anarazel.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-30 18:08:39 -03:00
Xin Long cb41c997d4 team: team should sync the port's uc/mc addrs when add a port
There is an issue when we use mavtap over team:
When we replug nic links from team0, the real nics's mc list will not
include the maddr for macvtap any more. then we can't receive pkts to
macvtap device, as they are filterred by mc list of nic.

In Bonding Driver, it syncs the uc/mc addrs in bond_enslave().

We will fix this issue on team by adding the port's uc/mc addrs sync in
team_port_add.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 17:06:58 -04:00
Alexander Duyck c3483384ee gro: Allow tunnel stacking in the case of FOU/GUE
This patch should fix the issues seen with a recent fix to prevent
tunnel-in-tunnel frames from being generated with GRO.  The fix itself is
correct for now as long as we do not add any devices that support
NETIF_F_GSO_GRE_CSUM.  When such a device is added it could have the
potential to mess things up due to the fact that the outer transport header
points to the outer UDP header and not the GRE header as would be expected.

Fixes: fac8e0f579 ("tunnels: Don't apply GRO to multiple layers of encapsulation.")
Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 16:02:33 -04:00
Colin Ian King fea24857bb qed: initialize return rc to avoid returning garbage
in the case where qed_slowpath_irq_req is not called, rc is not
assigned and so qed_int_igu_enable will return a garbage value.
Fix this by initializing rc to 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 15:48:15 -04:00
Marcelo Ricardo Leitner 28fd34985b sctp: really allow using GFP_KERNEL on sctp_packet_transmit
Somehow my patch for commit cea8768f33 ("sctp: allow
sctp_transmit_packet and others to use gfp") missed two important
chunks, which are now added.

Fixes: cea8768f33 ("sctp: allow sctp_transmit_packet and others to use gfp")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-By: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 15:41:22 -04:00
Haishuang Yan 5e263f7126 bridge: Allow set bridge ageing time when switchdev disabled
When NET_SWITCHDEV=n, switchdev_port_attr_set will return -EOPNOTSUPP,
we should ignore this error code and continue to set the ageing time.

Fixes: c62987bbd8 ("bridge: push bridge setting ageing_time down to switchdev")
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Acked-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-30 15:38:13 -04:00
Linus Torvalds 62f444e054 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu:
 "This fixes a bug in pkcs7_validate_trust and its users where the
  output value may in fact be taken from uninitialised memory"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  PKCS#7: pkcs7_validate_trust(): initialize the _trusted output argument
2016-03-30 13:28:34 -05:00
Linus Torvalds 07c0db771d dlm fixes for 4.6
This fixes a bug from the configfs cleanup.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW+qAsAAoJEDgbc8f8gGmqxnwQAKZTG0czCcNEqhnclHJspiXz
 YSE/YXjMXXAhbEMZc6r6hydOcbeTxOCz33rlQIaxj3doSQqBlUdgpTy2YtuMDsz4
 0cepk1bAOCCv9GR/q1Ik2KkQk4RFQvgrkV8HhlCx0awxQPlIGkZBO2FLEhMuRLHA
 TkJ4KyOb5spykoqvsV1LeSYpH8My5hpJmM+e0q/DXL47FC0Z/ViAphsOhpmatGmf
 2joUIEU7OVPAzgjbO8F7PGBzG8lOQV0Kjht+5pDZZCDafB4MAoF8K/f6YJpXXcGa
 MaQHBrWx1lvABKgI+xAJFtXm99ufv7XPvep4SklUaKmskn1QexzTqKt1tDb1C1W9
 AzIA75oAoAq8QFQbQ5ONKkwNN2/Oyq8oabm1iegaDZXx0QOVMJKNhMfoA8hiygev
 hF1QdBnjpkBEvlJQ7d0qdeMkq3cs7Nuy8OdDNDEUpcf7yFosARfHJOh2lTXvysfc
 G1QJYw3+KX7ZJb3TBqfly2eZdfBdDhtT9s/zJZPf55itKTsAIWfOAHlCGxvG/qk6
 YM+DlRwdXcu4J+8BYHSLThcJSVZE9czG3OSw8dIfsU3mQshVr4fYKfku59Y5eFC6
 sjhTDMyVSlB/a23fSXVB1Iai0Xm02qa/hun1EDvUwbVj4iV0xXHqKYbjgREh3/3S
 UxMqw62pk2g+bZhqNPbq
 =ityW
 -----END PGP SIGNATURE-----

Merge tag 'dlm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm

Pull dlm fix from David Teigland:
 "This fixes a bug from the configfs cleanup"

* tag 'dlm-4.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm:
  dlm: config: Fix ENOMEM failures in make_cluster()
2016-03-30 13:24:28 -05:00
Linus Torvalds 8b8c877feb Fix crash due to NULL pointer access in max1111 driver
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW+pIoAAoJEMsfJm/On5mBr6sP/3H7ZTXw43V6SvMP3tK63Gn2
 T9HtYyYJ2i7b9lfexqIV4gkC5wZiR4KwiWjYQrKfzMk9kvKWQ63O6rO6unbfjnUa
 gKTIXiId1nIcpmp0TqIFfQqf0j/Bqdbp0Qq7oKXTKB6+hEuvR96jsLVwlIQrRN6X
 83oxcgQPvo8jOSeSew64S7PTIxqgomu9HKGwrjfSumxkYxUX/hm5lgU7b86lzQGF
 MeN/1oS6emTN+DhYazoQyc37/9mjRWiHXoJRYrqRauYvmbIFaML8ty498wi0G781
 rLyVCRXEml9YBT2AJm9epni0RBvhz1wgNX96OFgZndevjiY7ZX8XQXKqjeseUQ6A
 B8aqNz2oapNxFNtIKU5+Q2VVfNUDkUEawJIfSsJEOMT+jY+NDx3W3xc5Wh3+FnYm
 GX8uX9CLNU1Wj2UcQC78IhZvVcGKtEeQv8j4kqu7YP0IdyjTsSYG2o0LueEGob8L
 JdkCJwKV9cEHccj9DK5KCz0jQX1jimS98FP0yWHYVQPtDr0M+NuB29FbYgbVT/0O
 Ng8R/8nDhtsU33JY6I0Xi6a38/5belDqmpLgdpatuSBonOhzq8o4XRV05/2u05El
 PSDiCHLXjUJqdIUBQW2G7+GYXzpocSYzm6ZLHitZYNYGDdYk2DpBqt4hOcg5oL/t
 vi3rstE18Jye/NJR15zD
 =CA84
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
 "Fix crash due to NULL pointer access in max1111 driver"

* tag 'hwmon-for-linus-v4.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated
2016-03-30 13:22:47 -05:00
Denys Vlasenko 283d757378 uapi/linux/stddef.h: Provide __always_inline to userspace headers
Josh Boyer reported that my recent change to uapi/linux/swab.h broke the Qemu build:

  bc27fb68aa ("include/uapi/linux/byteorder, swab: force inlining of some byteswap operations")

Unfortunately, UAPI headers don't include compiler.h so fixing it there is not enough,
add an __always_inline definition to uapi/linux/stddef.h instead.

Testcase: "make headers_install" and try to compile this:

	#include <linux/swab.h>
	void main() {}

Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/1459289697-12875-1-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-03-30 12:50:17 +02:00
Sedat Dilek a189c017de tools/lib/lockdep: Fix unsupported 'basename -s' in run_tests.sh
Here on Ubuntu/precise I have GNU/coreutils v8.13 installed
where 'basename -s' is not supported.

The result is that run_tests.sh is not done properly.

How to reproduce:

  $ cd $BUILD_DIR
  $ LC_ALL=C make -C tools/ liblockdep
  $ cd tools/lib/lockdep/

    $ LC_ALL=C ./run_tests.sh
  basename: invalid option -- 's'
  Try `basename --help' for more information.
  ... timeout: failed to run command `./tests/': Permission denied
  FAILED!
  rm: cannot remove `tests/': Is a directory

Due to unsupported basename the tests programs are not generated
and cannot be removed.

Fix this by doing a compatible basename invocation and check for
the existence of generated tests programs.

For more details see this LKML thread:

  http://marc.info/?t=145906667300001&r=1&w=2

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com> (maintainer:LIBLOCKDEP)
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Link: http://lkml.kernel.org/r/1459326169-7009-1-git-send-email-sedat.dilek@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-03-30 12:45:56 +02:00
Ingo Molnar f6343be96e perf/urgent fix:
- Add missing initialization of perf_sample.cpumode in synthesized samples,
   affects jitdump, records for pre-existing threads and records synthesized
   from processor trace data, noticed while testing intel_pt events with
   'perf script' (Arnaldo Carvalho de Melo)
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW+wpZAAoJENZQFvNTUqpAQ20P/RCpjUSKrYWDsZk2GuhfyrWE
 F/e3JwC9NVPyMvCzLCcqWELZHpXNTiKhEBLDmoLmBQlUj0yRSZCTKD6LelGBmQFI
 zOn7h4te5LHDX9Z5Syz27mYBDsWWJSua8zpGBQQpySmIADJT+iH5KZ3bo8513K3r
 9SDwVrig6LUNLQ61YmefSqJbFmw3MgldqL5AsdfeJHAOaPgSLXoxXywA/wBlw5ZK
 wg0Z90rhfEwjuxWCkHJ02H5QAuxWrulP1RbQNTU5ANHfjSdPDHyUFFkZINfvzH+X
 DtbiFCKL+qsIUJhkDmWxFqbPTnyRVwrcgF5UnrTsyQXDoizucRgC0orsXdzT85k5
 NUhaY+SNA/851jjM2108iY5zsjewNvkqLb75yERNRW+lucOkBtxZBq8IJNN63O/e
 IYgbArCaQzsEV+G02ftrX9HxQvMzJuSIoz2rmIkBsb+uEDIXdz+u8FtrYuqKj8h4
 MD6U0C0Zix1fhx6oDqJWss3H05KjLo2PWhTOM4gySicMeLRa3exakZCuJF/ftwfg
 9bQZBsrL6Q138KdSXCVzJEVTEFrOrbCejIYRK+q7GZTksXDmCDxSnT6Dq+49OIWb
 QNg5eqfMlX7PYj4LTEGKqQq7jyzsWGRb0jFP3yoQUS3ZGDmAwiBV+lX7BNsfmVWN
 zcH/S/qIj//IP2QwMjiR
 =Ov8b
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-for-mingo-20160329' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent

Pull perf/urgent fix from Arnaldo Carvalho de Melo:

 - Add missing initialization of perf_sample.cpumode in synthesized samples,
   affects jitdump, records for pre-existing threads and records synthesized
   from processor trace data, noticed while testing intel_pt events with
   'perf script' (Arnaldo Carvalho de Melo)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-03-30 12:31:03 +02:00
Axel Lin 8d8ee18cc7 gpio: xgene: Prevent NULL pointer dereference
platform_get_resource() can return NULL, thus add NULL test to prevent NULL
pointer dereference.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-03-30 10:39:39 +02:00
Axel Lin fd975a7b18 gpio: menz127: Drop lock field from struct men_z127_gpio
Current code uses a uninitialized spin lock.
bgpio_init() already initialized a spin lock, so let's switch to use
&gc->bgpio_lock instead and remove the lock from struct men_z127_gpio.

Fixes: f436bc2726 "gpio: add driver for MEN 16Z127 GPIO controller"
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-03-30 10:39:39 +02:00
Sridhar Samudrala b5aea3de88 ixgbe: Fix cls_u32 offload support for L4 ports
Fix support for 16 bit source/dest port matches in ixgbe model.
u32 uses a single 32-bit key value for both source and destination ports
starting at offset 0. So replace the 2 functions with a single function
that takes this key value/mask to program both source and dest ports.

Verified with the following filter:

 #tc qdisc add dev p4p1 ingress
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 1: u32 divisor 1
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 800:0:10 u32 ht 800: link 1: \
	offset at 0 mask 0f00 shift 6 plus 0 eat match ip protocol 6 ff
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 1:0:10 u32 ht 1: \
	match tcp src 1024 ffff match tcp dst 80 ffff action drop
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 1:0:11 u32 ht 1: \
	match tcp src 1025 ffff action drop
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 1:0:12 u32 ht 1: \
	match tcp dst 81 ffff action drop

Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 23:23:04 -07:00
Sridhar Samudrala ebd83ad818 ixgbe: Fix cls_u32 offload support for fields with masks
Remove the incorrect check for mask in ixgbe_configure_clsu32 and
drop the 'mask' field that is not required in struct ixgbe_mat_field

Verified with the following filters:

 #tc qdisc add dev p4p1 ingress
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 800:0:1 u32 ht 800: \
	match ip dst 10.0.0.1/8 match ip src 10.0.0.2/8 action drop
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 800:0:2 u32 ht 800: \
	match ip dst 11.0.0.1/16 match ip src 11.0.0.2/16 action drop
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 800:0:3 u32 ht 800: \
	match ip dst 12.0.0.1/24 match ip src 12.0.0.2/24 action drop
 #tc filter add dev p4p1 parent ffff: protocol ip prio 99 \
	handle 800:0:4 u32 ht 800: \
	match ip dst 13.0.0.1/32 match ip src 13.0.0.2/32 action drop

Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 23:12:30 -07:00
Sridhar Samudrala 176621c964 ixgbe: fix error handling in TC cls_u32 offload routines
Check for handle ids when adding/deleting hash nodes OR adding/deleting
filter entries and limit them to max number of links or header nodes
supported(IXGBE_MAX_LINK_HANDLE).

Start from bit 0 when setting hash table bit-map.(adapter->tables)

Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 23:05:51 -07:00
Emil Tantilov 6e2a60b57a ixgbe: make __ixgbe_setup_tc static
This function is only used in ixgbe_main.c
Resolves a "missing prototype" warning when building the driver with W=1

Reported-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:57:32 -07:00
Emil Tantilov 32ca686835 ixgbevf: fix error code path when setting MAC address
Return error when a MAC address change is rejected by the PF.

This will prevent the user from modifying the MAC address when
that operation is not permitted.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:53:42 -07:00
Stefan Assmann 324d086709 ixgbevf: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the
interfaces routes and some addresses. That's probably not what the user
intended when running the offline selftest. Besides this does not happen
if the interface is brought down before the test, so the current
behaviour is inconsistent.
Instead call the net_device_ops ndo_stop function directly and avoid
touching IFF_UP at all.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:45:04 -07:00
Stefan Assmann 6c211fe1e7 ixgbe: call ndo_stop() instead of dev_close() when running offline selftest
Calling dev_close() causes IFF_UP to be cleared which will remove the
interfaces routes and some addresses. That's probably not what the user
intended when running the offline selftest. Besides this does not happen
if the interface is brought down before the test, so the current
behaviour is inconsistent.
Instead call the net_device_ops ndo_stop function directly and avoid
touching IFF_UP at all.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:41:33 -07:00
Mark Rustad d90b5b0ec1 ixgbe: Use udelay to avoid sleeping while atomic
Use udelay instead of usleep_range because this can be called while
a lock is held.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:37:17 -07:00
Alexander Duyck e2873d43f9 ixgbe: Fix ATR so that it correctly handles IPv6 extension headers
The ATR code was assuming that it would be able to use tcp_hdr for
every TCP frame that came through.  However this isn't the case as it
is possible for a frame to arrive that is TCP but sent through something
like a raw socket.  As a result the driver was setting up bad filters in
which tcp_hdr was really pointing to the network header so the data was
all invalid.

In order to correct this I have added a bit of parsing logic that will
determine the TCP header location based off of the network header and
either the offset in the case of the IPv4 header, or a walk through the
IPv6 extension headers until it encounters the header that indicates
IPPROTO_TCP.  In addition I have added checks to verify that the lowest
protocol provided is recognized as IPv4 or IPv6 to help mitigate raw
sockets using ETH_P_ALL from having ATR applied to them.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:32:33 -07:00
Alexander Duyck 9f12df906c ixgbe: Store VXLAN port number in network order
The VXLAN port number should be stored in network order instead of in host
order as it is accessed from the hot-path in ATR.  This way we can avoid
having to do any byte swaps in order to validate the port number.

I moved the vxlan_port value into a hole in the read-mostly region of the
adapter struct.  This way it should be in a warm cache-line instead of in
some isolated region in memory when it needs to be accessed.

In addition I went through and stripped a bunch of unneeded ifdef flags
since having an extra variable present doesn't really hurt anything and
makes the code easier to read.  I also went through and dropped the
NETIF_F_RXCSUM flag which was being set in hw_encap_features but provides
no value as the flag is not evaluated in the Rx path.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:24:16 -07:00
Tushar Dave 5676804518 ixgbe: Fix for RAR0 not being set to default MAC addr
commit c9f53e63c2 ("ixgbe: Refactor MAC address configuration code")
introduced code that doesn't set HW register RAR0 to default mac address
but FF:FF:FF:FF:FF:FF. Due to this, ixgbe HW discards all incoming packets
that doesn't have destination mac address equals to FF:FF:FF:FF:FF:FF.

This commit sets RAR0 correctly to default HW mac address.

Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Tested-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2016-03-29 22:06:50 -07:00
Matthew McClintock 2aac7ddf9a clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll
Drivers for these don't exist yet so we will add them as fixed clocks
so we don't BUG() if we change clocks that reference these clocks.

Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:31:16 -07:00
Matthew McClintock bc95d4f0a9 clk: qcom: ipq4019: switch remaining defines to enums
When this was added not all the remaining defines were switched over to
use enums, so let's complete that process here

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Matthew McClintock <mmcclint@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:31:11 -07:00
Philipp Zabel add479eeb1 clk: qcom: Make reset_control_ops const
The qcom_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:30:26 -07:00
Philipp Zabel 7ba256d2aa clk: tegra: Make reset_control_ops const
The rst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:30:12 -07:00
Philipp Zabel 5e7bc9c6ce clk: sunxi: Make reset_control_ops const
The sunxi_ve_reset_ops, sun9i_mmc_reset_ops, and sunxi_usb_reset_ops
structures are never modified. Make them const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:30:07 -07:00
Philipp Zabel b1b69c5dd5 clk: atlas7: Make reset_control_ops const
The atlas7_rst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:30:01 -07:00
Philipp Zabel 3fb950fea6 clk: rockchip: Make reset_control_ops const
The rockchip_softrst_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:29:46 -07:00
Philipp Zabel fd92f41dc2 clk: mmp: Make reset_control_ops const
The mmp_clk_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:29:34 -07:00
Philipp Zabel f39bb4579c clk: mediatek: Make reset_control_ops const
The mtk_reset_ops structure is never modified. Make it const.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2016-03-29 16:29:19 -07:00
Arnaldo Carvalho de Melo 3ea223adcb perf tools: Add missing initialization of perf_sample.cpumode in synthesized samples
In 473398a21d ("perf tools: Add cpumode to struct perf_sample"), I
missed some places where perf_sample fields are directly initialized in
addition to what is done in perf_evsel__parse_sample(), namely when
synthesizing PERF_RECORD_{MMAP*,COMM,FORK,EXIT} for pre-existing threads
and also in intel_pt and intel_bts when synthesizing events from
processor trace, the jitdump code also was affected, fix it.

The problem was noticed with running:

  # perf record -e intel_pt//u true
  # perf script

Where the samples wouldn't get resolved because perf_sample.cpumode
would be left as zero, i.e. PERF_RECORD_MISC_CPUMODE_UNKNOWN, not
resolving as kernel, hypervisor or user cpu modes.

Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 473398a21d ("perf tools: Add cpumode to struct perf_sample")
Link: http://lkml.kernel.org/n/tip-n5sdauxgk24d5nun8kuuu2mh@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-29 20:03:56 -03:00
Will Deacon 431597bb95 arm64: defconfig: updates for 4.6
A few defconfig updates got dropped on the floor during the merge window,
so I've rounded up the remainder here:

  * Fix duplicate definition of MMC_BLOCK_MINORS and bump to 32 for
    msm8916

  * CPUFreq support for the Juno platform, using the MHU/SCPI interface

  * Removal of the default command line, which assumed a console called
    ttyAMA0

  * Bits and pieces for the Hi6220 (96Boards HiKey)

Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-03-29 16:56:00 +01:00
Andrew Price 82c7d823cc dlm: config: Fix ENOMEM failures in make_cluster()
Commit 1ae1602de0 "configfs: switch ->default groups to a linked list"
left the NULL gps pointer behind after removing the kcalloc() call which
made it non-NULL. It also left the !gps check in place so make_cluster()
now fails with ENOMEM. Remove the remaining uses of the gps variable to
fix that.

Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
2016-03-29 10:28:08 -05:00
Shannon Zhao b8cfadfcef arm64: perf: Move PMU register related defines to asm/perf_event.h
To use the ARMv8 PMU related register defines from the KVM code, we move
the relevant definitions to asm/perf_event.h header file and rename them
with prefix ARMV8_PMU_. This allows us to get rid of kvm_perf_event.h.

Signed-off-by: Anup Patel <anup.patel@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-03-29 16:04:57 +01:00