core/linux-armv7-rc 3.18.rc7-1

This commit is contained in:
Kevin Mihelich 2014-12-02 06:13:51 +00:00
parent 7e95860434
commit eccbbd0056
3 changed files with 67 additions and 10 deletions

View file

@ -0,0 +1,57 @@
From 3c583f70a8e2feda03db77d2c8e9a41d302ac657 Mon Sep 17 00:00:00 2001
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 12 Nov 2014 23:10:08 +0100
Subject: [PATCH] mmc: mvsdio: Work around broken TX DMA
In order to use the mvsdio driver for sdio, it has been necessary to
use a module parameter to disable DMA so to force PIO is used. It is
then possible to use wireless LAN devices like mwifiex found on
topkick and mirabox. However, accessing an MMC SD card does work with
DMA.
Investigation has shown that MMC block device accesses are always
aligned to 64 byte boundaries, where as transfers from mwifiex are
rarely more than word aligned. It has also been determined that card
to host transfers work with DMA for SDIO devices, but host to card
transfers with DMA have problems.
This patch extends the current checks for buffers which are not word
aligned or multiple of words. All host to card transfers which are not
64 byte aligned are now also performed via PIO. This should not affect
the performance of SD cards, but allow sdio devices to work out of the
box, and they are likely to be more efficient since DMA will be used
for card to host transfers.
Tested on mirabox for wifi via mwifiex
Tested on 370 RD for file systems on an SD card.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/host/mvsdio.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 6b4c5ad..4f8618f 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -111,10 +111,15 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data)
mvsd_write(MVSD_BLK_COUNT, data->blocks);
mvsd_write(MVSD_BLK_SIZE, data->blksz);
- if (nodma || (data->blksz | data->sg->offset) & 3) {
+ if (nodma || (data->blksz | data->sg->offset) & 3 ||
+ ((!(data->flags & MMC_DATA_READ) && data->sg->offset & 0x3f))) {
/*
* We cannot do DMA on a buffer which offset or size
* is not aligned on a 4-byte boundary.
+ *
+ * It also appears the host to card DMA can corrupt
+ * data when the buffer is not aligned on a 64 byte
+ * boundary.
*/
host->pio_size = data->blocks * data->blksz;
host->pio_ptr = sg_virt(data->sg);
--
2.1.3

View file

@ -4,7 +4,7 @@
buildarch=4
_rcver=3.18
_rcrel=6
_rcrel=7
_rcnrel=armv7-x2
pkgbase=linux-armv7-rc
@ -26,16 +26,18 @@ source=("http://www.kernel.org/pub/linux/kernel/v3.x/${_srcname}.tar.xz"
'0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
'0003-SMILE-Plug-device-tree-file.patch'
'0004-fix-mvsdio-eMMC-timing.patch'
'0001-mmc-mvsdio-Work-around-broken-TX-DMA.patch'
'config')
md5sums=('fb30d0f29214d75cddd2faa94f73d5cf'
'fcfb06d0d29d6f51d79bcd4c2c4e622c'
'67542f665e9e64977cc90c972904561f'
'3f67a949be63d47b6286ec63e6194e54'
'11f251b44132f76e415f361f1922b65a'
'SKIP'
'bf5c78900f42d0ae6b7f45d8b88ba7f8'
'4e54599d103d95f9eadd3a4c6a413da0'
'11889f6e6873f79059c5d9bf3fcc0cf8'
'e728042f0d32a7d2e0610ed3eaf4ad52'
'1194dc833774a62c85572b2d4256747c')
'8470443040fce04fec4411aa7ddd9f51'
'88ad293719264dcb3ad58a35cc698735')
prepare() {
cd "${srcdir}/${_srcname}"
@ -51,6 +53,7 @@ prepare() {
git apply ../0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch
git apply ../0003-SMILE-Plug-device-tree-file.patch
git apply ../0004-fix-mvsdio-eMMC-timing.patch
git apply ../0001-mmc-mvsdio-Work-around-broken-TX-DMA.patch
# AUFS patches
cp -ru "${srcdir}/aufs3-standalone/Documentation" .

View file

@ -1,6 +1,6 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 3.18.0-rc6-1 Kernel Configuration
# Linux/arm 3.18.0-rc7-1 Kernel Configuration
#
CONFIG_ARM=y
CONFIG_ARM_HAS_SG_CHAIN=y
@ -2248,10 +2248,10 @@ CONFIG_NET_VENDOR_I825XX=y
# CONFIG_IP1000 is not set
# CONFIG_JME is not set
CONFIG_NET_VENDOR_MARVELL=y
CONFIG_MV643XX_ETH=m
CONFIG_MV643XX_ETH=y
CONFIG_MVMDIO=y
CONFIG_MVNETA=m
# CONFIG_MVPP2 is not set
CONFIG_MVPP2=m
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
CONFIG_NET_VENDOR_MELLANOX=y
@ -4280,9 +4280,6 @@ CONFIG_DVB_AF9033=m
#
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_GPU_VIVANTE_V4=y
CONFIG_GPU_VIVANTE_PROFILER=y
# CONFIG_GPU_VIVANTE_DEBUG is not set
CONFIG_TEGRA_HOST1X=y
CONFIG_TEGRA_HOST1X_FIREWALL=y
CONFIG_IMX_IPUV3_CORE=m