* [U-Boot] [PATCH] mmc: Fix uninitialised priv member
@ 2018-02-09 15:24 ` Alex Kiernan
2018-02-15 21:07 ` Robert Nelson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alex Kiernan @ 2018-02-09 15:24 UTC (permalink / raw)
To: u-boot
When using omap_hsmmc without the device model then the allocation
of mmc->priv ends up uninitialised.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
I've a board (AM335xx based) which boots fine with 2018-01, with
2018-03-rc1 (actually 1811a92) it fails in the MLO:
U-Boot SPL 2018.03-rc1-00222-g128a503-dirty (Feb 09 2018 - 11:51:50 +0000)
Trying to boot from MMC2
omap_hsmmc_send_cmd : DMA timeout: No status update
mmc_init: -110, time 1026
spl: mmc init failed with error: -110
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
Bisecting it out, it's this commit:
f0d53e8 mmc: omap_hsmmc: Add support for DMA (ADMA2)
drivers/mmc/omap_hsmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index b12d6d9..c6b3f25 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -918,7 +918,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
struct mmc_config *cfg;
uint host_caps_val;
- priv = malloc(sizeof(*priv));
+ priv = calloc(1, sizeof(*priv));
if (priv == NULL)
return -1;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: Fix uninitialised priv member
2018-02-09 15:24 ` [U-Boot] [PATCH] mmc: Fix uninitialised priv member Alex Kiernan
@ 2018-02-15 21:07 ` Robert Nelson
2018-02-15 21:31 ` Sam Protsenko
2018-02-19 11:23 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Robert Nelson @ 2018-02-15 21:07 UTC (permalink / raw)
To: u-boot
On Fri, Feb 9, 2018 at 9:24 AM, Alex Kiernan <alex.kiernan@gmail.com> wrote:
> When using omap_hsmmc without the device model then the allocation
> of mmc->priv ends up uninitialised.
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Awesome!
This fixes: am335x_boneblack_defconfig
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Regards,
--
Robert Nelson
https://rcn-ee.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: Fix uninitialised priv member
2018-02-09 15:24 ` [U-Boot] [PATCH] mmc: Fix uninitialised priv member Alex Kiernan
2018-02-15 21:07 ` Robert Nelson
@ 2018-02-15 21:31 ` Sam Protsenko
2018-02-19 11:23 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Sam Protsenko @ 2018-02-15 21:31 UTC (permalink / raw)
To: u-boot
On 9 February 2018 at 17:24, Alex Kiernan <alex.kiernan@gmail.com> wrote:
> When using omap_hsmmc without the device model then the allocation
> of mmc->priv ends up uninitialised.
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
A good one, thanks!
> ---
> I've a board (AM335xx based) which boots fine with 2018-01, with
> 2018-03-rc1 (actually 1811a92) it fails in the MLO:
>
> U-Boot SPL 2018.03-rc1-00222-g128a503-dirty (Feb 09 2018 - 11:51:50 +0000)
> Trying to boot from MMC2
> omap_hsmmc_send_cmd : DMA timeout: No status update
> mmc_init: -110, time 1026
> spl: mmc init failed with error: -110
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
>
> Bisecting it out, it's this commit:
>
> f0d53e8 mmc: omap_hsmmc: Add support for DMA (ADMA2)
>
> drivers/mmc/omap_hsmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index b12d6d9..c6b3f25 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -918,7 +918,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
> struct mmc_config *cfg;
> uint host_caps_val;
>
> - priv = malloc(sizeof(*priv));
> + priv = calloc(1, sizeof(*priv));
> if (priv == NULL)
> return -1;
>
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] mmc: Fix uninitialised priv member
2018-02-09 15:24 ` [U-Boot] [PATCH] mmc: Fix uninitialised priv member Alex Kiernan
2018-02-15 21:07 ` Robert Nelson
2018-02-15 21:31 ` Sam Protsenko
@ 2018-02-19 11:23 ` Jaehoon Chung
2 siblings, 0 replies; 4+ messages in thread
From: Jaehoon Chung @ 2018-02-19 11:23 UTC (permalink / raw)
To: u-boot
On 02/10/2018 12:24 AM, Alex Kiernan wrote:
> When using omap_hsmmc without the device model then the allocation
> of mmc->priv ends up uninitialised.
>
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Applied to u-boot-mmc. Thanks!
Best Regards,
Jaehoon Chung
> ---
> I've a board (AM335xx based) which boots fine with 2018-01, with
> 2018-03-rc1 (actually 1811a92) it fails in the MLO:
>
> U-Boot SPL 2018.03-rc1-00222-g128a503-dirty (Feb 09 2018 - 11:51:50 +0000)
> Trying to boot from MMC2
> omap_hsmmc_send_cmd : DMA timeout: No status update
> mmc_init: -110, time 1026
> spl: mmc init failed with error: -110
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
>
> Bisecting it out, it's this commit:
>
> f0d53e8 mmc: omap_hsmmc: Add support for DMA (ADMA2)
>
> drivers/mmc/omap_hsmmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index b12d6d9..c6b3f25 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -918,7 +918,7 @@ int omap_mmc_init(int dev_index, uint host_caps_mask, uint f_max, int cd_gpio,
> struct mmc_config *cfg;
> uint host_caps_val;
>
> - priv = malloc(sizeof(*priv));
> + priv = calloc(1, sizeof(*priv));
> if (priv == NULL)
> return -1;
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-02-19 11:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20180209152447epcas1p2372efef50fea89e47b8a73383673cd97@epcas1p2.samsung.com>
2018-02-09 15:24 ` [U-Boot] [PATCH] mmc: Fix uninitialised priv member Alex Kiernan
2018-02-15 21:07 ` Robert Nelson
2018-02-15 21:31 ` Sam Protsenko
2018-02-19 11:23 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.