Add some fixes already applied to jessie

svn path=/dists/sid/linux/; revision=22692
This commit is contained in:
Ben Hutchings 2015-05-25 01:05:34 +00:00
parent e9f9658f33
commit a6d6bb9297
5 changed files with 142 additions and 0 deletions

5
debian/changelog vendored
View File

@ -146,6 +146,11 @@ linux (4.0.4-1) UNRELEASED; urgency=medium
* md/raid0: fix restore to sector variable in raid0_make_request
(Closes: #786372) (regression in 4.0.2)
* [x86] e1000e: Add support for Sunrise Point (i219) (Closes: #784546)
* [x86] config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
(Closes: #786551)
* cdc_ncm: Fix tx_bytes statistics (regression in 4.0)
* [armhf] USB: musb: Fix order of conditions for assigning end point
operations (regression in 3.19)
[ Ian Campbell ]
* [armhf+arm64] Enabled generic SYSCON regmap reset driver

View File

@ -0,0 +1,35 @@
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
Date: Fri, 22 May 2015 13:15:22 +0200
Subject: cdc_ncm: Fix tx_bytes statistics
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Origin: https://git.kernel.org/linus/44f6731d8b68fa02f5ed65eaceac41f8c3c9279e
The tx_curr_frame_payload field is u32. When we try to calculate a
small negative delta based on it, we end up with a positive integer
close to 2^32 instead. So the tx_bytes pointer increases by about
2^32 for every transmitted frame.
Fix by calculating the delta as a signed long.
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Reported-by: Florian Bruhin <me@the-compiler.org>
Fixes: 7a1e890e2168 ("usbnet: Fix tx_bytes statistic running backward in cdc_ncm")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/usb/cdc_ncm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1178,7 +1178,7 @@ cdc_ncm_fill_tx_frame(struct usbnet *dev
* payload data instead.
*/
usbnet_set_skb_tx_stats(skb_out, n,
- ctx->tx_curr_frame_payload - skb_out->len);
+ (long)ctx->tx_curr_frame_payload - skb_out->len);
return skb_out;

View File

@ -0,0 +1,45 @@
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 24 May 2015 04:21:46 +0100
Subject: USB: musb: Fix order of conditions for assigning end point operations
Forwarded: http://mid.gmane.org/1432438052.12412.98.camel@decadent.org.uk
Currently we always assign one of the two common implementations of
ep_offset and ep_select operations, overwriting any platform-specific
implementations.
Fixes: d026e9c76aac ("usb: musb: Change end point selection to use new IO access")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/musb/musb_core.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2026,13 +2026,7 @@ musb_init_controller(struct device *dev,
if (musb->ops->quirks)
musb->io.quirks = musb->ops->quirks;
- /* At least tusb6010 has it's own offsets.. */
- if (musb->ops->ep_offset)
- musb->io.ep_offset = musb->ops->ep_offset;
- if (musb->ops->ep_select)
- musb->io.ep_select = musb->ops->ep_select;
-
- /* ..and some devices use indexed offset or flat offset */
+ /* Most devices use indexed offset or flat offset */
if (musb->io.quirks & MUSB_INDEXED_EP) {
musb->io.ep_offset = musb_indexed_ep_offset;
musb->io.ep_select = musb_indexed_ep_select;
@@ -2041,6 +2035,12 @@ musb_init_controller(struct device *dev,
musb->io.ep_select = musb_flat_ep_select;
}
+ /* At least tusb6010 has its own offsets */
+ if (musb->ops->ep_offset)
+ musb->io.ep_offset = musb->ops->ep_offset;
+ if (musb->ops->ep_select)
+ musb->io.ep_select = musb->ops->ep_select;
+
if (musb->ops->fifo_mode)
fifo_mode = musb->ops->fifo_mode;
else

View File

@ -0,0 +1,54 @@
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date: Fri, 17 Apr 2015 15:04:48 -0400
Subject: config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
Origin: https://git.kernel.org/linus/a6dfa128ce5c414ab46b1d690f7a1b8decb8526d
Bug-Debian: https://bugs.debian.org/786551
A huge amount of NIC drivers use the DMA API, however if
compiled under 32-bit an very important part of the DMA API can
be ommitted leading to the drivers not working at all
(especially if used with 'swiotlb=force iommu=soft').
As Prashant Sreedharan explains it: "the driver [tg3] uses
DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of
the dma "mapping" and dma_unmap_addr() to get the "mapping"
value. On most of the platforms this is a no-op, but ... with
"iommu=soft and swiotlb=force" this house keeping is required,
... otherwise we pass 0 while calling pci_unmap_/pci_dma_sync_
instead of the DMA address."
As such enable this even when using 32-bit kernels.
Reported-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Prashant Sreedharan <prashant@broadcom.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Chan <mchan@broadcom.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boris.ostrovsky@oracle.com
Cc: cascardo@linux.vnet.ibm.com
Cc: david.vrabel@citrix.com
Cc: sanjeevb@broadcom.com
Cc: siva.kallam@broadcom.com
Cc: vyasevich@gmail.com
Cc: xen-devel@lists.xensource.com
Link: http://lkml.kernel.org/r/20150417190448.GA9462@l.oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -177,7 +177,7 @@ config SBUS
config NEED_DMA_MAP_STATE
def_bool y
- depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG
+ depends on X86_64 || INTEL_IOMMU || DMA_API_DEBUG || SWIOTLB
config NEED_SG_DMA_LENGTH
def_bool y

View File

@ -77,3 +77,6 @@ features/all/e1000e/0001-e1000e-initial-support-for-i219.patch
features/all/e1000e/0002-e1000e-fix-obscure-comments.patch
features/all/e1000e/0003-e1000e-remove-calls-to-ioremap-unmap-for-nvm-addr.patch
features/all/e1000e/0004-e1000e-nvm-write-protect-access-removed-from-spt-hw.patch
bugfix/x86/config-enable-need_dma_map_state-by-default-when-swi.patch
bugfix/all/cdc_ncm-fix-tx_bytes-statistics.patch
bugfix/all/musb-musb-fix-order-of-conditions-for-assigning-end-p.patch