Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
This reverts commit 04a2ea248f58b3b6216d0cd0a6b8698df8b14355.
That commit is causing reboot loops on Nokia N900 and basically make U-Boot on Nokia N900 unusable. Revert it for now until problem is solved.
After reverting that commit U-Boot on Nokia N900 is working again.
--- drivers/mmc/mmc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/mmc/mmc.c +1 -12
@@ -2800,18 +2800,7 @@ int mmc_get_op_cond(struct mmc *mmc)MMC_QUIRK_RETRY_APP_CMD ;#endif - err =mmc_power_cycle (mmc); -if (err) { -/* -* if power cycling is not supported, we should not try -* to use the UHS modes, because we wouldn't be able to -* recover from an error during the UHS initialization. -*/ -pr_debug ("Unable to do a full power cycle. Disabling the UHS modes for safety\n" ); - uhs_en = false; - mmc->host_caps &= ~UHS_CAPS ; - err =mmc_power_on (mmc); - } + err =mmc_power_on (mmc);if (err)return err;
Signature · 1 line
2.20.1
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Got time to take a look?
Thanks,
Peng.
Quoted 40 lines
This reverts commit
04a2ea248f58b3b6216d0cd0a6b8698df8b14355.That commit is causing reboot loops on Nokia N900 and basically make U-Boot on Nokia N900 unusable. Revert it for now until problem is solved.
After reverting that commit U-Boot on Nokia N900 is working again.
Signed-off-by Pali Roh?r <[email protected]>--- drivers/mmc/mmc.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-)drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0
-0
d79cdef62e..48c1629a19100644drivers/mmc/mmc.c +1
-13@@ -2800,18 +2800,7 @@ int mmc_get_op_cond(struct mmc *mmc)MMC_QUIRK_RETRY_APP_CMD ;#endif - err =mmc_power_cycle (mmc); -if (err) { -/* -* if power cycling is not supported, we should not try -* to use the UHS modes, because we wouldn't be able to -* recover from an error during the UHS initialization. -*/ - pr_debug("Unable to do a full power cycle. Disabling the UHS modes for safety\n"); - uhs_en = false; - mmc->host_caps &= ~UHS_CAPS; - err =mmc_power_on (mmc); - } + err =mmc_power_on (mmc);if (err)return err; --2.20.1
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Pali, Peng,
Quoted 7 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
Thanks,
Faiz
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Month ago I was able to detect that problem is somewhere in function mmc_set_ios() from mmc.c file. I put long debug line prior and also after mmc_set_ios() call. And it was printed only prior. Not after. So I think NULL pointer dereference is in mmc_set_ios() function.
I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Pali,
Quoted 18 lines · Pali Roh?r
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Quoted 9 lines
Month ago I was able to detect that problem is somewhere in function
mmc_set_ios()frommmc.cfile. I put long debug line prior and also aftermmc_set_ios()call. And it was printed only prior. Not after. So I think NULL pointer dereference is inmmc_set_ios()function.I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
You can continue to bisect into omap_hsmmc_set_ios() to see at what point the NULL pointer gets triggered and what the NULL pointer is. Also can you point to your config file?
Thanks,
Faiz
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 26 lines · On Tuesday 11 August 2020 21:33:19 Faiz Abbas wrote:
Pali,
Quoted 23 lines · Pali Roh?r
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Month ago I was able to detect that problem is somewhere in function
mmc_set_ios()frommmc.cfile. I put long debug line prior and also aftermmc_set_ios()call. And it was printed only prior. Not after. So I think NULL pointer dereference is inmmc_set_ios()function.
Quoted 7 lines
Quoted 4 lines
I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
You can continue to bisect into
omap_hsmmc_set_ios()to see at what point the NULL pointer gets triggered and what the NULL pointer is.
I could try it, but I do not think I would be able to gather more data. I will try to find free time for this debugging on device either at the end of this week or end of next week.
As I wrote in previous thread, main issue which makes it hard to debug is that this error is not triggered in emulator.
Quoted 1 line
Also can you point to your config file?
I'm using standard config file without any modifications. It is:
configs/nokia_rx51_defconfig
In case you are interested, I'm compiling u-boot by commands:
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
make nokia_rx51_config
make -j12 u-boot.bin
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 32 lines · On Tuesday 11 August 2020 18:27:23 Pali Roh?r wrote:
Quoted 31 lines · On Tuesday 11 August 2020 21:33:19 Faiz Abbas wrote:
Pali,
Quoted 27 lines · Pali Roh?r
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Month ago I was able to detect that problem is somewhere in function
mmc_set_ios()frommmc.cfile. I put long debug line prior and also aftermmc_set_ios()call. And it was printed only prior. Not after. So I think NULL pointer dereference is inmmc_set_ios()function.I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
Quoted 6 lines
Quoted 2 lines
You can continue to bisect into
omap_hsmmc_set_ios()to see at what point the NULL pointer gets triggered and what the NULL pointer is.I could try it, but I do not think I would be able to gather more data. I will try to find free time for this debugging on device either at the end of this week or end of next week.
Here are more details. Crash is in omap_hsmmc_stop_clock() function when trying to dereference mmc_base->sysctl.
Call trace is:
mmc_set_ios --> mmc->cfg->ops->set_ios --> omap_hsmmc_set_ios --> omap_hsmmc_stop_clock
I applied following diff
drivers/mmc/omap_hsmmc.c +11 -0
@@ -22,6 +22,8 @@* MA 02111-1307 USA */ +#define DEBUG +#include <config.h> #include <common.h> #include <cpu_func.h>
@@ -1335,7 +1337,16 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,#endif static void omap_hsmmc_stop_clock (struct hsmmc *mmc_base) { +debug ("omap_hsmmc_stop_clock: before writel\n" ); +debug ("mmc_base=%p\n" , mmc_base); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("mmc_base->sysctl=%x\n" , mmc_base->sysctl); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("readl(&mmc_base->sysctl)=%x\n" ,readl (&mmc_base->sysctl));writel (readl (&mmc_base->sysctl) & ~CEN_ENABLE , &mmc_base->sysctl); +debug ("omap_hsmmc_stop_clock: after writel\n" ); }static void omap_hsmmc_start_clock (struct hsmmc *mmc_base)
and I see that first word "barrier" is written. There is no "mmc_base->sysctl=" string on output display.
If you are interested, mmc_base has value 480b4000.
That is probably all what I can do.
Quoted 14 lines
As I wrote in previous thread, main issue which makes it hard to debug is that this error is not triggered in emulator.
Quoted 1 line
Also can you point to your config file?
I'm using standard config file without any modifications. It is:
configs/nokia_rx51_defconfigIn case you are interested, I'm compiling u-boot by commands:
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
makenokia_rx51_config
make -j12 u-boot.bin
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Hello Faiz! Do you need any other details for this issue?
Quoted 101 lines · On Friday 14 August 2020 22:16:00 Pali Roh?r wrote:
Quoted 32 lines · On Tuesday 11 August 2020 18:27:23 Pali Roh?r wrote:
Quoted 31 lines · On Tuesday 11 August 2020 21:33:19 Faiz Abbas wrote:
Pali,
Quoted 27 lines · Pali Roh?r
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Month ago I was able to detect that problem is somewhere in function
mmc_set_ios()frommmc.cfile. I put long debug line prior and also aftermmc_set_ios()call. And it was printed only prior. Not after. So I think NULL pointer dereference is inmmc_set_ios()function.I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
Quoted 6 lines
Quoted 2 lines
You can continue to bisect into
omap_hsmmc_set_ios()to see at what point the NULL pointer gets triggered and what the NULL pointer is.I could try it, but I do not think I would be able to gather more data. I will try to find free time for this debugging on device either at the end of this week or end of next week.
Here are more details. Crash is in
omap_hsmmc_stop_clock()function when trying to dereferencemmc_base->sysctl.Call trace is:
mmc_set_ios-->mmc->cfg->ops->set_ios-->omap_hsmmc_set_ios-->omap_hsmmc_stop_clockI applied following diff
drivers/mmc/omap_hsmmc.c +11
-0@@ -22,6 +22,8 @@* MA 02111-1307 USA */ +#define DEBUG +#include <config.h> #include <common.h> #include <cpu_func.h> @@ -1335,7 +1337,16 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,#endif static void omap_hsmmc_stop_clock (struct hsmmc *mmc_base) { +debug ("omap_hsmmc_stop_clock: before writel\n" ); +debug ("mmc_base=%p\n" , mmc_base); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("mmc_base->sysctl=%x\n" , mmc_base->sysctl); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("readl(&mmc_base->sysctl)=%x\n" ,readl (&mmc_base->sysctl));writel (readl (&mmc_base->sysctl) & ~CEN_ENABLE , &mmc_base->sysctl); +debug ("omap_hsmmc_stop_clock: after writel\n" ); }static void omap_hsmmc_start_clock (struct hsmmc *mmc_base)and I see that first word "barrier" is written. There is no "mmc_base->sysctl=" string on output display.
If you are interested,
mmc_basehas value480b4000.That is probably all what I can do.
Quoted 14 lines
As I wrote in previous thread, main issue which makes it hard to debug is that this error is not triggered in emulator.
Quoted 1 line
Also can you point to your config file?
I'm using standard config file without any modifications. It is:
configs/nokia_rx51_defconfigIn case you are interested, I'm compiling u-boot by commands:
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
makenokia_rx51_config
make -j12 u-boot.bin
PATCH 1/1 Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Ivo found workaround for this issue. I will send a patch for it.
Quoted 104 lines · On Friday 25 September 2020 00:03:24 Pali Roh?r wrote:
Hello Faiz! Do you need any other details for this issue?
Quoted 101 lines · On Friday 14 August 2020 22:16:00 Pali Roh?r wrote:
Quoted 32 lines · On Tuesday 11 August 2020 18:27:23 Pali Roh?r wrote:
Quoted 31 lines · On Tuesday 11 August 2020 21:33:19 Faiz Abbas wrote:
Pali,
Quoted 27 lines · Pali Roh?r
Quoted 8 lines · On Tuesday 11 August 2020 08:39:24 Faiz Abbas wrote:
Pali, Peng,
Quoted 5 lines · Peng Fan
Faiz, Jean
Quoted 2 lines
Subject: [PATCH] Revert "mmc: disable UHS modes if Vcc cannot be switched on and off"
Quoted 6 lines
Quoted 2 lines
Got time to take a look?
When this issue was reported in the last thread, Pali said that he was unable to get prints because of the constant reboot loops? Shouldn't it be easy to put while(1) at different points in this execution and see which step causes the reboot loop?
In May in that last thread I wrote details which I was able to gather:
Month ago I was able to detect that problem is somewhere in function
mmc_set_ios()frommmc.cfile. I put long debug line prior and also aftermmc_set_ios()call. And it was printed only prior. Not after. So I think NULL pointer dereference is inmmc_set_ios()function.I could try with that while(1) loop to print detailed log message and read/capture it. But what information for debugging you need? Or what do you want to print which could help you?
Quoted 6 lines
Quoted 2 lines
You can continue to bisect into
omap_hsmmc_set_ios()to see at what point the NULL pointer gets triggered and what the NULL pointer is.I could try it, but I do not think I would be able to gather more data. I will try to find free time for this debugging on device either at the end of this week or end of next week.
Here are more details. Crash is in
omap_hsmmc_stop_clock()function when trying to dereferencemmc_base->sysctl.Call trace is:
mmc_set_ios-->mmc->cfg->ops->set_ios-->omap_hsmmc_set_ios-->omap_hsmmc_stop_clockI applied following diff
drivers/mmc/omap_hsmmc.c +11
-0@@ -22,6 +22,8 @@* MA 02111-1307 USA */ +#define DEBUG +#include <config.h> #include <common.h> #include <cpu_func.h> @@ -1335,7 +1337,16 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,#endif static void omap_hsmmc_stop_clock (struct hsmmc *mmc_base) { +debug ("omap_hsmmc_stop_clock: before writel\n" ); +debug ("mmc_base=%p\n" , mmc_base); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("mmc_base->sysctl=%x\n" , mmc_base->sysctl); +debug ("barrier\n" ); + asmvolatile ("" ); +debug ("readl(&mmc_base->sysctl)=%x\n" ,readl (&mmc_base->sysctl));writel (readl (&mmc_base->sysctl) & ~CEN_ENABLE , &mmc_base->sysctl); +debug ("omap_hsmmc_stop_clock: after writel\n" ); }static void omap_hsmmc_start_clock (struct hsmmc *mmc_base)and I see that first word "barrier" is written. There is no "mmc_base->sysctl=" string on output display.
If you are interested,
mmc_basehas value480b4000.That is probably all what I can do.
Quoted 14 lines
As I wrote in previous thread, main issue which makes it hard to debug is that this error is not triggered in emulator.
Quoted 1 line
Also can you point to your config file?
I'm using standard config file without any modifications. It is:
configs/nokia_rx51_defconfigIn case you are interested, I'm compiling u-boot by commands:
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabi-
makenokia_rx51_config
make -j12 u-boot.bin