<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel_replicant_linux/drivers/mmc, branch replicant-11</title>
<subtitle>Replicant kernel
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/'/>
<entry>
<title>mmc: core: Workaround VTU00M 0xf1 FTL metadata corruption bug</title>
<updated>2021-11-25T10:05:12+00:00</updated>
<author>
<name>belgin</name>
<email>belginstirbu@hotmail.com</email>
</author>
<published>2021-06-29T17:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=4ed8759efb524507573f0071f7e055474b416014'/>
<id>4ed8759efb524507573f0071f7e055474b416014</id>
<content type='text'>
Some versions of the 0xf1 revision of the firmware of the
VTU00M eMMC from Samsung have a bug that triggers an FTL
metadata corruption.

These eMMC are used at least in the Samsung Galaxy SIII
(GT-I9300) and Galaxy Note II (GT-N7100).

The corrupted FTL metadata can make the eMMC CPU crash.

In practice as the eMMC has several hardware partitions, in
some cases the bootloader hadware partition (which is used
to store the phone bootloader in the Galaxy SIII and Note II)
still works, while the main hardware partition (that contains
the phone operating system) doesn't.

In other cases the eMMC crashes during the very begining of
its boot procedure. In that case the phones botloaders can't
be loaded anymore, which results in a black screen and no
visible signs that the phone has been powered on.

This patch has been ported from the Samsung patch made to
address this issue.

It uses MMC vendor specific commands to patch the eMMC
firmware in RAM. The patch hangs the eMMC CPU right before
the corruption is about to happen.

So while it's not ideal, it still better to have devices
hanging, even repetedly, than breaking devices completely.

Since VTU00M eMMC firmwares are not free software nor
redistributable, we cannot simply dump newer firmwares,
and redistribute them. In addition the only tested way
to do a firmware update destroys all the data on the
eMMC (including the FTL metadata as well) in the process.

A proper fix would be to write a compatible free software
eMMC firmware and to investigate the firmware update command
that doesn't erase the FTL metadata and/or the data, however
this could be quite time consuming.

References:
- https://media.ccc.de/v/34c3-8784-emmc_hacking_or_how_i_fixed_long-dead_galaxy_s3_phones

TODO:
- Adapt this patch to use the SD/eMMC hook system for eMMC cards.
- upstream it

Signed-off-by: belgin &lt;belginstirbu@hotmail.com&gt;
GNUtoo: Rewrite the commit message
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some versions of the 0xf1 revision of the firmware of the
VTU00M eMMC from Samsung have a bug that triggers an FTL
metadata corruption.

These eMMC are used at least in the Samsung Galaxy SIII
(GT-I9300) and Galaxy Note II (GT-N7100).

The corrupted FTL metadata can make the eMMC CPU crash.

In practice as the eMMC has several hardware partitions, in
some cases the bootloader hadware partition (which is used
to store the phone bootloader in the Galaxy SIII and Note II)
still works, while the main hardware partition (that contains
the phone operating system) doesn't.

In other cases the eMMC crashes during the very begining of
its boot procedure. In that case the phones botloaders can't
be loaded anymore, which results in a black screen and no
visible signs that the phone has been powered on.

This patch has been ported from the Samsung patch made to
address this issue.

It uses MMC vendor specific commands to patch the eMMC
firmware in RAM. The patch hangs the eMMC CPU right before
the corruption is about to happen.

So while it's not ideal, it still better to have devices
hanging, even repetedly, than breaking devices completely.

Since VTU00M eMMC firmwares are not free software nor
redistributable, we cannot simply dump newer firmwares,
and redistribute them. In addition the only tested way
to do a firmware update destroys all the data on the
eMMC (including the FTL metadata as well) in the process.

A proper fix would be to write a compatible free software
eMMC firmware and to investigate the firmware update command
that doesn't erase the FTL metadata and/or the data, however
this could be quite time consuming.

References:
- https://media.ccc.de/v/34c3-8784-emmc_hacking_or_how_i_fixed_long-dead_galaxy_s3_phones

TODO:
- Adapt this patch to use the SD/eMMC hook system for eMMC cards.
- upstream it

Signed-off-by: belgin &lt;belginstirbu@hotmail.com&gt;
GNUtoo: Rewrite the commit message
Signed-off-by: Denis 'GNUtoo' Carikli &lt;GNUtoo@cyberdimension.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: core: Return correct emmc response in case of ioctl error</title>
<updated>2021-09-18T11:40:32+00:00</updated>
<author>
<name>Nishad Kamdar</name>
<email>nishadkamdar@gmail.com</email>
</author>
<published>2021-08-24T19:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=7c7d6c9cd879a4bb19b101735858a175e698219b'/>
<id>7c7d6c9cd879a4bb19b101735858a175e698219b</id>
<content type='text'>
[ Upstream commit e72a55f2e5ddcfb3dce0701caf925ce435b87682 ]

When a read/write command is sent via ioctl to the kernel,
and the command fails, the actual error response of the emmc
is not sent to the user.

IOCTL read/write tests are carried out using commands
17 (Single BLock Read), 24 (Single Block Write),
18 (Multi Block Read), 25 (Multi Block Write)

The tests are carried out on a 64Gb emmc device. All of these
tests try to access an "out of range" sector address (0x09B2FFFF).

It is seen that without the patch the response received by the user
is not OUT_OF_RANGE error (R1 response 31st bit is not set) as per
JEDEC specification. After applying the patch proper response is seen.
This is because the function returns without copying the response to
the user in case of failure. This patch fixes the issue.

Hence, this memcpy is required whether we get an error response or not.
Therefor it is moved up from the current position up to immediately
after we have called mmc_wait_for_req().

The test code and the output of only the CMD17 is included in the
commit to limit the message length.

CMD17 (Test Code Snippet):
==========================
        printf("Forming CMD%d\n", opt_idx);
        /*  single block read */
        cmd.blksz = 512;
        cmd.blocks = 1;
        cmd.write_flag = 0;
        cmd.opcode = 17;
        //cmd.arg = atoi(argv[3]);
        cmd.arg = 0x09B2FFFF;
        /* Expecting response R1B */
        cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;

        memset(data, 0, sizeof(__u8) * 512);
        mmc_ioc_cmd_set_data(cmd, data);

        printf("Sending CMD%d: ARG[0x%08x]\n", opt_idx, cmd.arg);
        if(ioctl(fd, MMC_IOC_CMD, &amp;cmd))
                perror("Error");

        printf("\nResponse: %08x\n", cmd.response[0]);

CMD17 (Output without patch):
=============================
test@test-LIVA-Z:~$ sudo ./mmc cmd_test /dev/mmcblk0 17
Entering the do_mmc_commands:Device: /dev/mmcblk0 nargs:4
Entering the do_mmc_commands:Device: /dev/mmcblk0 options[17, 0x09B2FFF]
Forming CMD17
Sending CMD17: ARG[0x09b2ffff]
Error: Connection timed out

Response: 00000000
(Incorrect response)

CMD17 (Output with patch):
==========================
test@test-LIVA-Z:~$ sudo ./mmc cmd_test /dev/mmcblk0 17
[sudo] password for test:
Entering the do_mmc_commands:Device: /dev/mmcblk0 nargs:4
Entering the do_mmc_commands:Device: /dev/mmcblk0 options[17, 09B2FFFF]
Forming CMD17
Sending CMD17: ARG[0x09b2ffff]
Error: Connection timed out

Response: 80000900
(Correct OUT_OF_ERROR response as per JEDEC specification)

Signed-off-by: Nishad Kamdar &lt;nishadkamdar@gmail.com&gt;
Reviewed-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Link: https://lore.kernel.org/r/20210824191726.8296-1-nishadkamdar@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit e72a55f2e5ddcfb3dce0701caf925ce435b87682 ]

When a read/write command is sent via ioctl to the kernel,
and the command fails, the actual error response of the emmc
is not sent to the user.

IOCTL read/write tests are carried out using commands
17 (Single BLock Read), 24 (Single Block Write),
18 (Multi Block Read), 25 (Multi Block Write)

The tests are carried out on a 64Gb emmc device. All of these
tests try to access an "out of range" sector address (0x09B2FFFF).

It is seen that without the patch the response received by the user
is not OUT_OF_RANGE error (R1 response 31st bit is not set) as per
JEDEC specification. After applying the patch proper response is seen.
This is because the function returns without copying the response to
the user in case of failure. This patch fixes the issue.

Hence, this memcpy is required whether we get an error response or not.
Therefor it is moved up from the current position up to immediately
after we have called mmc_wait_for_req().

The test code and the output of only the CMD17 is included in the
commit to limit the message length.

CMD17 (Test Code Snippet):
==========================
        printf("Forming CMD%d\n", opt_idx);
        /*  single block read */
        cmd.blksz = 512;
        cmd.blocks = 1;
        cmd.write_flag = 0;
        cmd.opcode = 17;
        //cmd.arg = atoi(argv[3]);
        cmd.arg = 0x09B2FFFF;
        /* Expecting response R1B */
        cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;

        memset(data, 0, sizeof(__u8) * 512);
        mmc_ioc_cmd_set_data(cmd, data);

        printf("Sending CMD%d: ARG[0x%08x]\n", opt_idx, cmd.arg);
        if(ioctl(fd, MMC_IOC_CMD, &amp;cmd))
                perror("Error");

        printf("\nResponse: %08x\n", cmd.response[0]);

CMD17 (Output without patch):
=============================
test@test-LIVA-Z:~$ sudo ./mmc cmd_test /dev/mmcblk0 17
Entering the do_mmc_commands:Device: /dev/mmcblk0 nargs:4
Entering the do_mmc_commands:Device: /dev/mmcblk0 options[17, 0x09B2FFF]
Forming CMD17
Sending CMD17: ARG[0x09b2ffff]
Error: Connection timed out

Response: 00000000
(Incorrect response)

CMD17 (Output with patch):
==========================
test@test-LIVA-Z:~$ sudo ./mmc cmd_test /dev/mmcblk0 17
[sudo] password for test:
Entering the do_mmc_commands:Device: /dev/mmcblk0 nargs:4
Entering the do_mmc_commands:Device: /dev/mmcblk0 options[17, 09B2FFFF]
Forming CMD17
Sending CMD17: ARG[0x09b2ffff]
Error: Connection timed out

Response: 80000900
(Correct OUT_OF_ERROR response as per JEDEC specification)

Signed-off-by: Nishad Kamdar &lt;nishadkamdar@gmail.com&gt;
Reviewed-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Link: https://lore.kernel.org/r/20210824191726.8296-1-nishadkamdar@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: rtsx_pci: Fix long reads when clock is prescaled</title>
<updated>2021-09-18T11:40:32+00:00</updated>
<author>
<name>Thomas Hebb</name>
<email>tommyhebb@gmail.com</email>
</author>
<published>2021-08-01T11:46:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=3aab5bffdde0d30a8885d0140afc2d58e76da714'/>
<id>3aab5bffdde0d30a8885d0140afc2d58e76da714</id>
<content type='text'>
[ Upstream commit 3ac5e45291f3f0d699a721357380d4593bc2dcb3 ]

For unexplained reasons, the prescaler register for this device needs to
be cleared (set to 1) while performing a data read or else the command
will hang. This does not appear to affect the real clock rate sent out
on the bus, so I assume it's purely to work around a hardware bug.

During normal operation, the prescaler is already set to 1, so nothing
needs to be done. However, in "initial mode" (which is used for sub-MHz
clock speeds, like the core sets while enumerating cards), it's set to
128 and so we need to reset it during data reads. We currently fail to
do this for long reads.

This has no functional affect on the driver's operation currently
written, as the MMC core always sets a clock above 1MHz before
attempting any long reads. However, the core could conceivably set any
clock speed at any time and the driver should still work, so I think
this fix is worthwhile.

I personally encountered this issue while performing data recovery on an
external chip. My connections had poor signal integrity, so I modified
the core code to reduce the clock speed. Without this change, I saw the
card enumerate but was unable to actually read any data.

Writes don't seem to work in the situation described above even with
this change (and even if the workaround is extended to encompass data
write commands). I was not able to find a way to get them working.

Signed-off-by: Thomas Hebb &lt;tommyhebb@gmail.com&gt;
Link: https://lore.kernel.org/r/2fef280d8409ab0100c26c6ac7050227defd098d.1627818365.git.tommyhebb@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 3ac5e45291f3f0d699a721357380d4593bc2dcb3 ]

For unexplained reasons, the prescaler register for this device needs to
be cleared (set to 1) while performing a data read or else the command
will hang. This does not appear to affect the real clock rate sent out
on the bus, so I assume it's purely to work around a hardware bug.

During normal operation, the prescaler is already set to 1, so nothing
needs to be done. However, in "initial mode" (which is used for sub-MHz
clock speeds, like the core sets while enumerating cards), it's set to
128 and so we need to reset it during data reads. We currently fail to
do this for long reads.

This has no functional affect on the driver's operation currently
written, as the MMC core always sets a clock above 1MHz before
attempting any long reads. However, the core could conceivably set any
clock speed at any time and the driver should still work, so I think
this fix is worthwhile.

I personally encountered this issue while performing data recovery on an
external chip. My connections had poor signal integrity, so I modified
the core code to reduce the clock speed. Without this change, I saw the
card enumerate but was unable to actually read any data.

Writes don't seem to work in the situation described above even with
this change (and even if the workaround is extended to encompass data
write commands). I was not able to find a way to get them working.

Signed-off-by: Thomas Hebb &lt;tommyhebb@gmail.com&gt;
Link: https://lore.kernel.org/r/2fef280d8409ab0100c26c6ac7050227defd098d.1627818365.git.tommyhebb@gmail.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: sdhci-of-arasan: Check return value of non-void funtions</title>
<updated>2021-09-18T11:40:32+00:00</updated>
<author>
<name>Manish Narani</name>
<email>manish.narani@xilinx.com</email>
</author>
<published>2021-06-15T10:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=7f43da79ebc5e60ba8c0f9677e58a3fce37c12d6'/>
<id>7f43da79ebc5e60ba8c0f9677e58a3fce37c12d6</id>
<content type='text'>
[ Upstream commit 66bad6ed2204fdb78a0a8fb89d824397106a5471 ]

At a couple of places, the return values of the non-void functions were
not getting checked. This was reported by the coverity tool. Modify the
code to check the return values of the same.

Addresses-Coverity: ("check_return")
Signed-off-by: Manish Narani &lt;manish.narani@xilinx.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1623753837-21035-5-git-send-email-manish.narani@xilinx.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 66bad6ed2204fdb78a0a8fb89d824397106a5471 ]

At a couple of places, the return values of the non-void functions were
not getting checked. This was reported by the coverity tool. Modify the
code to check the return values of the same.

Addresses-Coverity: ("check_return")
Signed-off-by: Manish Narani &lt;manish.narani@xilinx.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1623753837-21035-5-git-send-email-manish.narani@xilinx.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: sdhci-of-arasan: Modified SD default speed to 19MHz for ZynqMP</title>
<updated>2021-09-18T11:40:32+00:00</updated>
<author>
<name>Manish Narani</name>
<email>manish.narani@xilinx.com</email>
</author>
<published>2021-06-15T10:43:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=834ecf61cebd84922443d9688d1cff84e4a0e9c2'/>
<id>834ecf61cebd84922443d9688d1cff84e4a0e9c2</id>
<content type='text'>
[ Upstream commit c0b4e411a9b09748466ee06d2ae6772effa64dfb ]

SD standard speed timing was met only at 19MHz and not 25 MHz, that's
why changing driver to 19MHz. The reason for this is when a level shifter
is used on the board, timing was met for standard speed only at 19MHz.
Since this level shifter is commonly required for high speed modes,
the driver is modified to use standard speed of 19Mhz.

Signed-off-by: Manish Narani &lt;manish.narani@xilinx.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1623753837-21035-2-git-send-email-manish.narani@xilinx.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c0b4e411a9b09748466ee06d2ae6772effa64dfb ]

SD standard speed timing was met only at 19MHz and not 25 MHz, that's
why changing driver to 19MHz. The reason for this is when a level shifter
is used on the board, timing was met for standard speed only at 19MHz.
Since this level shifter is commonly required for high speed modes,
the driver is modified to use standard speed of 19Mhz.

Signed-off-by: Manish Narani &lt;manish.narani@xilinx.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: https://lore.kernel.org/r/1623753837-21035-2-git-send-email-manish.narani@xilinx.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: moxart: Fix issue with uninitialized dma_slave_config</title>
<updated>2021-09-15T07:50:43+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2021-08-10T08:16:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=cfaefbcc6bc4c2bf76b9c9779cf6d6ff95a2fbac'/>
<id>cfaefbcc6bc4c2bf76b9c9779cf6d6ff95a2fbac</id>
<content type='text'>
[ Upstream commit ee5165354d498e5bceb0b386e480ac84c5f8c28c ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures.

For moxart, this is probably not currently an issue but is still good to
fix though.

Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver")
Cc: Jonas Jensen &lt;jonas.jensen@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-3-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ee5165354d498e5bceb0b386e480ac84c5f8c28c ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures.

For moxart, this is probably not currently an issue but is still good to
fix though.

Fixes: 1b66e94e6b99 ("mmc: moxart: Add MOXA ART SD/MMC driver")
Cc: Jonas Jensen &lt;jonas.jensen@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-3-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: dw_mmc: Fix issue with uninitialized dma_slave_config</title>
<updated>2021-09-15T07:50:43+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2021-08-10T08:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=ced0bc748185663a94bc5ae69d7f462a63c66080'/>
<id>ced0bc748185663a94bc5ae69d7f462a63c66080</id>
<content type='text'>
[ Upstream commit c3ff0189d3bc9c03845fe37472c140f0fefd0c79 ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures.

For dw_mmc, this is probably not currently an issue but is still good to
fix though.

Fixes: 3fc7eaef44db ("mmc: dw_mmc: Add external dma interface support")
Cc: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-2-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c3ff0189d3bc9c03845fe37472c140f0fefd0c79 ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures.

For dw_mmc, this is probably not currently an issue but is still good to
fix though.

Fixes: 3fc7eaef44db ("mmc: dw_mmc: Add external dma interface support")
Cc: Shawn Lin &lt;shawn.lin@rock-chips.com&gt;
Cc: Jaehoon Chung &lt;jh80.chung@samsung.com&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-2-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: sdhci: Fix issue with uninitialized dma_slave_config</title>
<updated>2021-09-15T07:50:43+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2021-08-10T08:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=8a9f9b97558e85a6bf1b5b8c8240b14bdf5cb500'/>
<id>8a9f9b97558e85a6bf1b5b8c8240b14bdf5cb500</id>
<content type='text'>
[ Upstream commit 522654d534d315d540710124c57b49ca22ac5f72 ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures at least if external TI SDMA is ever configured for sdhci.

For other external DMA cases, this is probably not currently an issue but
is still good to fix though.

Fixes: 18e762e3b7a7 ("mmc: sdhci: add support for using external DMA devices")
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Chunyan Zhang &lt;zhang.chunyan@linaro.org&gt;
Cc: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-1-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 522654d534d315d540710124c57b49ca22ac5f72 ]

Depending on the DMA driver being used, the struct dma_slave_config may
need to be initialized to zero for the unused data.

For example, we have three DMA drivers using src_port_window_size and
dst_port_window_size. If these are left uninitialized, it can cause DMA
failures at least if external TI SDMA is ever configured for sdhci.

For other external DMA cases, this is probably not currently an issue but
is still good to fix though.

Fixes: 18e762e3b7a7 ("mmc: sdhci: add support for using external DMA devices")
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Chunyan Zhang &lt;zhang.chunyan@linaro.org&gt;
Cc: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Cc: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Cc: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Reviewed-by: Peter Ujfalusi &lt;peter.ujfalusi@gmail.com&gt;
Link: https://lore.kernel.org/r/20210810081644.19353-1-tony@atomide.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711"</title>
<updated>2021-09-03T08:09:25+00:00</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2021-08-27T14:30:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=ac874290e75cd5250bcb80632a32a6c64c6ac04a'/>
<id>ac874290e75cd5250bcb80632a32a6c64c6ac04a</id>
<content type='text'>
[ Upstream commit 885814a97f5a1a2daf66bde5f2076f0bf632c174 ]

This reverts commit 419dd626e357e89fc9c4e3863592c8b38cfe1571.

It turned out that the change from the reverted commit breaks the ACPI
based rpi's because it causes the 100Mhz max clock to be overridden to the
return from sdhci_iproc_get_max_clock(), which is 0 because there isn't a
OF/DT based clock device.

Reported-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Fixes: 419dd626e357 ("mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711")
Acked-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 885814a97f5a1a2daf66bde5f2076f0bf632c174 ]

This reverts commit 419dd626e357e89fc9c4e3863592c8b38cfe1571.

It turned out that the change from the reverted commit breaks the ACPI
based rpi's because it causes the 100Mhz max clock to be overridden to the
return from sdhci_iproc_get_max_clock(), which is 0 because there isn't a
OF/DT based clock device.

Reported-by: Jeremy Linton &lt;jeremy.linton@arm.com&gt;
Fixes: 419dd626e357 ("mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711")
Acked-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711</title>
<updated>2021-08-26T12:35:56+00:00</updated>
<author>
<name>Nicolas Saenz Julienne</name>
<email>nsaenz@kernel.org</email>
</author>
<published>2021-08-07T11:06:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant-next/kernel_replicant_linux/commit/?id=16cfa72766b5e8ad7892ef7bb2787d0c989a6102'/>
<id>16cfa72766b5e8ad7892ef7bb2787d0c989a6102</id>
<content type='text'>
[ Upstream commit 419dd626e357e89fc9c4e3863592c8b38cfe1571 ]

The controller doesn't seem to pick-up on clock changes, so set the
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
directly from the clock.

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenz@kernel.org&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1628334401-6577-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 419dd626e357e89fc9c4e3863592c8b38cfe1571 ]

The controller doesn't seem to pick-up on clock changes, so set the
SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN flag to query the clock frequency
directly from the clock.

Fixes: f84e411c85be ("mmc: sdhci-iproc: Add support for emmc2 of the BCM2711")
Signed-off-by: Nicolas Saenz Julienne &lt;nsaenz@kernel.org&gt;
Signed-off-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/1628334401-6577-6-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
