Commit Graph

519644 Commits

Author SHA1 Message Date
Andrew Lunn 3898c14858 net: dsa: mv88e6xxx: Replace PHY mutex by SMI mutex
The SMI bus is the bottleneck in all switch operations, not the
granularity of locks. Replace the PHY mutex by the SMI mutex to make
the locking concept simpler.

The REG_READ/REG_WRITE macros cannot be used while holding the SMI
mutex, since they try to acquire it. Replace with calls to the
appropriate function which does not try to get the mutex.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:53 -04:00
Andrew Lunn 1441f4e596 net: dsa: mv88e6131: Add support for mv88e6185
The mv88e6185 is part of the family that the mv88e6131 driver
supports. Add it to the probe function, and set the number of ports.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:53 -04:00
Andrew Lunn eee7483edb net: dsa: mv88e6171: Add other members of the family
The 6171 is one member of the family 6171/6175/6350/6351. Add the
other family members to the driver.

Not tested on these new devices.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:53 -04:00
Andrew Lunn 1636d88357 net: dsa: Move mv88e6172 support into mv88e6352 family driver
The mv88e6172 is part of the mv88e6352 family of devices. Move support
for it out of the mv88e6171 driver into the mv88e6352, which results
in some simplifications to the code.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:53 -04:00
Andrew Lunn 15966a2a76 net: dsa: Converting remaining registers to mnemonics
Use defines for registers, shifts and bits in the remaining register
accesses in the individual drivers, in order to aid readability.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:53 -04:00
Andrew Lunn dbde9e6667 net: dsa: Centralize setting up ports
Now that setting up a port is identical for all switches, centralisers
the code looping over all the ports to set them up.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:52 -04:00
Andrew Lunn 54d792f257 net: dsa: Centralise global and port setup code into mv88e6xxx.
The port setup code in the individual drivers is identical for 6123,
6171, and 6352, and very similar in 6131. Move it all into mv88e6xxx,
using the chip families to differentiate on features.

Similarly, the global setup is also very similar. Move the majority
into mv8e6xxx.

The chips themselves fall into families. Add helpers which uses the
device IDs to determine if a device is a member of a family or not.
Add some additional device IDs to the existing list, to make these
helper functions more complete. However these IDs are not yet added to
the probe functions.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:05:52 -04:00
Nathan Sullivan bfbb92c446 net: macb: Handle the RXUBR interrupt on all devices
The same hardware issue the at91 must work around applies to at least the
Zynq ethernet, and possibly more devices.  The driver also needs to handle
the RXUBR interrupt since it turns it on with MACB_RX_INT_FLAGS anyway.

Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:04:43 -04:00
David S. Miller d3196a2468 Merge branch 'rds'
Sowmini Varadhan says:

====================
net/rds: RDS-TCP robustness fixes

This patch-set contains bug fixes for state-recovery at the RDS
layer when the underlying transport is TCP and the TCP state at one
of the endpoints is reset

V2 changes: DaveM comments to reduce memory footprint, follow
            NFS/RPC model where possible. Added test-case #3

Without the changes in this set, when one of the endpoints is reset,
the existing code does not correctly clean up RDS socket state for stale
connections, resulting in some unstable, timing-dependant behavior on
the wire, including an infinite exchange of 3WHs back-and-forth, and a
resulting potential to never converge RDS state.

Test cases used to verify the changes in this set are:

1. Start rds client/server applications on two participating nodes,
   node1 and node2. After at least one packet has been sent (to establish
   the TCP connection), restart the rds_tcp module on the client, and
   now resend packets. Tcpdump should show server sending a FIN for the
   "old" client port, and clean connection establishment/exchange for
   the new client port.

2. At the end of step 1, restart rds srever on node2, and start client on
   node1, make sure using tcpdump, 'netstat -an|grep 16385' that
   packets flow correctly.

3. start RDS client/server application on two participating nodes, and
   repeat steps 1 and 2, but this time, simulate node failure by doing
   "ifconfig <intf> down", so no FIN is sent.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:03:28 -04:00
Sowmini Varadhan c82ac7e69e net/rds: RDS-TCP: only initiate reconnect attempt on outgoing TCP socket.
When the peer of an RDS-TCP connection restarts, a reconnect
attempt should only be made from the active side  of the TCP
connection, i.e. the side that has a transient TCP port
number. Do not add the passive side of the TCP connection
to the c_hash_node and thus avoid triggering rds_queue_reconnect()
for passive rds connections.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:03:28 -04:00
Sowmini Varadhan f711a6ae06 net/rds: RDS-TCP: Always create a new rds_sock for an incoming connection.
When running RDS over TCP, the active (client) side connects to the
listening ("passive") side at the RDS_TCP_PORT.  After the connection
is established, if the client side reboots (potentially without even
sending a FIN) the server still has a TCP socket in the esablished
state.  If the server-side now gets a new SYN comes from the client
with a different client port, TCP will create a new socket-pair, but
the RDS layer will incorrectly pull up the old rds_connection (which
is still associated with the stale t_sock and RDS socket state).

This patch corrects this behavior by having rds_tcp_accept_one()
always create a new connection for an incoming TCP SYN.
The rds and tcp state associated with the old socket-pair is cleaned
up via the rds_tcp_state_change() callback which would typically be
invoked in most cases when the client-TCP sends a FIN on TCP restart,
triggering a transition to CLOSE_WAIT state. In the rarer event of client
death without a FIN, TCP_KEEPALIVE probes on the socket will detect
the stale socket, and the TCP transition to CLOSE state will trigger
the RDS state cleanup.

Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 16:03:27 -04:00
Markus Stenberg e16e888b52 ipv6: Fixed source specific default route handling.
If there are only IPv6 source specific default routes present, the
host gets -ENETUNREACH on e.g. connect() because ip6_dst_lookup_tail
calls ip6_route_output first, and given source address any, it fails,
and ip6_route_get_saddr is never called.

The change is to use the ip6_route_get_saddr, even if the initial
ip6_route_output fails, and then doing ip6_route_output _again_ after
we have appropriate source address available.

Note that this is '99% fix' to the problem; a correct fix would be to
do route lookups only within addrconf.c when picking a source address,
and never call ip6_route_output before source address has been
populated.

Signed-off-by: Markus Stenberg <markus.stenberg@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 15:58:41 -04:00
David S. Miller 0a801445db Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Johan Hedberg says:

====================
Here are a couple of important Bluetooth & mac802154 fixes for 4.1:

 - mac802154 fix for crypto algorithm allocation failure checking
 - mac802154 wpan phy leak fix for error code path
 - Fix for not calling Bluetooth shutdown() if interface is not up

Let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2015-05-09 15:51:00 -04:00
Rusty Russell 1a9f064f51 m32r: make flush_cpumask non-volatile.
We cast away the volatile, but really, why make it volatile at all?
We already do a mb() inside the cpumask_empty() loop.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-05-09 11:09:29 -07:00
Eric W. Biederman 7e96c1b0e0 mnt: Fix fs_fully_visible to verify the root directory is visible
This fixes a dumb bug in fs_fully_visible that allows proc or sys to
be mounted if there is a bind mount of part of /proc/ or /sys/ visible.

Cc: stable@vger.kernel.org
Reported-by: Eric Windisch <ewindisch@docker.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2015-05-09 11:55:50 -05:00
Linus Torvalds 95c607d93f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro:
 "A couple of fixes for bugs caught while digging in fs/namei.c.  The
  first one is this cycle regression, the second is 3.11 and later"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  path_openat(): fix double fput()
  namei: d_is_negative() should be checked before ->d_seq validation
2015-05-08 21:39:12 -07:00
Al Viro f15133df08 path_openat(): fix double fput()
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().

Cc: stable@vger.kernel.org	# v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-05-09 00:12:48 -04:00
Al Viro 766c4cbfac namei: d_is_negative() should be checked before ->d_seq validation
Fetching ->d_inode, verifying ->d_seq and finding d_is_negative() to
be true does *not* mean that inode we'd fetched had been NULL - that
holds only while ->d_seq is still unchanged.

Shift d_is_negative() checks into lookup_fast() prior to ->d_seq
verification.

Reported-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-05-09 00:12:35 -04:00
Linus Torvalds af6472881a Merge branch 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason:
 "When an arm user reported crashes near page_address(page) in my new
  code, it became clear that I can't be trusted with GFP masks.  Filipe
  beat me to the patch, and I'll just be in the corner with my dunce cap
  on"

* 'for-linus-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: fix wrong mapping flags for free space inode
2015-05-08 20:59:02 -07:00
Linus Torvalds 5d5df5ee7c Two additional fixes for changes introduced via DM during the 4.1 merge
window: The first reverts a dm-crypt change that wasn't correct.  The
 second fixes a device format regression that impacted userspace.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVTRZOAAoJEMUj8QotnQNaW7EIAJlHn+S8czm1Cb4gWBn7kg+X
 vzH5NIzr/SpDX8o3R8NBdrB8rgqTm4jQZrptbmgLG+j9XoaQupuFyNCiaAw47v2G
 P/WYlodNwTkb3I48XjwCRo00MtR3cEJ8ywNzvEJUvgPkgMMIzhieHsVT9L8bZv3n
 XDs8JzZyF966U0BeCjF4oDAazUrpEvWf0h4C5L47g8C0UQI7aGwYKoSvZm3DAImP
 awbJbnqtQuoRcI0HISHrjYi1vghgnmJY6aSx3tYSJPTNRkFNqgap7eZrUacicnOH
 bUVL3snBVebK3JMJhJXgfGW/FeeP9juhEY08JNTOZ5wa6BNuru0GHeqKuI3arHY=
 =jlAN
 -----END PGP SIGNATURE-----

Merge tag 'dm-4.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm

Pull device mapper fixes from Mike Snitzer:
 "Two additional fixes for changes introduced via DM during the 4.1
  merge window.

  The first reverts a dm-crypt change that wasn't correct.  The second
  fixes a device format regression that impacted userspace"

* tag 'dm-4.1-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  init: fix regression by supporting devices with major:minor:offset format
  Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY"
2015-05-08 20:38:21 -07:00
Linus Torvalds 1daac193f2 Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block fixes from Jens Axboe:
 "A collection of fixes since the merge window;

   - fix for a double elevator module release, from Chao Yu.  Ancient bug.

   - the splice() MORE flag fix from Christophe Leroy.

   - a fix for NVMe, fixing a patch that went in in the merge window.
     From Keith.

   - two fixes for blk-mq CPU hotplug handling, from Ming Lei.

   - bdi vs blockdev lifetime fix from Neil Brown, fixing and oops in md.

   - two blk-mq fixes from Shaohua, fixing a race on queue stop and a
     bad merge issue with FUA writes.

   - division-by-zero fix for writeback from Tejun.

   - a block bounce page accounting fix, making sure we inc/dec after
     bouncing so that pre/post IO pages match up.  From Wang YanQing"

* 'for-linus' of git://git.kernel.dk/linux-block:
  splice: sendfile() at once fails for big files
  blk-mq: don't lose requests if a stopped queue restarts
  blk-mq: fix FUA request hang
  block: destroy bdi before blockdev is unregistered.
  block:bounce: fix call inc_|dec_zone_page_state on different pages confuse value of NR_BOUNCE
  elevator: fix double release of elevator module
  writeback: use |1 instead of +1 to protect against div by zero
  blk-mq: fix CPU hotplug handling
  blk-mq: fix race between timeout and CPU hotplug
  NVMe: Fix VPD B0 max sectors translation
2015-05-08 19:49:35 -07:00
Linus Torvalds 41c64bb19c These are some GPIO fixes for the v4.1 series:
- Fix a memory leak for GPIO hotplug.
 
 - Fix a signedness bug in the ACPI GPIO pin validation.
 
 - Driver fixes: Qualcomm SPMI and OMAP MPUIO IRQ issues.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVTGkQAAoJEEEQszewGV1zDjcQAJLc5C0k53nc4oxA91B1Ldpn
 QbwKLCVrX7ex4zye4Qisw0vqPB1yZJD9yfuerNYQUJpoXFwHLGKr3925Q5NUCsRz
 7d1zFfgfw+hdHXAZv02uOmZ+xx7E1tDl95CBU0GpkFo8yJ6gms+X5TonqWRLAwP4
 2vIYjZdQLFpLI73lQ5eR3jYcMlrwCgGnPYeG5gR5Fp1dUmrpaZckhidoj7j1bxNk
 mCrv+xoGguIv/t9sUNXSusD4j1Rr0G/YX2RxbrWjTTSCCyuIV/b4MmwuTuD853sl
 I2AGiftGZOuDbaBuPRMa3371QXI2ZY7I27lUvvx2aEVKNkuxgFzqX0GSd1FUFdRc
 GZdLBVsiV1FZtXJ6rte5z18w7I+vn77GgyNQTs/0w6YS8ofWHeR2MQCF95g4uJhT
 YSo0/3O2bJxEoyQ1t2NQISSdG2/1BMxsOFejMITqxLgGYUYqL0D739aatiq53HCt
 vlmn7npUvik1r804Tun/isqkv8IRXHf3Dhy31mPFmlYRIR4sm9vuEk2SWoWcadDi
 BH+ej6YmYloklKwoj2yiC7MtOl4N+hPvLDZmZvich16eJc0BI1Wu9QfTTJ+pH895
 R5twBPioRmE67Mg+edMCrsmDv6a8ECaUnf/ODLg0qYHreE9MplSi98JJw+lfTAxb
 DWLng7tcgp8SV+6gW5pc
 =xfL0
 -----END PGP SIGNATURE-----

Merge tag 'gpio-v4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO fixes from Linus Walleij:
 "Here is a bunch of GPIO fixes that I collected since -rc1, nothing
  controversial, nothing special:

   - fix a memory leak for GPIO hotplug.

   - fix a signedness bug in the ACPI GPIO pin validation.

   - driver fixes: Qualcomm SPMI and OMAP MPUIO IRQ issues"

* tag 'gpio-v4.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  gpio: omap: Fix regression for MPUIO interrupts
  gpio: sysfs: fix memory leaks and device hotplug
  pinctrl: qcom-spmi-gpio: Fix input value report
  pinctrl: qcom-spmi-gpio: Fix output type configuration
  gpiolib: change gpio pin from unsigned to signed in acpi callback
2015-05-08 19:42:59 -07:00
Linus Torvalds a8a0811314 MMC core:
- Don't access RPMB partitions for normal read/write
 - Fix hibernation restore sequence
 
 MMC host:
 - dw_mmc: Fix card detection for non removable cards
 - dw_mmc: Fix sglist issue in 32-bit mode
 - sh_mmcif: Fix timeout value for command request
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVTGKzAAoJEP4mhCVzWIwpD74QAJzWUVv+wUMAuJy8SvlMwWBD
 tdObKWEdEz7jAQ1VVSqwOVlk+E/0sroBfA2vEie1Hsm+qt02r8AR1XmYJyG6nkxr
 BuIP0fnGVbH4sYnqa3CQEUI4AzYubryj6oDnZuulrxEfK9cbEGYJ7XWOvGVtCA5e
 jvyzty1/8c/vyTDaUUvqFTXIO8fLhKphpfvKUv7N13vnHPTtQShzQw8cyqQdem+F
 oYnyRrQEbdUbopQUOuc2AmveYAqCFXpq7SNkWa3bApzdLG9vzC9ObxJ4+EQYg/qx
 wuH49vbb04sTdWuwLBAXRmhOzjAxHCg7BT5dSvo7nlkIhp+PEiiHSzSmmd4Z+cYx
 nofrBEJI/16V7m672KILnvrvc4X/Q6h3a3Qw7k5bFlf+w70YGcE+uF1B9GnLfCrL
 bQIjOdP/kv1w62zgPKdVay07OZGX2ZVs8hoSLsWz8YM0kPwibUc2YojpLmUnziop
 xb066vWc4g120ecs3epu+klc4DbJps6SQXDgrcUbk/iqpVYg5E9sd0ZqdxdiqZZw
 ByDUCwcY++qkxWCz3JcGJxVcqeXK3kmBa1lyfgL6tYg529nEkHV9SriRy9Kky1Um
 j+3KNOWq3/xnuXm34XTcALP3x/i3mai7m7l9e7DuCRX36vsc3VXq1lXkc/NOZECV
 FyD3mli2FyWWomb14r3b
 =zel9
 -----END PGP SIGNATURE-----

Merge tag 'mmc-4.1-rc2' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
 "MMC core:
   - Don't access RPMB partitions for normal read/write
   - Fix hibernation restore sequence

  MMC host:
   - dw_mmc: Fix card detection for non removable cards
   - dw_mmc: Fix sglist issue in 32-bit mode
   - sh_mmcif: Fix timeout value for command request"

* tag 'mmc-4.1-rc2' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: dw_mmc: dw_mci_get_cd check MMC_CAP_NONREMOVABLE
  mmc: dw_mmc: init desc in dw_mci_idmac_init
  mmc: card: Don't access RPMB partitions for normal read/write
  mmc: sh_mmcif: Fix timeout value for command request
  mmc: core: add missing pm event in mmc_pm_notify to fix hib restore
2015-05-08 19:34:35 -07:00
Linus Torvalds 26b293e854 The newly added ftrace_print_array_seq() function had a bug in it. Luckily,
the only user of it didn't make the 4.1 merge window. But the helper
 function should be fixed before 4.2 when the users start coming in.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVTBNUAAoJEEjnJuOKh9ld0VQIAJWPLivGbGJyjSqFd1NXLidS
 ytcbM0dquYjvQ94EDxoA+uBm34hk1JbvcI+FgiOihEeyGh7wrhdibEVGT40TzE2I
 XrfTVwPfN5/k2D5MeZzzRkeoTDufc33MgqTURymRQSzkmHf5GttPXxZ/ckO9Hz9A
 XqzXaHcmnauZSmUY12q8rMtbKYP/dN5hUdmR6p44bMgDJehQkmTzJkxbe6t98b+t
 8y3YAcK5HclYITC2lBVHSw5z8e9F/B7UmrNxvNkcV5kqdYg3NnVnA292kSMft5zo
 WRk1nH4eVARq2dmGQ289QpneHqtMx22RU42m/t8M/v0OUANhlPaDb/RHlyDWJF4=
 =4JGY
 -----END PGP SIGNATURE-----

Merge tag 'trace-fixes-v4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
 "The newly added ftrace_print_array_seq() function had a bug in it.
  Luckily, the only user of it didn't make the 4.1 merge window.

  But the helper function should be fixed before 4.2 when the users
  start coming in"

* tag 'trace-fixes-v4.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Make ftrace_print_array_seq compute buf_len
2015-05-08 18:22:05 -07:00
Javier Martinez Canillas 8cf5e6dc8d ARM: dts: Add keep-power-in-suspend to WiFi SDIO node for exynos5250-snow
The Marvell mwifiex driver prevents the system to enter into a suspend
state if the card power is not preserved during a suspend/resume cycle.

So Suspend-to-RAM and Suspend-to-idle are failing on Exynos5250 Snow.

Add the keep-power-in-suspend Power Management property to the SDIO/MMC
node so the mwifiex suspend handler doesn't fail and the system is able
to enter into a suspend state.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-05-09 03:15:16 +09:00
Abhilash Kesavan cb0f7c8b40 ARM: dts: Fix typo in trip point temperature for exynos5420/5440
Remove the extra zero in the "cpu-crit-0" trip point for exynos5420
and exynos5440.

Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-05-09 03:11:21 +09:00
Markus Reichl ee2020a4ca ARM: dts: add 'rtc_src' clock to rtc node for exynos4412-odroid boards
The Exynos4412 SoC has a s3c6410 RTC where the source clock
is now a mandatory property.
This patch fixes probe failure of s3c-rtc on Odroid-X2/U2/U3 boards.

Signed-off-by: Markus Reichl <m.reichl@fivetechno.de>
Tested-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-05-09 03:06:02 +09:00
Javier Martinez Canillas 0d74776296 ARM: dts: Make DP a consumer of DISP1 power domain on Exynos5420
Commit ea08de16eb ("ARM: dts: Add DISP1 power domain for exynos5420")
added a device node for the Exynos5420 DISP1 power domain but dit not
make the DP controller a consumer of that power domain.

This causes an "Unhandled fault: imprecise external abort" error if the
exynos-dp driver tries to access the DP controller registers and the PD
was turned off. This lead to a kernel panic and a complete system hang.

Make the DP controller device node a consumer of the DISP1 power domain
to ensure that the PD is turned on when the exynos-dp driver is probed.

Fixes: ea08de16eb ("ARM: dts: Add DISP1 power domain for exynos5420")
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
2015-05-09 02:33:42 +09:00
Baruch Siach c9d862c48c MAINTAINERS: add Conexant Digicolor machines entry
This adds Baruch as the maintainer for the Digicolor platform.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-05-08 19:00:53 +02:00
Dinh Nguyen efadb75169 MAINTAINERS: socfpga: update the git repo for SoCFPGA
The git tree at rocketboards.org is going away. Update the entry to reflect
the address of the new location. Also add an entry for all the socfpga_*
dts files.

Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-05-08 18:27:37 +02:00
Mario Kleiner 3790e395b8 drm/tegra: Don't use vblank_disable_immediate on incapable driver.
Tegra would not only need a hardware vblank counter that
increments at leading edge of vblank, but also support
for instantaneous high precision vblank timestamp queries, ie.
a proper implementation of dev->driver->get_vblank_timestamp().

Without these, there can be off-by-one errors during vblank
disable/enable if the scanout is inside vblank at en/disable
time, and additionally clients will never see any useable
vblank timestamps when querying via drmWaitVblank ioctl. This
would negatively affect swap scheduling under X11 and Wayland.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-05-08 20:56:34 +10:00
Dave Airlie 94754c183a Merge tag 'drm-amdkfd-fixes-2015-05-07' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes
- Add missing initialization of SDMA vm register when creating an SDMA queue
- Don't report local memory size, as we don't support local memory allocation
  yet.
- Allow to unregister process with exisiting queues. Until now we blocked
  it with BUG_ON, which was also an error by itself.

* tag 'drm-amdkfd-fixes-2015-05-07' of git://people.freedesktop.org/~gabbayo/linux:
  drm/amdkfd: Initialize sdma vm when creating sdma queue
  drm/amdkfd: Don't report local memory size
  drm/amdkfd: allow unregister process with queues
2015-05-08 20:52:51 +10:00
Dave Airlie 7122e505a5 Merge branch 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Mostly stability fixes for UVD and VCE, plus a few other bug and regression
fixes.

* 'drm-fixes-4.1' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: stop trying to suspend UVD sessions
  drm/radeon: more strictly validate the UVD codec
  drm/radeon: make UVD handle checking more strict
  drm/radeon: make VCE handle check more strict
  drm/radeon: fix userptr lockup
  drm/radeon: fix userptr BO unpin bug v3
  drm/radeon: don't setup audio on asics that don't support it
  drm/radeon: disable semaphores for UVD V1 (v2)
2015-05-08 20:52:21 +10:00
NeilBrown bb27051f9f md/raid5: fix handling of degraded stripes in batches.
There is no need for special handling of stripe-batches when the array
is degraded.

There may be if there is a failure in the batch, but STRIPE_DEGRADED
does not imply an error.

So don't set STRIPE_BATCH_ERR in ops_run_io just because the array is
degraded.
This actually causes a bug: the STRIPE_DEGRADED flag gets cleared in
check_break_stripe_batch_list() and so the bitmap bit gets cleared
when it shouldn't.

So in check_break_stripe_batch_list(), split the batch up completely -
again STRIPE_DEGRADED isn't meaningful.

Also don't set STRIPE_BATCH_ERR when there is a write error to a
replacement device.  This simply removes the replacement device and
requires no extra handling.

Signed-off-by: NeilBrown <neilb@suse.de>
2015-05-08 18:47:57 +10:00
NeilBrown 738a273806 md/raid5: fix allocation of 'scribble' array.
As the new 'scribble' array is sized based on chunk size,
we need to make sure the size matches the largest of 'old'
and 'new' chunk sizes when the array is undergoing reshape.

We also potentially need to resize it even when not resizing
the stripe cache, as chunk size can change without changing
number of devices.

So move the 'resize' code into a separate function, and
consider old and new sizes when allocating.

Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: 46d5b78562 ("raid5: use flex_array for scribble data")
2015-05-08 18:47:48 +10:00
NeilBrown 6e9eac2dce md/raid5: don't record new size if resize_stripes fails.
If any memory allocation in resize_stripes fails we will return
-ENOMEM, but in some cases we update conf->pool_size anyway.

This means that if we try again, the allocations will be assumed
to be larger than they are, and badness results.

So only update pool_size if there is no error.

This bug was introduced in 2.6.17 and the patch is suitable for
-stable.

Fixes: ad01c9e375 ("[PATCH] md: Allow stripes to be expanded in preparation for expanding an array")
Cc: stable@vger.kernel.org (v2.6.17+)
Signed-off-by: NeilBrown <neilb@suse.de>
2015-05-08 18:47:35 +10:00
NeilBrown 10d82c5f0d md/raid5: avoid reading parity blocks for full-stripe write to degraded array
When performing a reconstruct write, we need to read all blocks
that are not being over-written .. except the parity (P and Q) blocks.

The code currently reads these (as they are not being over-written!)
unnecessarily.

Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: ea664c8245 ("md/raid5: need_this_block: tidy/fix last condition.")
2015-05-08 18:47:17 +10:00
NeilBrown b0c783b323 md/raid5: more incorrect BUG_ON in handle_stripe_fill.
It is not incorrect to call handle_stripe_fill() when
a batch of full-stripe writes is active.
It is, however, a BUG if fetch_block() then decides
it needs to actually fetch anything.

So move the 'BUG_ON' to where it belongs.

Signed-off-by: NeilBrown  <neilb@suse.de>
Fixes: 59fc630b8b ("RAID5: batch adjacent full stripe write")
2015-05-08 18:46:52 +10:00
NeilBrown f18c1a35f6 md/raid5: new alloc_stripe() to allocate an initialize a stripe.
The new batch_lock and batch_list fields are being initialized in
grow_one_stripe() but not in resize_stripes().  This causes a crash
on resize.

So separate the core initialization into a new function and call it
from both allocation sites.

Signed-off-by: NeilBrown <neilb@suse.de>
Fixes: 59fc630b8b ("RAID5: batch adjacent full stripe write")
2015-05-08 18:40:01 +10:00
Heinz Mauelshagen b6538fe329 md-raid0: conditional mddev->queue access to suit dm-raid
This patch is a prerequisite for dm-raid "raid0" support to allow
dm-raid to access the MD RAID0 personality doing unconditional
accesses to mddev->queue, which is NULL in case of dm-raid stacked on
top of MD.

Most of the conditional mddev->queue accesses made it to upstream but
this missing one, which prohibits md raid0 to set disk stack limits
(being done in dm core in case of md underneath dm).

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Tested-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2015-05-08 18:39:40 +10:00
Zhangfei Gao 4de3bf66c6 mmc: dw_mmc: dw_mci_get_cd check MMC_CAP_NONREMOVABLE
When non-removable is used for emmc,  MMC_CAP_NONREMOVABLE should
also be checked, otherwise detection fail since present=0

Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-05-08 08:55:47 +02:00
Zhangfei Gao 4b24472483 mmc: dw_mmc: init desc in dw_mci_idmac_init
Set 0 to des1 in 32bit case.
Otherwise the random value of des1 will be used in
dw_mci_translate_sglist: IDMAC_SET_BUFFER1_SIZE(desc, length)

Signed-off-by: Fei Wang <w.f@huawei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2015-05-08 08:55:14 +02:00
Linus Torvalds 3e0283a53f Power management and ACPI fixes for v4.1-rc3
- Fix for a PCI resources management regression introduced during
    the 4.0 cycle and related to the handling of ACPI resources'
    Producer/Consumer flags that turn out to be useless (Jiang Liu).
 
  - Fix for a MacBook regression related to the Smart Battery Subsystem
    (SBS) driver causing various problems (stalls on boot, failure to
    detect or report battery) to happen and introduced during the 3.18
    cycle (Chris Bainbridge).
 
  - Fix for an ACPI/PNP device enumeration regression introduced during
    the 3.16 cycle caused by failing to include two PNP device IDs into
    the list of IDs that PNP device objects need to be created for
    (Witold Szczeponik).
 
  - Fixes for two minor mistakes in the ACPI GPIO properties
    documentation (Antonio Ospite, Rafael J Wysocki).
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJVS8ZQAAoJEILEb/54YlRx38QP/1dtmb1eVZZMP+InQ9COisHp
 qYuBRt8FCWCIyd1PZeRXmLVo8UM337mka2pyUpa+hFJoY+TpVku/8WW18ucjI1TU
 sbJSycYoCiATdHpk2qXV9h6SmCq0e0tEePJx90fA9xYXGTGYs1VEhoBLQ6ayuqnF
 gCiWy1wl3OmFEDDIpykW3pSXJf+8y3LcCqqDGdsL3yqNOXKszmzQJn98F5mxnpp6
 XDG9nBdoC17KxRcvO6vzVikFPNu0FAuPO1JO/vzmKyl4fRbxj7ZTGenzwwV+72aH
 i20SS4sIWTLtpxOj0vtDFaJzqdeAl1tZxNJ+06mJoEcJ67l9PpiE/mqWa9qMYLop
 eDz2dDZES7zLgpDT6sY3ofcAVq59SWrEyWvKiiRWtYe5+LAGZrw6RxgV0ZR1QJTy
 UFPvlYVLhIrPnbywl0pLReQU7DM+199v7RzHSABCa/X2ZOI1/W6streM4zRn4y9U
 JlRLnoW0GAFyO9muRGTesnR8J2+umQvdWbaiIkJ4i8H8KmkM4XTtPNruDfykScE5
 9b5NuxR8QyLrBVqz8dqVO9SkeXvbmnoxYKNCZeCWo6bq46Miyx2W+lAZhpnQTAFD
 jlwb+PpDjMu0R2ERmzhJD6lLNlxSjAUJCJP3nAfjPKoIRlSp9+5KrqLS5MeyQbZz
 b/zdMfGlP1CcfyU3Gn4M
 =JFUn
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management and ACPI fixes from Rafael Wysocki:
 "These include three regression fixes (PCI resources management,
  ACPI/PNP device enumeration, ACPI SBS on MacBook) and two ACPI
  documentation fixes related to GPIO.

  Specifics:

   - Fix for a PCI resources management regression introduced during the
     4.0 cycle and related to the handling of ACPI resources'
     Producer/Consumer flags that turn out to be useless (Jiang Liu)

   - Fix for a MacBook regression related to the Smart Battery Subsystem
     (SBS) driver causing various problems (stalls on boot, failure to
     detect or report battery) to happen and introduced during the 3.18
     cycle (Chris Bainbridge)

   - Fix for an ACPI/PNP device enumeration regression introduced during
     the 3.16 cycle caused by failing to include two PNP device IDs into
     the list of IDs that PNP device objects need to be created for
     (Witold Szczeponik)

   - Fixes for two minor mistakes in the ACPI GPIO properties
     documentation (Antonio Ospite, Rafael J Wysocki)"

* tag 'pm+acpi-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PNP: add two IDs to list for PNPACPI device enumeration
  ACPI / documentation: Fix ambiguity in the GPIO properties document
  ACPI / documentation: fix a sentence about GPIO resources
  ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
  x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus
2015-05-07 15:58:00 -07:00
Rafael J. Wysocki 9a5d9315e4 Merge branches 'acpi-resources', 'acpi-battery', 'acpi-doc' and 'acpi-pnp'
* acpi-resources:
  x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus

* acpi-battery:
  ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook

* acpi-doc:
  ACPI / documentation: Fix ambiguity in the GPIO properties document
  ACPI / documentation: fix a sentence about GPIO resources

* acpi-pnp:
  ACPI / PNP: add two IDs to list for PNPACPI device enumeration
2015-05-07 21:24:34 +02:00
Linus Torvalds 68c2f356c9 Merge tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
Pull f2fs fixes from Jaegeuk Kim:
 "Fix a performance regression and a bug"

* tag 'for-f2fs-4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
  f2fs: fix wrong error hanlder in f2fs_follow_link
  Revert "f2fs: enhance multi-threads performance"
2015-05-07 11:18:34 -07:00
Fabio Estevam dc0e3db4ec ARM: multi_v7_defconfig: Select more FSL SoCs
Select IMX50, IMX6SX and LS1021A SoC support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-05-07 18:31:00 +02:00
Nicolas Ferre d68b35f845 MAINTAINERS: replace an AT91 maintainer
As some help is needed from an active maintainer, replace Andrew Victor
by Alexandre Belloni in the ARM/Atmel MAINTAINERS' entry (aka AT91).
Add an entry to the CREDITS file.

Thanks Andrew for the great role you played during the early days of this
product family.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-05-07 18:29:51 +02:00
Mark Salter 454be2af5b drivers: CCI: fix used_mask init in validate_group()
Currently in validate_group(), there is a static initializer
for fake_pmu.used_mask which is based on CPU_BITS_NONE but
the used_mask array size is based on CCI_PMU_MAX_HW_EVENTS.
CCI_PMU_MAX_HW_EVENTS is not based on NR_CPUS, so CPU_BITS_NONE
is not correct and will cause a build failure if NR_CPUS
is set high enough to make CPU_BITS_NONE larger than used_mask.

Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2015-05-07 18:29:18 +02:00
Arnd Bergmann bd1a6e7b47 This fixes an MMC/SD configuration issue present for some time
in the Ux500 DT but triggered by proper error handling in v4.1-rc1.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVP3/HAAoJEEEQszewGV1zl14QALjFq5SHR2sZJMxpXtnPA9+o
 Gh/Xe+zx59VqxVFuxT13zY3YcD1b61DSQ4L8oLkMeNNx4Q3+YV4rl50aLiy3DUxf
 oOHuIObv7rj70sYXVtMXX64mJCjAu9Y4+WAW4kqVrt5mnewptWp29jw7ioum6/+Q
 NXg/qNGwRMmhvcDOybKMfTsro7g6VnB+qMDbm4//IOJlgldS13tUFGhRGdkC0mkM
 pjM0a0bj2hHvkJ6+cvzzId3hcjVZwhqValOMA+rKdFTxarMFxUM3+QskhuVTl3ew
 x+4uvXWmRa+44w4u9DgRXeIBXavpS2CpdqQkvuNPRa9IPD89iFGc5PaU9iCOchg8
 xvN6l1Vm5pYbnmboLyT4aQ7MfFaScodFAQKIAJMUpMDl6CxjujQe7YEviLajuEQr
 mDpap2Nc6Bdo9zcRzZ/PxJIvNXHe/MqAF0unsdTLEgyASrnkawxizLJ5rMsAJfAJ
 ONI2DAafJenCf8wZV0XFzI1L4/UnH76w3r0DETV1YfExr3Wnx2c4ZcPJKXINcp1K
 mle2dKsmN6q300hrOMyMPaykz1ndWhhkfy3d+Y3O8LE+hhjfJbZv+VWAOe0UaN+Q
 pMDCngI+uoM63Vsh5WDe7x3M5AZ2QK3B/gWgwfDQ8KINnejBjfwH9LMnNSqDtdbz
 jNtxHeeGAF86v8dCiXi7
 =2YtL
 -----END PGP SIGNATURE-----

Merge tag 'stericsson-fixes-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into fixes

Merge "Ux500 fixes" from Linus Walleij:

This fixes an MMC/SD configuration issue present for some time
in the Ux500 DT but triggered by proper error handling in v4.1-rc1.

* tag 'stericsson-fixes-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  ARM: ux500: Enable GPIO regulator for SD-card for snowball
  ARM: ux500: Enable GPIO regulator for SD-card for HREF boards
  ARM: ux500: Move GPIO regulator for SD-card into board DTSs
2015-05-07 18:28:04 +02:00
Arnd Bergmann 1e5f9ed00d Renesas ARM Based SoC Fixes for v4.1
* Fix adv7511 IRQ sensing on koelsch board
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVSvu3AAoJENfPZGlqN0++1QcP/jLw1/i6dAPBYj0E74muYVtN
 YfywFWvIQg4SAlJCNF5OZ/PFzofSMkOJQj+DRMUSQm7RRMW5jGMF8MNoL6JxE0VL
 puFUtKIrSn9q72Pn/n50RAFXJQvuo3rXV1Lp52lZRaBbno6tDNsLimkvo+Xvy7zh
 eeEMll5N/pS8P2J44wUAUGQ86yZwlXdcyoNd8vO2x5JXCKrLtybneRBa1nTlnGKL
 kvj9f380ihrWdjD2h0vKsdNBl2CoAPQD+IxcwVKVHZKM0wNmyZkezLPscwrbp8cR
 u2PcukydvPf/pyXmxwc2vi1xgNV4sX4RSKHRapbJOFwdwnBrXcR+FWF8d6M+xHh4
 oe0i/IjmH0VqwdGavY4qJAXnkLAlpvTJFU/ZsqjN7ac3bPCGzRgKOwNAF7A+xvhF
 9ElP+ikj4qJE+VpK3tpQQ6a941lded5D/i1zxPLmZYzUQjriKdPW+mVQasnJqmXo
 fVgOInrbpcW2tFOwkkkvnRPvNR3sSY+40SydIMrYnSaAD1fjCcs+BKUExEKJLXfC
 vQ7yIigJXhTWFP2vop49rNosohAfTyATgyzPUW62OIuq4Z3ejOrK9WuYlm4csB8O
 pa2fZzFl8m217MseB/ZJSky9LK8jrwi5Ip1MWAMfF+lq6oU5l22E1tcHuOsTisu2
 47KU9zwFfxMS/nGEZvgY
 =9mf9
 -----END PGP SIGNATURE-----

Merge tag 'renesas-fixes-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes

Merge "Renesas ARM Based SoC Fixes for v4.1" from Simon Horman:

* Fix adv7511 IRQ sensing on koelsch board

* tag 'renesas-fixes-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: koelsch: Fix adv7511 IRQ sensing
2015-05-07 18:26:48 +02:00