--- /dev/null
+From 7ffd7b4e169d619e66928fe5d997723f2c6f1056 Mon Sep 17 00:00:00 2001
+From: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+Date: Sun, 18 Jan 2015 20:01:40 +0100
+Subject: can: c_can: end pending transmission on network stop (ifdown)
+
+From: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+
+commit 7ffd7b4e169d619e66928fe5d997723f2c6f1056 upstream.
+
+Put controller into init mode in network stop to end pending transmissions. The
+issue is observed in cases when transmitted frame is not acked.
+
+Signed-off-by: Viktor Babrian <babrian.viktor@renyi.mta.hu>
+Cc: linux-stable <stable@vger.kernel.org>
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/can/c_can/c_can.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/can/c_can/c_can.c
++++ b/drivers/net/can/c_can/c_can.c
+@@ -611,6 +611,10 @@ static void c_can_stop(struct net_device
+ struct c_can_priv *priv = netdev_priv(dev);
+
+ c_can_irq_control(priv, false);
++
++ /* put ctrl to init on stop to end ongoing transmission */
++ priv->write_reg(priv, C_CAN_CTRL_REG, CONTROL_INIT);
++
+ priv->can.state = CAN_STATE_STOPPED;
+ }
+
--- /dev/null
+From d6ad36913083d683aad4e02e53580c995f1a6ede Mon Sep 17 00:00:00 2001
+From: Catalin Marinas <catalin.marinas@arm.com>
+Date: Wed, 10 Dec 2014 11:02:09 +0000
+Subject: clocksource: arch_timer: Only use the virtual counter
+ (CNTVCT) on arm64
+
+From: Catalin Marinas <catalin.marinas@arm.com>
+
+commit d6ad36913083d683aad4e02e53580c995f1a6ede upstream.
+
+Commit 0b46b8a718c6 (clocksource: arch_timer: Fix code to use physical
+timers when requested) introduces the use of physical counters in the
+ARM architected timer driver. However, he arm64 kernel uses CNTVCT in
+VDSO. When booting in EL2, the kernel switches to the physical timers to
+make things easier for KVM but it continues to use the virtual counter
+both in user and kernel. While in such scenario CNTVCT == CNTPCT (since
+CNTVOFF is initialised by the kernel to 0), we want to spot firmware
+bugs corrupting CNTVOFF early (which would affect CNTVCT).
+
+Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
+Tested-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
+Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Arnd Bergmann <arnd@arndb.de>
+Fixes: 0b46b8a718c6 ("clocksource: arch_timer: Fix code to use physical
+timers when requested")
+Cc: Ian Campbell <ijc@hellion.org.uk>
+Signed-off-by: Mark Rutland <mark.rutland@arm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/clocksource/arm_arch_timer.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -462,7 +462,7 @@ static void __init arch_counter_register
+
+ /* Register the CP15 based counter if we have one */
+ if (type & ARCH_CP15_TIMER) {
+- if (arch_timer_use_virtual)
++ if (IS_ENABLED(CONFIG_ARM64) || arch_timer_use_virtual)
+ arch_timer_read_counter = arch_counter_get_cntvct;
+ else
+ arch_timer_read_counter = arch_counter_get_cntpct;
--- /dev/null
+From a4dba130891271084344c12537731542ec77cb85 Mon Sep 17 00:00:00 2001
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Date: Fri, 21 Nov 2014 11:07:39 +0000
+Subject: xen/arm/arm64: introduce xen_arch_need_swiotlb
+
+From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+
+commit a4dba130891271084344c12537731542ec77cb85 upstream.
+
+Introduce an arch specific function to find out whether a particular dma
+mapping operation needs to bounce on the swiotlb buffer.
+
+On ARM and ARM64, if the page involved is a foreign page and the device
+is not coherent, we need to bounce because at unmap time we cannot
+execute any required cache maintenance operations (we don't know how to
+find the pfn from the mfn).
+
+No change of behaviour for x86.
+
+Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
+Reviewed-by: David Vrabel <david.vrabel@citrix.com>
+Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
+Acked-by: Ian Campbell <ian.campbell@citrix.com>
+Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/arm/include/asm/xen/page.h | 4 ++++
+ arch/arm/xen/mm.c | 7 +++++++
+ arch/x86/include/asm/xen/page.h | 7 +++++++
+ drivers/xen/swiotlb-xen.c | 5 ++++-
+ 4 files changed, 22 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/include/asm/xen/page.h
++++ b/arch/arm/include/asm/xen/page.h
+@@ -107,4 +107,8 @@ static inline bool set_phys_to_machine(u
+ #define xen_remap(cookie, size) ioremap_cache((cookie), (size))
+ #define xen_unmap(cookie) iounmap((cookie))
+
++bool xen_arch_need_swiotlb(struct device *dev,
++ unsigned long pfn,
++ unsigned long mfn);
++
+ #endif /* _ASM_ARM_XEN_PAGE_H */
+--- a/arch/arm/xen/mm.c
++++ b/arch/arm/xen/mm.c
+@@ -16,6 +16,13 @@
+ #include <asm/xen/hypercall.h>
+ #include <asm/xen/interface.h>
+
++bool xen_arch_need_swiotlb(struct device *dev,
++ unsigned long pfn,
++ unsigned long mfn)
++{
++ return (pfn != mfn);
++}
++
+ int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
+ unsigned int address_bits,
+ dma_addr_t *dma_handle)
+--- a/arch/x86/include/asm/xen/page.h
++++ b/arch/x86/include/asm/xen/page.h
+@@ -236,4 +236,11 @@ void make_lowmem_page_readwrite(void *va
+ #define xen_remap(cookie, size) ioremap((cookie), (size));
+ #define xen_unmap(cookie) iounmap((cookie))
+
++static inline bool xen_arch_need_swiotlb(struct device *dev,
++ unsigned long pfn,
++ unsigned long mfn)
++{
++ return false;
++}
++
+ #endif /* _ASM_X86_XEN_PAGE_H */
+--- a/drivers/xen/swiotlb-xen.c
++++ b/drivers/xen/swiotlb-xen.c
+@@ -397,7 +397,9 @@ dma_addr_t xen_swiotlb_map_page(struct d
+ * buffering it.
+ */
+ if (dma_capable(dev, dev_addr, size) &&
+- !range_straddles_page_boundary(phys, size) && !swiotlb_force) {
++ !range_straddles_page_boundary(phys, size) &&
++ !xen_arch_need_swiotlb(dev, PFN_DOWN(phys), PFN_DOWN(dev_addr)) &&
++ !swiotlb_force) {
+ /* we are not interested in the dma_addr returned by
+ * xen_dma_map_page, only in the potential cache flushes executed
+ * by the function. */
+@@ -555,6 +557,7 @@ xen_swiotlb_map_sg_attrs(struct device *
+ dma_addr_t dev_addr = xen_phys_to_bus(paddr);
+
+ if (swiotlb_force ||
++ xen_arch_need_swiotlb(hwdev, PFN_DOWN(paddr), PFN_DOWN(dev_addr)) ||
+ !dma_capable(hwdev, dev_addr, sg->length) ||
+ range_straddles_page_boundary(paddr, sg->length)) {
+ phys_addr_t map = swiotlb_tbl_map_single(hwdev,