diff mbox

[U-Boot,1/2] mmc: sdhci: set to INT_DATA_END when there are data

Message ID 1468325927-13128-1-git-send-email-jh80.chung@samsung.com
State Accepted
Commit 17ea3c862865c0d704646f67dbf8412f9ff54f59
Delegated to: Jaehoon Chung
Headers show

Commit Message

Jaehoon Chung July 12, 2016, 12:18 p.m. UTC
There is no data, it doesn't needs to wait for completing data transfer.
(It seems that it can be removed.)
Almost all timeout error is occured from stop command without data.
After applied this patch, I hope that we don't need to increase timeout value anymore.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/sdhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Łukasz Majewski July 12, 2016, 12:55 p.m. UTC | #1
Hi Jaehoon,

> There is no data, it doesn't needs to wait for completing data
> transfer. (It seems that it can be removed.)
> Almost all timeout error is occured from stop command without data.
> After applied this patch, I hope that we don't need to increase
> timeout value anymore.

This patch fixes issue (in a better way) for Odroid U3 write
performance (http://patchwork.ozlabs.org/patch/646932/) and hence
should be used.


> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
>  drivers/mmc/sdhci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 604f18d..0a38a56 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
> struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
>  	else if (cmd->resp_type & MMC_RSP_BUSY) {
>  		flags = SDHCI_CMD_RESP_SHORT_BUSY;
> -		mask |= SDHCI_INT_DATA_END;
> +		if (data)
> +			mask |= SDHCI_INT_DATA_END;
>  	} else
>  		flags = SDHCI_CMD_RESP_SHORT;
>  

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid U3 (Exynos4):

Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img
32505856 bytes read in 1471 ms (21.1 MiB/s)
Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000
File System is consistent
update journal finished
32505856 bytes written in 3528 ms (8.8 MiB/s)

Performance improvement is even better than with previously proposed
patches.

Test HW: Odroid XU3 (Exynos5):

ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img
32505856 bytes read in 6309 ms (4.9 MiB/s)
ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000
File System is consistent
update journal finished
32505856 bytes written in 4884 ms (6.3 MiB/s)
Jaehoon Chung July 25, 2016, 4:55 a.m. UTC | #2
Hi All,

On 07/12/2016 09:55 PM, Lukasz Majewski wrote:
> Hi Jaehoon,
> 
>> There is no data, it doesn't needs to wait for completing data
>> transfer. (It seems that it can be removed.)
>> Almost all timeout error is occured from stop command without data.
>> After applied this patch, I hope that we don't need to increase
>> timeout value anymore.
> 
> This patch fixes issue (in a better way) for Odroid U3 write
> performance (http://patchwork.ozlabs.org/patch/646932/) and hence
> should be used.
> 

Is there any other opinion for this patch?
Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?

Who can apply this patch and patch relevant to mmc?

Best Regards,
Jaehoon Chung

> 
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>>  drivers/mmc/sdhci.c | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
>> index 604f18d..0a38a56 100644
>> --- a/drivers/mmc/sdhci.c
>> +++ b/drivers/mmc/sdhci.c
>> @@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
>> struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
>>  	else if (cmd->resp_type & MMC_RSP_BUSY) {
>>  		flags = SDHCI_CMD_RESP_SHORT_BUSY;
>> -		mask |= SDHCI_INT_DATA_END;
>> +		if (data)
>> +			mask |= SDHCI_INT_DATA_END;
>>  	} else
>>  		flags = SDHCI_CMD_RESP_SHORT;
>>  
> 
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> 
> Test HW: Odroid U3 (Exynos4):
> 
> Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img
> 32505856 bytes read in 1471 ms (21.1 MiB/s)
> Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000
> File System is consistent
> update journal finished
> 32505856 bytes written in 3528 ms (8.8 MiB/s)
> 
> Performance improvement is even better than with previously proposed
> patches.
> 
> Test HW: Odroid XU3 (Exynos5):
> 
> ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img
> 32505856 bytes read in 6309 ms (4.9 MiB/s)
> ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000
> File System is consistent
> update journal finished
> 32505856 bytes written in 4884 ms (6.3 MiB/s)
> 
>
Minkyu Kang July 25, 2016, 10:10 a.m. UTC | #3
Hi,

On 25/07/16 13:55, Jaehoon Chung wrote:
> Hi All,
> 
> On 07/12/2016 09:55 PM, Lukasz Majewski wrote:
>> Hi Jaehoon,
>>
>>> There is no data, it doesn't needs to wait for completing data
>>> transfer. (It seems that it can be removed.)
>>> Almost all timeout error is occured from stop command without data.
>>> After applied this patch, I hope that we don't need to increase
>>> timeout value anymore.
>>
>> This patch fixes issue (in a better way) for Odroid U3 write
>> performance (http://patchwork.ozlabs.org/patch/646932/) and hence
>> should be used.
>>
> 
> Is there any other opinion for this patch?

looks reasonable.

Acked-by: Minkyu Kang <mk7.kang@samsung.com>

> Who is maintaining u-boot-mmc? Is Pantelis still maintaining u-boot-mmc?
> 
> Who can apply this patch and patch relevant to mmc?
> 

Pantelis seems to away from mailing list.
If so, I think we need discuss about new custodian for mmc.

Thanks,
Minkyu Kang.
Łukasz Majewski July 25, 2016, 10:21 a.m. UTC | #4
Hi Jaehoon,

> Hi All,
> 
> On 07/12/2016 09:55 PM, Lukasz Majewski wrote:
> > Hi Jaehoon,
> > 
> >> There is no data, it doesn't needs to wait for completing data
> >> transfer. (It seems that it can be removed.)
> >> Almost all timeout error is occured from stop command without data.
> >> After applied this patch, I hope that we don't need to increase
> >> timeout value anymore.
> > 
> > This patch fixes issue (in a better way) for Odroid U3 write
> > performance (http://patchwork.ozlabs.org/patch/646932/) and hence
> > should be used.
> > 
> 
> Is there any other opinion for this patch?
> Who is maintaining u-boot-mmc? Is Pantelis still maintaining
> u-boot-mmc?
> 
> Who can apply this patch and patch relevant to mmc?

To be honest, I do look forward to see this patch included to u-boot
master branch.

Addition of some extra Odroid U3 tests hinge on it.

> 
> Best Regards,
> Jaehoon Chung
> 
> > 
> >>
> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> >> ---
> >>  drivers/mmc/sdhci.c | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> >> index 604f18d..0a38a56 100644
> >> --- a/drivers/mmc/sdhci.c
> >> +++ b/drivers/mmc/sdhci.c
> >> @@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc,
> >> struct mmc_cmd *cmd, flags = SDHCI_CMD_RESP_LONG;
> >>  	else if (cmd->resp_type & MMC_RSP_BUSY) {
> >>  		flags = SDHCI_CMD_RESP_SHORT_BUSY;
> >> -		mask |= SDHCI_INT_DATA_END;
> >> +		if (data)
> >> +			mask |= SDHCI_INT_DATA_END;
> >>  	} else
> >>  		flags = SDHCI_CMD_RESP_SHORT;
> >>  
> > 
> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> > Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> > 
> > Test HW: Odroid U3 (Exynos4):
> > 
> > Odroid # ext4load mmc 0:2 0x41000000 dat_31M.img
> > 32505856 bytes read in 1471 ms (21.1 MiB/s)
> > Odroid # ext4write mmc 0:2 0x41000000 /dat_w55.img 0x1f00000
> > File System is consistent
> > update journal finished
> > 32505856 bytes written in 3528 ms (8.8 MiB/s)
> > 
> > Performance improvement is even better than with previously proposed
> > patches.
> > 
> > Test HW: Odroid XU3 (Exynos5):
> > 
> > ODROID-XU3 # ext4load mmc 0:2 0x41000000 dat_31M.img
> > 32505856 bytes read in 6309 ms (4.9 MiB/s)
> > ODROID-XU3 # ext4write mmc 0:2 0x41000000 /dat_w1.img 0x1f00000
> > File System is consistent
> > update journal finished
> > 32505856 bytes written in 4884 ms (6.3 MiB/s)
> > 
> > 
>
Jaehoon Chung Aug. 5, 2016, 2:24 a.m. UTC | #5
On 07/12/2016 09:18 PM, Jaehoon Chung wrote:
> There is no data, it doesn't needs to wait for completing data transfer.
> (It seems that it can be removed.)
> Almost all timeout error is occured from stop command without data.
> After applied this patch, I hope that we don't need to increase timeout value anymore.
> 
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> Tested-by: Lukasz Majewski <l.majewski@samsung.com>
> Acked-by: Minkyu Kang <mk7.kang@samsung.com>

Applied on u-boot-mmc. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/mmc/sdhci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
> index 604f18d..0a38a56 100644
> --- a/drivers/mmc/sdhci.c
> +++ b/drivers/mmc/sdhci.c
> @@ -175,7 +175,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
>  		flags = SDHCI_CMD_RESP_LONG;
>  	else if (cmd->resp_type & MMC_RSP_BUSY) {
>  		flags = SDHCI_CMD_RESP_SHORT_BUSY;
> -		mask |= SDHCI_INT_DATA_END;
> +		if (data)
> +			mask |= SDHCI_INT_DATA_END;
>  	} else
>  		flags = SDHCI_CMD_RESP_SHORT;
>  
>
diff mbox

Patch

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 604f18d..0a38a56 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -175,7 +175,8 @@  static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
 		flags = SDHCI_CMD_RESP_LONG;
 	else if (cmd->resp_type & MMC_RSP_BUSY) {
 		flags = SDHCI_CMD_RESP_SHORT_BUSY;
-		mask |= SDHCI_INT_DATA_END;
+		if (data)
+			mask |= SDHCI_INT_DATA_END;
 	} else
 		flags = SDHCI_CMD_RESP_SHORT;