mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
core/linux-kirkwood-dt add mvsdio TX DMA workaround
This commit is contained in:
parent
37d50cca10
commit
b8972dd674
2 changed files with 29 additions and 3 deletions
|
@ -7,7 +7,7 @@ pkgbase=linux-kirkwood-dt
|
|||
_kernelname=${pkgbase#linux}
|
||||
_desc="Marvell Kirkwood DT"
|
||||
pkgver=3.18
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
cryptodev_commit=6aa62a2c320b04f55fdfe0ed015c3d9b48997239
|
||||
bfqver=v7r6
|
||||
|
||||
|
@ -30,7 +30,8 @@ source=("ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-${pkgver}.tar.xz"
|
|||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${pkgver:0:4}.0-${bfqver}/0002-block-introduce-the-BFQ-${bfqver}-I-O-sched-for-${pkgver:0:4}.patch"
|
||||
"http://algo.ing.unimo.it/people/paolo/disk_sched/patches/${pkgver:0:4}.0-${bfqver}/0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-${bfqver}-for-${pkgver:0:4}.0.patch"
|
||||
'goflexhome_dtb.patch'
|
||||
'pogo_e02_dtb.patch')
|
||||
'pogo_e02_dtb.patch'
|
||||
'mvsdio TX DMA workaround.patch')
|
||||
|
||||
md5sums=('9e854df51ca3fef8bfe566dbd7b89241'
|
||||
'eb9f27ba750e4b4a31cb76c65cfc221f'
|
||||
|
@ -44,7 +45,8 @@ md5sums=('9e854df51ca3fef8bfe566dbd7b89241'
|
|||
'22ef862652608c8d6b07536e990d4bcb'
|
||||
'b031b1aafd416453d1c8579bd6823fca'
|
||||
'e42c64b6f4b54f382cf3d7e8d82968f1'
|
||||
'341f8164dad19b6baf05d764a800862a')
|
||||
'341f8164dad19b6baf05d764a800862a'
|
||||
'fd50ede1d3bfdd4b00a3c830ebf2db0d')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/linux-${pkgver}"
|
||||
|
@ -70,6 +72,9 @@ msg2 "Add the USB_QUIRK_RESET_RESUME for several webcams"
|
|||
# FS#26528
|
||||
patch -Np1 -i "${srcdir}/usb-add-reset-resume-quirk-for-several-webcams.patch"
|
||||
|
||||
msg2 "Work around broken TX DMA in mvsdio"
|
||||
patch -Np1 -i "${srcdir}/mvsdio TX DMA workaround.patch"
|
||||
|
||||
msg2 "Add Arch Linux ARM patch for ARMv5te plug computers, mach-types"
|
||||
patch -Np1 -i "${srcdir}/archlinuxarm.patch"
|
||||
cp "${srcdir}/mach-types" arch/arm/tools
|
||||
|
|
21
core/linux-kirkwood-dt/mvsdio TX DMA workaround.patch
Normal file
21
core/linux-kirkwood-dt/mvsdio TX DMA workaround.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
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);
|
Loading…
Reference in a new issue