Revert "net: stmmac: add platform init/exit for Altera's ARM socfpga"

This reverts commit 0acf16768740776feffac506ce93b1c06c059ac6.

Breaks the build due to missing reference to phy_resume in
the resulting dwmac-socfpga.o object.

Signed-off-by: David S. Miller <davem@davemloft.net>
net: qmi_wwan: Add ID for Telewell TW-LTE 4G v2

There's a new version of the Telewell 4G modem working with, but not
recognized by this driver.

Signed-off-by: Bernd Wachter <bernd.wachter@jolla.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Merge branch 'fixes' into for-next

* fixes:
  ARM: EXYNOS: Update secondary boot addr for secure mode
  clocksource: exynos_mct: Register the timer for stable udelay
  clocksource: exynos_mct: Fix ftrace
  ARM: dts: fix pwm-cells in pwm node for exynos4
  ARM: EXYNOS: Fix the check for non-smp configuration
  ARM: shmobile: Add DT and defconfigs to MAINTAINERS
net: Fix NETDEV_CHANGE notifier usage causing spurious arp flush

A bug was introduced in NETDEV_CHANGE notifier sequence causing the
arp table to be sometimes spuriously cleared (including manual arp
entries marked permanent), upon network link carrier changes.

The changed argument for the notifier was applied only to a single
caller of NETDEV_CHANGE, missing among others netdev_state_change().
So upon net_carrier events induced by the network, which are
triggering a call to netdev_state_change(), arp_netdev_event() would
decide whether to clear or not arp cache based on random/junk stack
values (a kind of read buffer overflow).

Fixes: be9efd365328 ("net: pass changed flags along with NETDEV_CHANGE event")
Fixes: 6c8b4e3ff81b ("arp: flush arp cache on IFF_NOARP change")
Signed-off-by: Loic Prylli <loicp@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
igmp: fix the problem when mc leave group

The problem was triggered by these steps:

1) create socket, bind and then setsockopt for add mc group.
   mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
   mreq.imr_interface.s_addr = inet_addr("192.168.1.2");
   setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));

2) drop the mc group for this socket.
   mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
   mreq.imr_interface.s_addr = inet_addr("0.0.0.0");
   setsockopt(sockfd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq));

3) and then drop the socket, I found the mc group was still used by the dev:

   netstat -g

   Interface       RefCnt Group
   --------------- ------ ---------------------
   eth2		   1	  255.0.0.37

Normally even though the IP_DROP_MEMBERSHIP return error, the mc group still need
to be released for the netdev when drop the socket, but this process was broken when
route default is NULL, the reason is that:

The ip_mc_leave_group() will choose the in_dev by the imr_interface.s_addr, if input addr
is NULL, the default route dev will be chosen, then the ifindex is got from the dev,
then polling the inet->mc_list and return -ENODEV, but if the default route dev is NULL,
the in_dev and ifIndex is both NULL, when polling the inet->mc_list, the mc group will be
released from the mc_list, but the dev didn't dec the refcnt for this mc group, so
when dropping the socket, the mc_list is NULL and the dev still keep this group.

v1->v2: According Hideaki's suggestion, we should align with IPv6 (RFC3493) and BSDs,
	so I add the checking for the in_dev before polling the mc_list, make sure when
	we remove the mc group, dec the refcnt to the real dev which was using the mc address.
	The problem would never happened again.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mlx4_en: Don't configure the HW vxlan parser when vxlan offloading isn't set

The add_vxlan_port ndo driver code was wrongly testing whether HW vxlan offloads
are supported by the device instead of checking if they are currently enabled.

This causes the driver to configure the HW parser to conduct matching for vxlan
packets but since no steering rules were set, vxlan packets are dropped on RX.

Fix that by doing the right test, as done in the del_vxlan_port ndo handler.

Fixes: 1b136de ('net/mlx4: Implement vxlan ndo calls')
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tcp: fix false undo corner cases

The undo code assumes that, upon entering loss recovery, TCP
1) always retransmit something
2) the retransmission never fails locally (e.g., qdisc drop)

so undo_marker is set in tcp_enter_recovery() and undo_retrans is
incremented only when tcp_retransmit_skb() is successful.

When the assumption is broken because TCP's cwnd is too small to
retransmit or the retransmit fails locally. The next (DUP)ACK
would incorrectly revert the cwnd and the congestion state in
tcp_try_undo_dsack() or tcp_may_undo(). Subsequent (DUP)ACKs
may enter the recovery state. The sender repeatedly enter and
(incorrectly) exit recovery states if the retransmits continue to
fail locally while receiving (DUP)ACKs.

The fix is to initialize undo_retrans to -1 and start counting on
the first retransmission. Always increment undo_retrans even if the
retransmissions fail locally because they couldn't cause DSACKs to
undo the cwnd reduction.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Merge tag 'versatile-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next/soc

Merge "DT IRQ and clock support for Versatile platforms" from Rob Herring.

This branch moves IRQ and clock support over to DT for the versatile
platforms.

* tag 'versatile-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  clk: versatile: add versatile OSC support
  dts: versatile: add clock tree
  ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock
  dt/bindings: add compatible string for versatile osc clock
  dt/bindings: arm-boards: add binding for Versatile core module
  dts: versatile: add pl180 compatible strings
  ARM: versatile: remove init_irq hook for DT boot
  ARM: integrator: convert to use irqchip_init
  irqchip: versatile-fpga: add support for arm,versatile-sic
  irqchip: versatile-fpga: Add IRQCHIP_DECLARE support
  dts: versatile: add missing irq controller properties

Tested-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Olof Johansson <olof@lixom.net>
Merge tag 'renesas-soc-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Updates for v3.17" from Simon Horman:

- Use shmobile_init_late on r8a7791 and r8a7790 whien booting using DT-only
- Support Core-Standby for Suspend to RAM on r8a7791 and r8a7790 SoCs
- Shared CMA reservation for R-Car Gen2 SoCs
- Add r8a7791 SYSC power management support

* tag 'renesas-soc-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Remove ARCH_HAS_CPUFREQ config for shmobile
  ARM: shmobile: rcar-gen2: update call to dma_contiguous_reserve_area
  ARM: shmobile: rcar-gen2: correct return value of shmobile_smp_apmu_suspend_init
  ARM: shmobile: rcar-gen2: Remove useless copied section for LongTrail
  ARM: shmobile: rcar-gen2: Use "1ULL" instead of "(u64)1"
  ARM: shmobile: rcar-gen2: Update for of_get_flat_dt_prop() update
  ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
  ARM: shmobile: Use shmobile_init_late() on r8a7791 DT-only
  ARM: shmobile: Use shmobile_init_late() on r8a7790 DT-only
  ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable
  ARM: shmobile: r8a7791: Support Core-Standby for Suspend to RAM
  ARM: shmobile: r8a7790: Support Core-Standby for Suspend to RAM
  ARM: shmobile: APMU: Add Core-Standby-state for Suspend to RAM
  ARM: shmobile: r8a7791 SYSC setup code

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge tag 'renesas-boards-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards

Merge "Renesas ARM Based SoC Boards Updates for v3.17" from Simon Horman:

- armadillo800eva LED support
- Remove now unnecessary work arounds for c\lock issues
- Enable R-Car Gen2 CMA code

* tag 'renesas-boards-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Enable R-Car Gen2 CMA code in board files
  ARM: shmobile: armadillo800eva reference: Spelling s/ED/LED/
  ARM: shmobile: armadillo800eva legacy: Add LED support
  ARM: shmobile: lager-reference: Remove workarounds for core clock issues
  ARM: shmobile: koelsch-reference: Remove workarounds for core clock issues

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/soc' into for-next

* next/soc: (25 commits)
  clk: versatile: add versatile OSC support
  dts: versatile: add clock tree
  ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock
  dt/bindings: add compatible string for versatile osc clock
  dt/bindings: arm-boards: add binding for Versatile core module
  dts: versatile: add pl180 compatible strings
  ARM: versatile: remove init_irq hook for DT boot
  ARM: integrator: convert to use irqchip_init
  irqchip: versatile-fpga: add support for arm,versatile-sic
  irqchip: versatile-fpga: Add IRQCHIP_DECLARE support
  dts: versatile: add missing irq controller properties
  ARM: shmobile: Remove ARCH_HAS_CPUFREQ config for shmobile
  ARM: shmobile: rcar-gen2: update call to dma_contiguous_reserve_area
  ARM: shmobile: rcar-gen2: correct return value of shmobile_smp_apmu_suspend_init
  ARM: shmobile: rcar-gen2: Remove useless copied section for LongTrail
  ARM: shmobile: rcar-gen2: Use "1ULL" instead of "(u64)1"
  ARM: shmobile: rcar-gen2: Update for of_get_flat_dt_prop() update
  ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
  ARM: shmobile: Use shmobile_init_late() on r8a7791 DT-only
  ARM: shmobile: Use shmobile_init_late() on r8a7790 DT-only
  ...
Merge branch 'next/boards' into for-next

* next/boards:
  ARM: shmobile: Enable R-Car Gen2 CMA code in board files
  ARM: shmobile: armadillo800eva reference: Spelling s/ED/LED/
  ARM: shmobile: armadillo800eva legacy: Add LED support
  ARM: shmobile: lager-reference: Remove workarounds for core clock issues
  ARM: shmobile: koelsch-reference: Remove workarounds for core clock issues
Merge tag 'versatile-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into next/cleanup

Merge "First pull request of Versatile family clean-ups for v3.17" from Linus
Walleij:

- Remove <mach/memory.h> from the Integrator, paving the
  road for multiplatform.
- Push the CLCD helper code down into the framebuffer subsystem,
  removing the last hook in plat-versatile for the Integrator,
  also paving the road for multiplatform.

Patches tested on Integrator/AP, Integrator/CP and Versatile AB
(all real hardware).

* tag 'versatile-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator:
  video: move Versatile CLCD helpers
  ARM: integrator: get rid of <mach/memory.h>

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/cleanup' into for-next

* next/cleanup:
  video: move Versatile CLCD helpers
  ARM: integrator: get rid of <mach/memory.h>
Merge tag 'mvebu-soc-3.17' of git://git.infradead.org/linux-mvebu into next/soc

Merge "mvebu SoC changes for v3.17" from Jason Cooper:

- kirkwood
  * add setup file for netxbig LEDs (non-trivial DT binding doesn't exist yet)

- mvebu
  * staticize where needed
  * add CPU hotplug for Armada XP
  * add public datasheet for Armada 370
  * don't apply thermal quirk by default
  * get SoC ID from the system controller when possible

* tag 'mvebu-soc-3.17' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Staticize mvebu_cpu_reset_init
  ARM: mvebu: Staticize armada_370_xp_cpu_pm_init
  ARM: mvebu: Staticize armada_375_smp_cpu1_enable_wa
  ARM: mvebu: Use system controller to get the soc id when possible
  ARM: mvebu: Use the a standard errno in mvebu_get_soc_id
  ARM: mvebu: Don't apply the thermal quirk if the SoC revision is unknown
  Documentation: arm: add URLs to public datasheets for the Marvell Armada 370 SoC
  ARM: mvebu: implement CPU hotplug support for Armada XP
  ARM: mvebu: export PMSU idle enter/exit functions
  ARM: mvebu: slightly refactor/rename PMSU idle related functions
  ARM: mvebu: remove stub implementation of CPU hotplug on Armada 375/38x
  ARM: Kirkwood: Add setup file for netxbig LEDs
  ARM: mvebu: mark armada_370_xp_pmsu_idle_prepare() as static

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge tag 'mvebu-defconfig-3.17' of git://git.infradead.org/linux-mvebu into next/defconfig

Merge "mvebu defconfig changes for v3.17" from Jason Cooper:

- mvebu (v5)
  * add LaCie 2Big and 5Big Network v2

- multi (v5)
  * add LaCie 2Big and 5Big Network v2

* tag 'mvebu-defconfig-3.17' of git://git.infradead.org/linux-mvebu:
  ARM: multi_v5: Enable LaCie 2Big and 5Big Network v2
  ARM: mvebu: Add LaCie 2Big and 5Big Network v2

Signed-off-by: Olof Johansson <olof@lixom.net>
Merge branch 'next/soc' into for-next

* next/soc:
  ARM: mvebu: Staticize mvebu_cpu_reset_init
  ARM: mvebu: Staticize armada_370_xp_cpu_pm_init
  ARM: mvebu: Staticize armada_375_smp_cpu1_enable_wa
  ARM: mvebu: Use system controller to get the soc id when possible
  ARM: mvebu: Use the a standard errno in mvebu_get_soc_id
  ARM: mvebu: Don't apply the thermal quirk if the SoC revision is unknown
  Documentation: arm: add URLs to public datasheets for the Marvell Armada 370 SoC
  ARM: mvebu: implement CPU hotplug support for Armada XP
  ARM: mvebu: export PMSU idle enter/exit functions
  ARM: mvebu: slightly refactor/rename PMSU idle related functions
  ARM: mvebu: remove stub implementation of CPU hotplug on Armada 375/38x
  ARM: Kirkwood: Add setup file for netxbig LEDs
  ARM: mvebu: mark armada_370_xp_pmsu_idle_prepare() as static
Merge branch 'next/defconfig' into for-next

* next/defconfig:
  ARM: multi_v5: Enable LaCie 2Big and 5Big Network v2
  ARM: mvebu: Add LaCie 2Big and 5Big Network v2
Merge branch 'fixes' into for-next

* fixes:
  ARM: imx: fix shared gate clock
arm-soc: document merges

Signed-off-by: Olof Johansson <olof@lixom.net>