* [meta-fsl-arm/V2][PATCH 1/2] linux-imx_3.14.28: fix initial MMC device detection
2015-06-08 12:48 [meta-fsl-arm/V2][PATCH 0/2] linux-imx-3.14.28 important bugfixes by applying mainline patches Andreas Müller
@ 2015-06-08 12:48 ` Andreas Müller
2015-06-08 16:19 ` Eric Nelson
2015-06-08 12:48 ` [meta-fsl-arm/V2][PATCH 2/2] linux-imx-3.14.28: FEC: fix garbage send for huge data blocks Andreas Müller
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Müller @ 2015-06-08 12:48 UTC (permalink / raw)
To: meta-freescale
On Variscite Varsom we have three devices connected to MMC
* MMC1: eMMC
* MMC2: SDCard
* MMC3: Wifi
Without this patch only the first device was detected properly.
I found two workarounds which can be removed by this patch:
1. Variscite: booting from SDCard made possible by renumbering MMC devices [1].
2. BoundaryDevices: Add workqueues for each mmc_host [2]. This had been tested
here too but causes crashing sdcard for huge storage traffic.
[1] https://github.com/varigit/linux-2.6-imx/blob/imx_3.10.53_1.1.0_ga_var01/arch/arm/boot/dts/imx6qdl.dtsi / Line 879
[2] https://github.com/boundarydevices/linux-imx6/commit/1d40159a995a298f16901bfb14ae3e0294c65691
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
...sdhc-imx-Fixup-runtime-PM-conditions-duri.patch | 36 ++++++++++++++++++++++
recipes-kernel/linux/linux-imx_3.14.28.bb | 1 +
2 files changed, 37 insertions(+)
create mode 100644 recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch
diff --git a/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch b/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch
new file mode 100644
index 0000000..0d3caa4
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-3.14.28/0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch
@@ -0,0 +1,36 @@
+From 77903c01d8c6c5d2544085ba074aceadc1191d21 Mon Sep 17 00:00:00 2001
+From: Ulf Hansson <ulf.hansson@linaro.org>
+Date: Thu, 11 Dec 2014 15:12:25 +0100
+Subject: [PATCH 2/2] mmc: sdhci-esdhc-imx: Fixup runtime PM conditions during
+ ->probe()
+
+By configure runtime PM prior we enable the use of it, we close the gap
+for strange and unhandled conditions. Moreover it makes us rely on the
+driver core, after finalized ->probe(), to request an inactive device
+to become runtime PM idle/suspended, which earlier potentially could
+happen already at pm_runtime_set_autosuspend_delay().
+
+Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
+---
+ drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
+index 043866c..10ef824 100644
+--- a/drivers/mmc/host/sdhci-esdhc-imx.c
++++ b/drivers/mmc/host/sdhci-esdhc-imx.c
+@@ -1080,10 +1080,10 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
+ goto disable_clk;
+
+ pm_runtime_set_active(&pdev->dev);
+- pm_runtime_enable(&pdev->dev);
+ pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
+ pm_runtime_use_autosuspend(&pdev->dev);
+ pm_suspend_ignore_children(&pdev->dev, 1);
++ pm_runtime_enable(&pdev->dev);
+
+ return 0;
+
+--
+1.9.3
+
diff --git a/recipes-kernel/linux/linux-imx_3.14.28.bb b/recipes-kernel/linux/linux-imx_3.14.28.bb
index e3078f7..5d1be54 100644
--- a/recipes-kernel/linux/linux-imx_3.14.28.bb
+++ b/recipes-kernel/linux/linux-imx_3.14.28.bb
@@ -18,6 +18,7 @@ SRC_URI += " \
file://0001-ARM-imx6q-drop-unnecessary-semicolon.patch \
file://0002-ARM-clk-imx6q-fix-video-divider-for-rev-T0-1.0.patch \
file://0003-ARM-imx6sl-Disable-imx6sl-specific-code-when-imx6sl-.patch \
+ file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \
"
COMPATIBLE_MACHINE = "(mx6)"
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread* [meta-fsl-arm/V2][PATCH 2/2] linux-imx-3.14.28: FEC: fix garbage send for huge data blocks
2015-06-08 12:48 [meta-fsl-arm/V2][PATCH 0/2] linux-imx-3.14.28 important bugfixes by applying mainline patches Andreas Müller
2015-06-08 12:48 ` [meta-fsl-arm/V2][PATCH 1/2] linux-imx_3.14.28: fix initial MMC device detection Andreas Müller
@ 2015-06-08 12:48 ` Andreas Müller
1 sibling, 0 replies; 6+ messages in thread
From: Andreas Müller @ 2015-06-08 12:48 UTC (permalink / raw)
To: meta-freescale
We had endless wireshark sessions here showing identical garbage contents
| (c) Copyrigt 2007-2012, Freescale Semiconductor All rights reserved
as discussed in the thread [1] leading to the patch attached.
[1] http://www.spinics.net/lists/netdev/msg319740.html
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
...et-fec-fix-the-warning-found-by-dma-debug.patch | 100 +++++++++++++++++++++
recipes-kernel/linux/linux-imx_3.14.28.bb | 1 +
2 files changed, 101 insertions(+)
create mode 100644 recipes-kernel/linux/linux-imx-3.14.28/0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch
diff --git a/recipes-kernel/linux/linux-imx-3.14.28/0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch b/recipes-kernel/linux/linux-imx-3.14.28/0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch
new file mode 100644
index 0000000..d40e55a
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-3.14.28/0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch
@@ -0,0 +1,100 @@
+From a2fe37b69d4fe369c284d50927193fed81c238a0 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Fri, 13 Mar 2015 14:07:54 -0300
+Subject: [PATCH] Revert "net: fec: fix the warning found by dma debug"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This reverts commit 2b995f63987013bacde99168218f9c7b252bdcf1.
+
+Панов Андрей reported the following regression:
+
+"Commit 2b995f63987013bacde99168218f9c7b252bdcf1 in 4.0.0-rc3 introduces a
+nasty bug in transmit, corrupting packets.
+
+To reproduce:
+
+$ dd if=/dev/zero of=zeros bs=1M count=20
+$ md5sum -b zeros
+8f4e33f3dc3e414ff94e5fb6905cba8c *zeros
+
+This checksum is correct.
+
+Copy file "zeros" to another host with NFS, and it gets corrupted, checksum is
+changed.
+File should be big, small amounts of transmit isn't affected.
+
+I use an i.MX6 Quad board.
+
+If this commit is reverted, all works fine."
+
+Reported-by: Панов Андрей <rockford@yandex.ru>
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/freescale/fec_main.c | 34 ++++++++++---------------------
+ 1 file changed, 11 insertions(+), 23 deletions(-)
+
+diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
+index 787db50..78e1ce0 100644
+--- a/drivers/net/ethernet/freescale/fec_main.c
++++ b/drivers/net/ethernet/freescale/fec_main.c
+@@ -1189,13 +1189,12 @@ static void
+ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
+ {
+ struct fec_enet_private *fep;
+- struct bufdesc *bdp, *bdp_t;
++ struct bufdesc *bdp;
+ unsigned short status;
+ struct sk_buff *skb;
+ struct fec_enet_priv_tx_q *txq;
+ struct netdev_queue *nq;
+ int index = 0;
+- int i, bdnum;
+ int entries_free;
+
+ fep = netdev_priv(ndev);
+@@ -1216,29 +1215,18 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
+ if (bdp == txq->cur_tx)
+ break;
+
+- bdp_t = bdp;
+- bdnum = 1;
+- index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep);
+- skb = txq->tx_skbuff[index];
+- while (!skb) {
+- bdp_t = fec_enet_get_nextdesc(bdp_t, fep, queue_id);
+- index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep);
+- skb = txq->tx_skbuff[index];
+- bdnum++;
+- }
+- if (skb_shinfo(skb)->nr_frags &&
+- (status = bdp_t->cbd_sc) & BD_ENET_TX_READY)
+- break;
++ index = fec_enet_get_bd_index(txq->tx_bd_base, bdp, fep);
+
+- for (i = 0; i < bdnum; i++) {
+- if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr))
+- dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr,
+- bdp->cbd_datlen, DMA_TO_DEVICE);
+- bdp->cbd_bufaddr = 0;
+- if (i < bdnum - 1)
+- bdp = fec_enet_get_nextdesc(bdp, fep, queue_id);
+- }
++ skb = txq->tx_skbuff[index];
+ txq->tx_skbuff[index] = NULL;
++ if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr))
++ dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr,
++ bdp->cbd_datlen, DMA_TO_DEVICE);
++ bdp->cbd_bufaddr = 0;
++ if (!skb) {
++ bdp = fec_enet_get_nextdesc(bdp, fep, queue_id);
++ continue;
++ }
+
+ /* Check for errors. */
+ if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC |
+--
+1.9.3
+
diff --git a/recipes-kernel/linux/linux-imx_3.14.28.bb b/recipes-kernel/linux/linux-imx_3.14.28.bb
index 5d1be54..ba6f99a 100644
--- a/recipes-kernel/linux/linux-imx_3.14.28.bb
+++ b/recipes-kernel/linux/linux-imx_3.14.28.bb
@@ -19,6 +19,7 @@ SRC_URI += " \
file://0002-ARM-clk-imx6q-fix-video-divider-for-rev-T0-1.0.patch \
file://0003-ARM-imx6sl-Disable-imx6sl-specific-code-when-imx6sl-.patch \
file://0004-mmc-sdhci-esdhc-imx-Fixup-runtime-PM-conditions-duri.patch \
+ file://0005-Revert-net-fec-fix-the-warning-found-by-dma-debug.patch \
"
COMPATIBLE_MACHINE = "(mx6)"
--
1.9.3
^ permalink raw reply related [flat|nested] 6+ messages in thread