Message ID | 1466973835-18125-1-git-send-email-mateusz.kulikowski@gmail.com |
---|---|
State | Accepted |
Commit | eb9d3ca3560d9348f2db83beb2f51a85806519dd |
Delegated to: | Tom Rini |
Headers | show |
On 26 June 2016 at 13:43, Mateusz Kulikowski <mateusz.kulikowski@gmail.com> wrote: > MMC core expects (now) valid mmc->dev pointer. > During conversion in commit cffe5d86 not every driver was updated. > > This patch fixes crash while accessing MMC on > boards using Qualcomm SDHCI controller. > > Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> > --- > This patch fixes MMC support on dragonboard. > > Without it attempts to access MMC caused null-pointer derefernece. > > > drivers/mmc/msm_sdhci.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Acked-by: Simon Glass <sjg@chromium.org>
Friendly poke, I would really like to see that in 2016.07 release as MMC is currently not working for dragonboard :( Mateusz On 26.06.2016 22:43, Mateusz Kulikowski wrote: > MMC core expects (now) valid mmc->dev pointer. > During conversion in commit cffe5d86 not every driver was updated. > > This patch fixes crash while accessing MMC on > boards using Qualcomm SDHCI controller. > > Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> > --- > This patch fixes MMC support on dragonboard. > > Without it attempts to access MMC caused null-pointer derefernece. > > > drivers/mmc/msm_sdhci.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c > index 64bbf0c..96dcdbe 100644 > --- a/drivers/mmc/msm_sdhci.c > +++ b/drivers/mmc/msm_sdhci.c > @@ -136,7 +136,12 @@ static int msm_sdc_probe(struct udevice *dev) > host->version = sdhci_readw(host, SDHCI_HOST_VERSION); > > /* automatically detect max and min speed */ > - return add_sdhci(host, 0, 0); > + ret = add_sdhci(host, 0, 0); > + if (ret) > + return ret; > + host->mmc->dev = dev; > + > + return 0; > } > > static int msm_sdc_remove(struct udevice *dev) >
On Sun, Jun 26, 2016 at 10:43:55PM +0200, Mateusz Kulikowski wrote: > MMC core expects (now) valid mmc->dev pointer. > During conversion in commit cffe5d86 not every driver was updated. > > This patch fixes crash while accessing MMC on > boards using Qualcomm SDHCI controller. > > Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> > Acked-by: Simon Glass <sjg@chromium.org> Applied to u-boot/master, thanks!
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c index 64bbf0c..96dcdbe 100644 --- a/drivers/mmc/msm_sdhci.c +++ b/drivers/mmc/msm_sdhci.c @@ -136,7 +136,12 @@ static int msm_sdc_probe(struct udevice *dev) host->version = sdhci_readw(host, SDHCI_HOST_VERSION); /* automatically detect max and min speed */ - return add_sdhci(host, 0, 0); + ret = add_sdhci(host, 0, 0); + if (ret) + return ret; + host->mmc->dev = dev; + + return 0; } static int msm_sdc_remove(struct udevice *dev)
MMC core expects (now) valid mmc->dev pointer. During conversion in commit cffe5d86 not every driver was updated. This patch fixes crash while accessing MMC on boards using Qualcomm SDHCI controller. Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> --- This patch fixes MMC support on dragonboard. Without it attempts to access MMC caused null-pointer derefernece. drivers/mmc/msm_sdhci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)