All of lore.kernel.org
 help / color / mirror / Atom feed
* Sandisk MMC I/O errors
@ 2014-08-05 14:26 Jean-Michel Hautbois
  2014-08-05 15:13 ` Fabio Estevam
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-05 14:26 UTC (permalink / raw)
  To: linux-mmc; +Cc: jean-michel.hautbois

Hi all,

I have a custom board based on a i.MX6 SoC and it has a Sandisk eMMC
(SDIN5D1-2G).
When booting a vanilla kernel, I get lots of I/O errors.
Before investigating, I would like to know if this is a known issue.

Here is the full dmesg :

[    1.346762] mmcblk1: mmc1:0001 SEM02G 1.82 GiB
[    1.350142] mmcblk1boot0: mmc1:0001 SEM02G partition 1 1.00 MiB
[    1.354901] mmcblk1boot1: mmc1:0001 SEM02G partition 2 1.00 MiB
[    1.359643] mmcblk1rpmb: mmc1:0001 SEM02G partition 3 128 KiB
[    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
cmd response 0x900, card status 0xb00
[    1.374409] mmcblk1: retrying using single block read
[    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
cmd response 0x900, card status 0x0
[    1.386762] end_request: I/O error, dev mmcblk1, sector 0
[    1.413406] mmcblk1: error -84 transferring data, sector 1, nr 7,
cmd response 0x900, card status 0x0
[    1.421363] end_request: I/O error, dev mmcblk1, sector 1
[    1.425771] mmcblk1: error -84 transferring data, sector 2, nr 6,
cmd response 0x900, card status 0x0
[    1.425778] end_request: I/O error, dev mmcblk1, sector 2
[    1.426069] mmcblk1: error -84 transferring data, sector 3, nr 5,
cmd response 0x900, card status 0x0
[    1.426076] end_request: I/O error, dev mmcblk1, sector 3
[    1.426366] mmcblk1: error -84 transferring data, sector 4, nr 4,
cmd response 0x900, card status 0x0
[    1.426373] end_request: I/O error, dev mmcblk1, sector 4
[    1.426663] mmcblk1: error -84 transferring data, sector 5, nr 3,
cmd response 0x900, card status 0x0
[    1.426670] end_request: I/O error, dev mmcblk1, sector 5
[    1.426958] mmcblk1: error -84 transferring data, sector 6, nr 2,
cmd response 0x900, card status 0x0
[    1.426965] end_request: I/O error, dev mmcblk1, sector 6
[    1.427253] mmcblk1: error -84 transferring data, sector 7, nr 1,
cmd response 0x900, card status 0x0
[    1.427260] end_request: I/O error, dev mmcblk1, sector 7
[    1.427267] Buffer I/O error on device mmcblk1, logical block 0
[    1.520695] mmcblk1: error -84 transferring data, sector 0, nr 8,
cmd response 0x900, card status 0xb00
[    1.557473] mmcblk1: retrying using single block read
[    1.566322] mmcblk1: error -84 transferring data, sector 0, nr 8,
cmd response 0x900, card status 0x0
[    1.604661] end_request: I/O error, dev mmcblk1, sector 0
[    1.609037] mmcblk1: error -84 transferring data, sector 1, nr 7,
cmd response 0x900, card status 0x0
[    1.616988] end_request: I/O error, dev mmcblk1, sector 1
[    1.621380] mmcblk1: error -84 transferring data, sector 2, nr 6,
cmd response 0x900, card status 0x0
[    1.629571] mmcblk1: error -84 transferring data, sector 3, nr 5,
cmd response 0x900, card status 0x0
[    1.637799] mmcblk1: error -84 transferring data, sector 4, nr 4,
cmd response 0x900, card status 0x0
[    1.646033] mmcblk1: error -84 transferring data, sector 5, nr 3,
cmd response 0x900, card status 0x0
[    1.654268] mmcblk1: error -84 transferring data, sector 6, nr 2,
cmd response 0x900, card status 0x0
[    1.662515] mmcblk1: error -84 transferring data, sector 7, nr 1,
cmd response 0x900, card status 0x0
[    1.670461] Buffer I/O error on device mmcblk1, logical block 0
[    1.675099]  mmcblk1: unable to read partition table
[    1.682365] mmcblk1boot1: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0xb00
[    1.691986] mmcblk1boot1: retrying using single block read
[    1.696442] mmcblk1boot1: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0x0
[    1.705449] mmcblk1boot1: error -84 transferring data, sector 1, nr
7, cmd response 0x900, card status 0x0
[    1.714322] mmcblk1boot1: error -84 transferring data, sector 2, nr
6, cmd response 0x900, card status 0x0
[    1.723424] mmcblk1boot1: error -84 transferring data, sector 3, nr
5, cmd response 0x900, card status 0x0
[    1.732507] mmcblk1boot1: error -84 transferring data, sector 4, nr
4, cmd response 0x900, card status 0x0
[    1.741569] mmcblk1boot1: error -84 transferring data, sector 5, nr
3, cmd response 0x900, card status 0x0
[    1.750762] mmcblk1boot1: error -84 transferring data, sector 6, nr
2, cmd response 0x900, card status 0x0
[    1.759745] mmcblk1boot1: error -84 transferring data, sector 7, nr
1, cmd response 0x900, card status 0x0
[    1.768105] Buffer I/O error on device mmcblk1boot1, logical block 0
[    1.774224] mmcblk1boot1: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0xb00
[    1.783320] mmcblk1boot1: retrying using single block read
[    1.787776] mmcblk1boot1: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0x0
[    1.796600] mmcblk1boot1: error -84 transferring data, sector 1, nr
7, cmd response 0x900, card status 0x0
[    1.806249] mmcblk1boot1: error -84 transferring data, sector 2, nr
6, cmd response 0x900, card status 0x0
[    1.815130] mmcblk1boot1: error -84 transferring data, sector 3, nr
5, cmd response 0x900, card status 0x0
[    1.824109] mmcblk1boot1: error -84 transferring data, sector 4, nr
4, cmd response 0x900, card status 0x0
[    1.832785] mmcblk1boot1: error -84 transferring data, sector 5, nr
3, cmd response 0x900, card status 0x0
[    1.842041] mmcblk1boot1: error -84 transferring data, sector 6, nr
2, cmd response 0x900, card status 0x0
[    1.850854] mmcblk1boot1: error -84 transferring data, sector 7, nr
1, cmd response 0x900, card status 0x0
[    1.859403] Buffer I/O error on device mmcblk1boot1, logical block 0
[    1.864681]  mmcblk1boot1: unable to read partition table
[    1.869905] mmcblk1boot0: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0xb00
[    1.878753] mmcblk1boot0: retrying using single block read
[    1.883798] mmcblk1boot0: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0x0
[    1.892674] mmcblk1boot0: error -84 transferring data, sector 1, nr
7, cmd response 0x900, card status 0x0
[    1.902740] mmcblk1boot0: error -84 transferring data, sector 2, nr
6, cmd response 0x900, card status 0x0
[    1.911604] mmcblk1boot0: error -84 transferring data, sector 3, nr
5, cmd response 0x900, card status 0x0
[    1.920287] mmcblk1boot0: error -84 transferring data, sector 4, nr
4, cmd response 0x900, card status 0x0
[    1.928900] mmcblk1boot0: error -84 transferring data, sector 5, nr
3, cmd response 0x900, card status 0x0
[    1.939773] mmcblk1boot0: error -84 transferring data, sector 6, nr
2, cmd response 0x900, card status 0x0
[    1.948437] mmcblk1boot0: error -84 transferring data, sector 7, nr
1, cmd response 0x900, card status 0x0
[    1.956917] Buffer I/O error on device mmcblk1boot0, logical block 0
[    1.962548] mmcblk1boot0: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0xb00
[    1.971325] mmcblk1boot0: retrying using single block read
[    1.975828] mmcblk1boot0: error -84 transferring data, sector 0, nr
8, cmd response 0x900, card status 0x0
[    1.984565] mmcblk1boot0: error -84 transferring data, sector 1, nr
7, cmd response 0x900, card status 0x0
[    1.993267] mmcblk1boot0: error -84 transferring data, sector 2, nr
6, cmd response 0x900, card status 0x0
[    2.001976] mmcblk1boot0: error -84 transferring data, sector 3, nr
5, cmd response 0x900, card status 0x0
[    2.010703] mmcblk1boot0: error -84 transferring data, sector 4, nr
4, cmd response 0x900, card status 0x0
[    2.019406] mmcblk1boot0: error -84 transferring data, sector 5, nr
3, cmd response 0x900, card status 0x0
[    2.028127] mmcblk1boot0: error -84 transferring data, sector 6, nr
2, cmd response 0x900, card status 0x0
[    2.036844] mmcblk1boot0: error -84 transferring data, sector 7, nr
1, cmd response 0x900, card status 0x0
[    2.045304] Buffer I/O error on device mmcblk1boot0, logical block 0
[    2.050460]  mmcblk1boot0: unable to read partition table


Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 14:26 Sandisk MMC I/O errors Jean-Michel Hautbois
@ 2014-08-05 15:13 ` Fabio Estevam
  2014-08-05 15:20   ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Fabio Estevam @ 2014-08-05 15:13 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: linux-mmc

On Tue, Aug 5, 2014 at 11:26 AM, Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com> wrote:
> Hi all,
>
> I have a custom board based on a i.MX6 SoC and it has a Sandisk eMMC
> (SDIN5D1-2G).
> When booting a vanilla kernel, I get lots of I/O errors.
> Before investigating, I would like to know if this is a known issue.
>
> Here is the full dmesg :
>
> [    1.346762] mmcblk1: mmc1:0001 SEM02G 1.82 GiB
> [    1.350142] mmcblk1boot0: mmc1:0001 SEM02G partition 1 1.00 MiB
> [    1.354901] mmcblk1boot1: mmc1:0001 SEM02G partition 2 1.00 MiB
> [    1.359643] mmcblk1rpmb: mmc1:0001 SEM02G partition 3 128 KiB
> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
> cmd response 0x900, card status 0xb00

Just tested on a imx6q-sabresd running kernel 3.16 and it detects the
eMMC without errors:

mmcblk1: mmc2:0001 SEM08G 7.39 GiB
mmcblk1boot0: mmc2:0001 SEM08G partition 1 2.00 MiB
mmcblk1boot1: mmc2:0001 SEM08G partition 2 2.00 MiB
mmcblk1rpmb: mmc2:0001 SEM08G partition 3 128 KiB

In imx6qdl-sabresd.dtsi we have:

&usdhc4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc4>;
    bus-width = <8>;
    non-removable;
    no-1-8-v;
    status = "okay";
};

Also, please check your esdhc pinmux settings.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:13 ` Fabio Estevam
@ 2014-08-05 15:20   ` Jean-Michel Hautbois
  2014-08-05 15:35     ` Fabio Estevam
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-05 15:20 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mmc

2014-08-05 17:13 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
> On Tue, Aug 5, 2014 at 11:26 AM, Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com> wrote:
>> Hi all,
>>
>> I have a custom board based on a i.MX6 SoC and it has a Sandisk eMMC
>> (SDIN5D1-2G).
>> When booting a vanilla kernel, I get lots of I/O errors.
>> Before investigating, I would like to know if this is a known issue.
>>
>> Here is the full dmesg :
>>
>> [    1.346762] mmcblk1: mmc1:0001 SEM02G 1.82 GiB
>> [    1.350142] mmcblk1boot0: mmc1:0001 SEM02G partition 1 1.00 MiB
>> [    1.354901] mmcblk1boot1: mmc1:0001 SEM02G partition 2 1.00 MiB
>> [    1.359643] mmcblk1rpmb: mmc1:0001 SEM02G partition 3 128 KiB
>> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
>> cmd response 0x900, card status 0xb00
>
> Just tested on a imx6q-sabresd running kernel 3.16 and it detects the
> eMMC without errors:
>
> mmcblk1: mmc2:0001 SEM08G 7.39 GiB
> mmcblk1boot0: mmc2:0001 SEM08G partition 1 2.00 MiB
> mmcblk1boot1: mmc2:0001 SEM08G partition 2 2.00 MiB
> mmcblk1rpmb: mmc2:0001 SEM08G partition 3 128 KiB
>
> In imx6qdl-sabresd.dtsi we have:
>
> &usdhc4 {
>     pinctrl-names = "default";
>     pinctrl-0 = <&pinctrl_usdhc4>;
>     bus-width = <8>;
>     non-removable;
>     no-1-8-v;
>     status = "okay";
> };
>
> Also, please check your esdhc pinmux settings.

Thanks. Here are my settings (I used the imx6qdl-sabresd as an example) :

pinctrl_usdhc4: usdhc4grp {
  fsl,pins = <
    MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
    MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
    MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
    MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
    MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
    MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
    MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
    MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
    MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
    MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
  >;
};

&usdhc4 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_usdhc4>;
    bus-width = <8>;
    non-removable;
    no-1-8-v;
    status = "okay";
};

JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:20   ` Jean-Michel Hautbois
@ 2014-08-05 15:35     ` Fabio Estevam
  2014-08-05 15:44       ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Fabio Estevam @ 2014-08-05 15:35 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: linux-mmc

On Tue, Aug 5, 2014 at 12:20 PM, Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com> wrote:

> Thanks. Here are my settings (I used the imx6qdl-sabresd as an example) :
>
> pinctrl_usdhc4: usdhc4grp {
>   fsl,pins = <
>     MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
>     MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
>     MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
>     MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
>     MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
>     MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
>     MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
>     MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
>     MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
>     MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
>   >;
> };
>
> &usdhc4 {
>     pinctrl-names = "default";
>     pinctrl-0 = <&pinctrl_usdhc4>;
>     bus-width = <8>;
>     non-removable;
>     no-1-8-v;
>     status = "okay";
> };

Which kernel version are using? Does your board use the exact same
pins as mx6qsabresd for the eMMC?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:35     ` Fabio Estevam
@ 2014-08-05 15:44       ` Jean-Michel Hautbois
  2014-08-05 15:54         ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-05 15:44 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mmc

2014-08-05 17:35 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
> On Tue, Aug 5, 2014 at 12:20 PM, Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com> wrote:
>
>> Thanks. Here are my settings (I used the imx6qdl-sabresd as an example) :
>>
>> pinctrl_usdhc4: usdhc4grp {
>>   fsl,pins = <
>>     MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
>>     MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
>>     MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
>>     MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
>>     MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
>>     MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
>>     MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
>>     MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
>>     MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
>>     MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
>>   >;
>> };
>>
>> &usdhc4 {
>>     pinctrl-names = "default";
>>     pinctrl-0 = <&pinctrl_usdhc4>;
>>     bus-width = <8>;
>>     non-removable;
>>     no-1-8-v;
>>     status = "okay";
>> };
>
> Which kernel version are using? Does your board use the exact same
> pins as mx6qsabresd for the eMMC?

The kernel is 3.16, the pins are not exactly the same, as I have a
RST_n pin connected in my case, and not on the sabresd, but everything
else is the same (if I read mly schematics correctly)...

JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:44       ` Jean-Michel Hautbois
@ 2014-08-05 15:54         ` Jean-Michel Hautbois
  2014-08-05 15:59           ` Fabio Estevam
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-05 15:54 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mmc

2014-08-05 17:44 GMT+02:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-05 17:35 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
>> On Tue, Aug 5, 2014 at 12:20 PM, Jean-Michel Hautbois
>> <jean-michel.hautbois@vodalys.com> wrote:
>>
>>> Thanks. Here are my settings (I used the imx6qdl-sabresd as an example) :
>>>
>>> pinctrl_usdhc4: usdhc4grp {
>>>   fsl,pins = <
>>>     MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059
>>>     MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059
>>>     MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059
>>>     MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059
>>>     MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059
>>>     MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059
>>>     MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059
>>>     MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059
>>>     MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059
>>>     MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059
>>>   >;
>>> };
>>>
>>> &usdhc4 {
>>>     pinctrl-names = "default";
>>>     pinctrl-0 = <&pinctrl_usdhc4>;
>>>     bus-width = <8>;
>>>     non-removable;
>>>     no-1-8-v;
>>>     status = "okay";
>>> };
>>
>> Which kernel version are using? Does your board use the exact same
>> pins as mx6qsabresd for the eMMC?
>
> The kernel is 3.16, the pins are not exactly the same, as I have a
> RST_n pin connected in my case, and not on the sabresd, but everything
> else is the same (if I read mly schematics correctly)...
>
> JM

I also tried the same pinmux conf on the Freescale repository, and it
works correctly...
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.10.17_1.0.0_ga

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:54         ` Jean-Michel Hautbois
@ 2014-08-05 15:59           ` Fabio Estevam
  2014-08-05 16:01             ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Fabio Estevam @ 2014-08-05 15:59 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: linux-mmc

On Tue, Aug 5, 2014 at 12:54 PM, Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com> wrote:

> I also tried the same pinmux conf on the Freescale repository, and it
> works correctly...
> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.10.17_1.0.0_ga

I did not understand.

Could you paste the working pinmux that worked for you?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 15:59           ` Fabio Estevam
@ 2014-08-05 16:01             ` Jean-Michel Hautbois
  2014-08-06  1:15               ` Hsin-Hsiang Tseng
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-05 16:01 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: linux-mmc

2014-08-05 17:59 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
> On Tue, Aug 5, 2014 at 12:54 PM, Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com> wrote:
>
>> I also tried the same pinmux conf on the Freescale repository, and it
>> works correctly...
>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.10.17_1.0.0_ga
>
> I did not understand.
>
> Could you paste the working pinmux that worked for you?

This is the same pinmux, but tested on 3.16 and on the Freescale kernel.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-05 16:01             ` Jean-Michel Hautbois
@ 2014-08-06  1:15               ` Hsin-Hsiang Tseng
  2014-08-06  6:54                 ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Hsin-Hsiang Tseng @ 2014-08-06  1:15 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Fabio Estevam, linux-mmc

from your log, maybe you should check the driver use byte mode or
sector mode to access eMMC.
Because the capacity of eMMC which you used is less or equal to 2GB.


2014-08-06 0:01 GMT+08:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-05 17:59 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
>> On Tue, Aug 5, 2014 at 12:54 PM, Jean-Michel Hautbois
>> <jean-michel.hautbois@vodalys.com> wrote:
>>
>>> I also tried the same pinmux conf on the Freescale repository, and it
>>> works correctly...
>>> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/log/?h=imx_3.10.17_1.0.0_ga
>>
>> I did not understand.
>>
>> Could you paste the working pinmux that worked for you?
>
> This is the same pinmux, but tested on 3.16 and on the Freescale kernel.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06  1:15               ` Hsin-Hsiang Tseng
@ 2014-08-06  6:54                 ` Jean-Michel Hautbois
  2014-08-06 11:44                   ` Jaehoon Chung
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-06  6:54 UTC (permalink / raw)
  To: Hsin-Hsiang Tseng; +Cc: Fabio Estevam, linux-mmc

2014-08-06 3:15 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
> from your log, maybe you should check the driver use byte mode or
> sector mode to access eMMC.
> Because the capacity of eMMC which you used is less or equal to 2GB.

How can I know that ?
FYI :
$> cat /sys/kernel/debug/mmc1/ios
clock:          52000000 Hz
actual clock:   49500000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      3 (8 bits)
timing spec:    8 (mmc DDR52)
signal voltage: 0 (3.30 V)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06  6:54                 ` Jean-Michel Hautbois
@ 2014-08-06 11:44                   ` Jaehoon Chung
  2014-08-06 13:27                     ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jaehoon Chung @ 2014-08-06 11:44 UTC (permalink / raw)
  To: Jean-Michel Hautbois, Hsin-Hsiang Tseng; +Cc: Fabio Estevam, linux-mmc

Hi,

In my case, -84 error is related with timing.
I recommend to check your clock source or pin strength.

Best Regards,
Jaehoon Chung

On 08/06/2014 03:54 PM, Jean-Michel Hautbois wrote:
> 2014-08-06 3:15 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>> from your log, maybe you should check the driver use byte mode or
>> sector mode to access eMMC.
>> Because the capacity of eMMC which you used is less or equal to 2GB.
> 
> How can I know that ?
> FYI :
> $> cat /sys/kernel/debug/mmc1/ios
> clock:          52000000 Hz
> actual clock:   49500000 Hz
> vdd:            21 (3.3 ~ 3.4 V)
> bus mode:       2 (push-pull)
> chip select:    0 (don't care)
> power mode:     2 (on)
> bus width:      3 (8 bits)
> timing spec:    8 (mmc DDR52)
> signal voltage: 0 (3.30 V)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06 11:44                   ` Jaehoon Chung
@ 2014-08-06 13:27                     ` Jean-Michel Hautbois
  2014-08-06 13:37                       ` Fabio Estevam
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-06 13:27 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Hsin-Hsiang Tseng, Fabio Estevam, linux-mmc

2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
> Hi,

Hi Jaehoon,

> In my case, -84 error is related with timing.
> I recommend to check your clock source or pin strength.

Thanks for this advice.
In fact, it seems that the clock is not correct, as stated by the kernel :

$> cat /sys/kernel/debug/mmc1/ios
clock:          52000000 Hz
actual clock:   49500000 Hz

But I can't find out why because the clock comes on the SD4_CLK pin,
and this is directly connected to the i.MX6 processor.
And it is not a HW problem because as I said before, on Freescale
repository, it works...

JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06 13:27                     ` Jean-Michel Hautbois
@ 2014-08-06 13:37                       ` Fabio Estevam
  2014-08-06 14:21                         ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Fabio Estevam @ 2014-08-06 13:37 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Jaehoon Chung, Hsin-Hsiang Tseng, linux-mmc

On Wed, Aug 6, 2014 at 10:27 AM, Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com> wrote:
> 2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>> Hi,
>
> Hi Jaehoon,
>
>> In my case, -84 error is related with timing.
>> I recommend to check your clock source or pin strength.
>
> Thanks for this advice.
> In fact, it seems that the clock is not correct, as stated by the kernel :
>
> $> cat /sys/kernel/debug/mmc1/ios
> clock:          52000000 Hz
> actual clock:   49500000 Hz
>
> But I can't find out why because the clock comes on the SD4_CLK pin,
> and this is directly connected to the i.MX6 processor.
> And it is not a HW problem because as I said before, on Freescale
> repository, it works...

Try to compare the mmc clock tree in the FSL kernel versus 3.16:

mount -t debugfs none /sys/kernel/debug/
cat /sys/kernel/debug/clk/clk_dump

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06 13:37                       ` Fabio Estevam
@ 2014-08-06 14:21                         ` Jean-Michel Hautbois
  2014-08-07  6:59                           ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-06 14:21 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Jaehoon Chung, Hsin-Hsiang Tseng, linux-mmc

2014-08-06 15:37 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
> On Wed, Aug 6, 2014 at 10:27 AM, Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com> wrote:
>> 2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>> Hi,
>>
>> Hi Jaehoon,
>>
>>> In my case, -84 error is related with timing.
>>> I recommend to check your clock source or pin strength.
>>
>> Thanks for this advice.
>> In fact, it seems that the clock is not correct, as stated by the kernel :
>>
>> $> cat /sys/kernel/debug/mmc1/ios
>> clock:          52000000 Hz
>> actual clock:   49500000 Hz
>>
>> But I can't find out why because the clock comes on the SD4_CLK pin,
>> and this is directly connected to the i.MX6 processor.
>> And it is not a HW problem because as I said before, on Freescale
>> repository, it works...
>
> Try to compare the mmc clock tree in the FSL kernel versus 3.16:
>
> mount -t debugfs none /sys/kernel/debug/
> cat /sys/kernel/debug/clk/clk_dump

I have the following on 3.10.17 for usdhc4 :
"usdhc4_sel": { "enable_count": 0,"prepare_count": 0,"rate":
396000000,"usdhc4_podf": { "enable_count": 0,"prepare_count":
0,"rate": 198000000,"usdhc4": { "enable_count": 0,"prepare_count":
0,"rate": 198000000,"gpmi_bch": { "enable_count": 0,"prepare_count":
0,"rate": 198000000}}}},

And for 3.16 :
"usdhc4_sel": { "enable_count": 0,"prepare_count": 0,"rate":
396000000"accuracy": 0,"usdhc4_podf": { "enable_count":
0,"prepare_count": 0,"rate": 198000000"accuracy": 0,"usdhc4": {
"enable_count": 0,"prepare_count": 0,"rate": 198000000"accuracy":
0,"gpmi_bch": { "enable_count": 0,"prepare_count": 0,"rate":
198000000"accuracy": 0}}}},


The only difference is the presence of "accuracy:0" in 3.16 and not
the previous one.
It seems to be linked to timing because on another board, with 3.16,
it works correctly.
Is it possible to modify the clocks or to know if the MMC is maybe
corrupted in one way ?

Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-06 14:21                         ` Jean-Michel Hautbois
@ 2014-08-07  6:59                           ` Jean-Michel Hautbois
  2014-08-07  7:18                             ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-07  6:59 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Jaehoon Chung, Hsin-Hsiang Tseng, linux-mmc

2014-08-06 16:21 GMT+02:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-06 15:37 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
>> On Wed, Aug 6, 2014 at 10:27 AM, Jean-Michel Hautbois
>> <jean-michel.hautbois@vodalys.com> wrote:
>>> 2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>>> Hi,
>>>
>>> Hi Jaehoon,
>>>
>>>> In my case, -84 error is related with timing.
>>>> I recommend to check your clock source or pin strength.

I have dumped /sys/kernel/debug/mmc1/ios in both kernel releases.

In the current kernel (3.16) :
$> cat /sys/kernel/debug/mmc1/ios
clock:          52000000 Hz
actual clock:   49500000 Hz
vdd:            21 (3.3 ~ 3.4 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      3 (8 bits)
timing spec:    8 (mmc DDR52)
signal voltage: 0 (3.30 V)

In the Freescale kernel (3.10.17) :
$> cat /sys/kernel/debug/mmc1/ios
clock:          52000000 Hz
actual clock:   49500000 Hz
vdd:            7 (1.65 - 1.95 V)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     2 (on)
bus width:      3 (8 bits)
timing spec:    7 (sd uhs DDR50)
signal voltage: 0 (3.30 V)

As you can see, there is at least too differences : VDD is not the
same I don't know why yet, and neither is timing spec. This seems to
be the real cause...
Investigating now, but any advice is interesting ! :)

Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07  6:59                           ` Jean-Michel Hautbois
@ 2014-08-07  7:18                             ` Jean-Michel Hautbois
  2014-08-07  7:51                               ` Jaehoon Chung
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-07  7:18 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Jaehoon Chung, Hsin-Hsiang Tseng, linux-mmc

2014-08-07 8:59 GMT+02:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-06 16:21 GMT+02:00 Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com>:
>> 2014-08-06 15:37 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
>>> On Wed, Aug 6, 2014 at 10:27 AM, Jean-Michel Hautbois
>>> <jean-michel.hautbois@vodalys.com> wrote:
>>>> 2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>>>> Hi,
>>>>
>>>> Hi Jaehoon,
>>>>
>>>>> In my case, -84 error is related with timing.
>>>>> I recommend to check your clock source or pin strength.
>
> I have dumped /sys/kernel/debug/mmc1/ios in both kernel releases.
>
> In the current kernel (3.16) :
> $> cat /sys/kernel/debug/mmc1/ios
> clock:          52000000 Hz
> actual clock:   49500000 Hz
> vdd:            21 (3.3 ~ 3.4 V)
> bus mode:       2 (push-pull)
> chip select:    0 (don't care)
> power mode:     2 (on)
> bus width:      3 (8 bits)
> timing spec:    8 (mmc DDR52)
> signal voltage: 0 (3.30 V)
>
> In the Freescale kernel (3.10.17) :
> $> cat /sys/kernel/debug/mmc1/ios
> clock:          52000000 Hz
> actual clock:   49500000 Hz
> vdd:            7 (1.65 - 1.95 V)
> bus mode:       2 (push-pull)
> chip select:    0 (don't care)
> power mode:     2 (on)
> bus width:      3 (8 bits)
> timing spec:    7 (sd uhs DDR50)
> signal voltage: 0 (3.30 V)
>
> As you can see, there is at least too differences : VDD is not the
> same I don't know why yet, and neither is timing spec. This seems to
> be the real cause...
> Investigating now, but any advice is interesting ! :)
>
> Thanks,
> JM

OK, I juste tested to get back on part of the commit
79f7ae7c45a6ccf04e2908337461dee615f6afb0 :

diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 1ab5f3a..e22d851 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
                                        goto err;
                        }
                        mmc_card_set_ddr_mode(card);
-                       mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
+                       mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
                        mmc_set_bus_width(card->host, bus_width);
                }
        }


I just did the inverse, that means using MMC_TIMING_UHS_DDR50 and not
MMC_TIMING_MMC_DDR52 and I don't have any errors now.

Reverting the commit is not the solution, I need to know why the
timings are not the good ones now...
JM

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07  7:18                             ` Jean-Michel Hautbois
@ 2014-08-07  7:51                               ` Jaehoon Chung
  2014-08-07  7:54                                 ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jaehoon Chung @ 2014-08-07  7:51 UTC (permalink / raw)
  To: Jean-Michel Hautbois, Fabio Estevam; +Cc: Hsin-Hsiang Tseng, linux-mmc

On 08/07/2014 04:18 PM, Jean-Michel Hautbois wrote:
> 2014-08-07 8:59 GMT+02:00 Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com>:
>> 2014-08-06 16:21 GMT+02:00 Jean-Michel Hautbois
>> <jean-michel.hautbois@vodalys.com>:
>>> 2014-08-06 15:37 GMT+02:00 Fabio Estevam <festevam@gmail.com>:
>>>> On Wed, Aug 6, 2014 at 10:27 AM, Jean-Michel Hautbois
>>>> <jean-michel.hautbois@vodalys.com> wrote:
>>>>> 2014-08-06 13:44 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>>>>>> Hi,
>>>>>
>>>>> Hi Jaehoon,
>>>>>
>>>>>> In my case, -84 error is related with timing.
>>>>>> I recommend to check your clock source or pin strength.
>>
>> I have dumped /sys/kernel/debug/mmc1/ios in both kernel releases.
>>
>> In the current kernel (3.16) :
>> $> cat /sys/kernel/debug/mmc1/ios
>> clock:          52000000 Hz
>> actual clock:   49500000 Hz
>> vdd:            21 (3.3 ~ 3.4 V)
>> bus mode:       2 (push-pull)
>> chip select:    0 (don't care)
>> power mode:     2 (on)
>> bus width:      3 (8 bits)
>> timing spec:    8 (mmc DDR52)
>> signal voltage: 0 (3.30 V)
>>
>> In the Freescale kernel (3.10.17) :
>> $> cat /sys/kernel/debug/mmc1/ios
>> clock:          52000000 Hz
>> actual clock:   49500000 Hz
>> vdd:            7 (1.65 - 1.95 V)
>> bus mode:       2 (push-pull)
>> chip select:    0 (don't care)
>> power mode:     2 (on)
>> bus width:      3 (8 bits)
>> timing spec:    7 (sd uhs DDR50)
>> signal voltage: 0 (3.30 V)
>>
>> As you can see, there is at least too differences : VDD is not the
>> same I don't know why yet, and neither is timing spec. This seems to
>> be the real cause...
>> Investigating now, but any advice is interesting ! :)
UHS mode is run the voltage-change sequence.
So printed that vdd is 1.8v at linux3.10.

>>
>> Thanks,
>> JM
> 
> OK, I juste tested to get back on part of the commit
> 79f7ae7c45a6ccf04e2908337461dee615f6afb0 :
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 1ab5f3a..e22d851 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>                                         goto err;
>                         }
>                         mmc_card_set_ddr_mode(card);
> -                       mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
> +                       mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
>                         mmc_set_bus_width(card->host, bus_width);
>                 }
>         }
> 
> 
> I just did the inverse, that means using MMC_TIMING_UHS_DDR50 and not
> MMC_TIMING_MMC_DDR52 and I don't have any errors now.

Is your card eMMC or SD(T-flash)? Which card do you use?
Did you check dt-file?

Best Regards,
Jaehoon Chung

> 
> Reverting the commit is not the solution, I need to know why the
> timings are not the good ones now...
> JM
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07  7:51                               ` Jaehoon Chung
@ 2014-08-07  7:54                                 ` Jean-Michel Hautbois
  2014-08-07  8:54                                   ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-07  7:54 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Fabio Estevam, Hsin-Hsiang Tseng, linux-mmc

>> OK, I juste tested to get back on part of the commit
>> 79f7ae7c45a6ccf04e2908337461dee615f6afb0 :
>>
>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>> index 1ab5f3a..e22d851 100644
>> --- a/drivers/mmc/core/mmc.c
>> +++ b/drivers/mmc/core/mmc.c
>> @@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>                                         goto err;
>>                         }
>>                         mmc_card_set_ddr_mode(card);
>> -                       mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
>> +                       mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
>>                         mmc_set_bus_width(card->host, bus_width);
>>                 }
>>         }
>>
>>
>> I just did the inverse, that means using MMC_TIMING_UHS_DDR50 and not
>> MMC_TIMING_MMC_DDR52 and I don't have any errors now.
>
> Is your card eMMC or SD(T-flash)? Which card do you use?
> Did you check dt-file?

The card is Sandisk SDIN5D1-2G which is a iNAND.
What should I check in DT ?

Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07  7:54                                 ` Jean-Michel Hautbois
@ 2014-08-07  8:54                                   ` Jean-Michel Hautbois
  2014-08-07 15:02                                     ` Hsin-Hsiang Tseng
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-07  8:54 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Fabio Estevam, Hsin-Hsiang Tseng, linux-mmc

2014-08-07 9:54 GMT+02:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
>>> OK, I juste tested to get back on part of the commit
>>> 79f7ae7c45a6ccf04e2908337461dee615f6afb0 :
>>>
>>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>>> index 1ab5f3a..e22d851 100644
>>> --- a/drivers/mmc/core/mmc.c
>>> +++ b/drivers/mmc/core/mmc.c
>>> @@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>>                                         goto err;
>>>                         }
>>>                         mmc_card_set_ddr_mode(card);
>>> -                       mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
>>> +                       mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
>>>                         mmc_set_bus_width(card->host, bus_width);
>>>                 }
>>>         }
>>>
>>>
>>> I just did the inverse, that means using MMC_TIMING_UHS_DDR50 and not
>>> MMC_TIMING_MMC_DDR52 and I don't have any errors now.
>>
>> Is your card eMMC or SD(T-flash)? Which card do you use?
>> Did you check dt-file?
>
> The card is Sandisk SDIN5D1-2G which is a iNAND.
> What should I check in DT ?

I have written too quickly, still have same problem from time to time...
I don't have a clue, so if anybody has, I am interested...

JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07  8:54                                   ` Jean-Michel Hautbois
@ 2014-08-07 15:02                                     ` Hsin-Hsiang Tseng
  2014-08-07 15:44                                       ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Hsin-Hsiang Tseng @ 2014-08-07 15:02 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
> cmd response 0x900, card status 0xb00
> [    1.374409] mmcblk1: retrying using single block read
> [    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
> cmd response 0x900, card status 0x0
At first, the kernel driver uses multiple read(cmd 18) to read data
from sector 0 to sector 8, but fail.
And then, retry by single read(cmd 17), but still fail...

> [    2.050460]  mmcblk1boot0: unable to read partition table
You are trying to read boot partition data, as I remember when we
access boot partition, we need to sync the bus width, frequency and
timing(SDR, DDR).

Maybe you can turn on the MMC debug config. As a result, you can check
what kind of commands the kernel driver send.



2014-08-07 16:54 GMT+08:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-07 9:54 GMT+02:00 Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com>:
>>>> OK, I juste tested to get back on part of the commit
>>>> 79f7ae7c45a6ccf04e2908337461dee615f6afb0 :
>>>>
>>>> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
>>>> index 1ab5f3a..e22d851 100644
>>>> --- a/drivers/mmc/core/mmc.c
>>>> +++ b/drivers/mmc/core/mmc.c
>>>> @@ -1264,7 +1264,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
>>>>                                         goto err;
>>>>                         }
>>>>                         mmc_card_set_ddr_mode(card);
>>>> -                       mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
>>>> +                       mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
>>>>                         mmc_set_bus_width(card->host, bus_width);
>>>>                 }
>>>>         }
>>>>
>>>>
>>>> I just did the inverse, that means using MMC_TIMING_UHS_DDR50 and not
>>>> MMC_TIMING_MMC_DDR52 and I don't have any errors now.
>>>
>>> Is your card eMMC or SD(T-flash)? Which card do you use?
>>> Did you check dt-file?
>>
>> The card is Sandisk SDIN5D1-2G which is a iNAND.
>> What should I check in DT ?
>
> I have written too quickly, still have same problem from time to time...
> I don't have a clue, so if anybody has, I am interested...
>
> JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07 15:02                                     ` Hsin-Hsiang Tseng
@ 2014-08-07 15:44                                       ` Jean-Michel Hautbois
  2014-08-08  3:12                                         ` Jaehoon Chung
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-07 15:44 UTC (permalink / raw)
  To: Hsin-Hsiang Tseng; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

2014-08-07 17:02 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
>> cmd response 0x900, card status 0xb00
>> [    1.374409] mmcblk1: retrying using single block read
>> [    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
>> cmd response 0x900, card status 0x0
> At first, the kernel driver uses multiple read(cmd 18) to read data
> from sector 0 to sector 8, but fail.
> And then, retry by single read(cmd 17), but still fail...
>
>> [    2.050460]  mmcblk1boot0: unable to read partition table
> You are trying to read boot partition data, as I remember when we
> access boot partition, we need to sync the bus width, frequency and
> timing(SDR, DDR).
>
> Maybe you can turn on the MMC debug config. As a result, you can check
> what kind of commands the kernel driver send.
>

I don't have a big enough log buffer, but here is what I get after booting :
[  258.901572] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  258.901632] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  259.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
[  259.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  259.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  259.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  259.901578] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  259.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  260.893767] mmc0: starting CMD13 arg 00020000 flags 00000195
[  260.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  260.894906] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  260.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  260.901582] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  260.901641] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  261.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
[  261.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  261.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  261.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  261.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  261.901636] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  262.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
[  262.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  262.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  262.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  262.901583] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  262.901642] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  263.893763] mmc0: starting CMD13 arg 00020000 flags 00000195
[  263.893861] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  263.894903] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  263.894932] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  263.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  263.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  264.893758] mmc0: starting CMD13 arg 00020000 flags 00000195
[  264.893856] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  264.894898] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  264.894928] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  264.901574] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  264.901634] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  265.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
[  265.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  265.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  265.894939] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  265.901585] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  265.901646] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  266.893766] mmc0: starting CMD13 arg 00020000 flags 00000195
[  266.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  266.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  266.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  266.901612] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  266.901672] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  267.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
[  267.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  267.894907] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  267.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  267.901580] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  267.901640] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  268.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
[  268.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  268.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  268.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  268.901579] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[  268.901638] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[  269.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
[  269.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000
[  269.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
[  269.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
50000000, actual: 49500000

Is this normal to get an interrupt every second, and change pinctrl
state each time ?
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-07 15:44                                       ` Jean-Michel Hautbois
@ 2014-08-08  3:12                                         ` Jaehoon Chung
  2014-08-08  7:06                                           ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jaehoon Chung @ 2014-08-08  3:12 UTC (permalink / raw)
  To: Jean-Michel Hautbois, Hsin-Hsiang Tseng; +Cc: Fabio Estevam, linux-mmc

On 08/08/2014 12:44 AM, Jean-Michel Hautbois wrote:
> 2014-08-07 17:02 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>>> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>> cmd response 0x900, card status 0xb00
>>> [    1.374409] mmcblk1: retrying using single block read
>>> [    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>> cmd response 0x900, card status 0x0
>> At first, the kernel driver uses multiple read(cmd 18) to read data
>> from sector 0 to sector 8, but fail.
>> And then, retry by single read(cmd 17), but still fail...
>>
>>> [    2.050460]  mmcblk1boot0: unable to read partition table
>> You are trying to read boot partition data, as I remember when we
>> access boot partition, we need to sync the bus width, frequency and
>> timing(SDR, DDR).

If you don't access at boot partition, use the MMC_CAP2_BOOTPART_NOACC.
>>
>> Maybe you can turn on the MMC debug config. As a result, you can check
>> what kind of commands the kernel driver send.
>>
> 
> I don't have a big enough log buffer, but here is what I get after booting :
> [  258.901572] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  258.901632] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  259.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  259.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  259.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  259.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  259.901578] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  259.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  260.893767] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  260.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  260.894906] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  260.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  260.901582] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  260.901641] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  261.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  261.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  261.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  261.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  261.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  261.901636] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  262.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  262.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  262.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  262.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  262.901583] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  262.901642] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  263.893763] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  263.893861] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  263.894903] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  263.894932] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  263.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  263.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  264.893758] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  264.893856] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  264.894898] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  264.894928] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  264.901574] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  264.901634] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  265.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  265.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  265.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  265.894939] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  265.901585] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  265.901646] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  266.893766] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  266.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  266.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  266.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  266.901612] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  266.901672] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  267.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  267.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  267.894907] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  267.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  267.901580] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  267.901640] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  268.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  268.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  268.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  268.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  268.901579] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
> [  268.901638] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
> [  269.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
> [  269.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> [  269.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
> [  269.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
> 50000000, actual: 49500000
> 
> Is this normal to get an interrupt every second, and change pinctrl
> state each time ?

It seems that your system is working the polling detect scheme.
To detect the card, it's polling the card status at every time.

Best Regards,
Jaehoon Chung

> JM
> 


^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-08  3:12                                         ` Jaehoon Chung
@ 2014-08-08  7:06                                           ` Jean-Michel Hautbois
  2014-08-08  7:54                                             ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-08  7:06 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Hsin-Hsiang Tseng, Fabio Estevam, linux-mmc

2014-08-08 5:12 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
> On 08/08/2014 12:44 AM, Jean-Michel Hautbois wrote:
>> 2014-08-07 17:02 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>>>> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>>> cmd response 0x900, card status 0xb00
>>>> [    1.374409] mmcblk1: retrying using single block read
>>>> [    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>>> cmd response 0x900, card status 0x0
>>> At first, the kernel driver uses multiple read(cmd 18) to read data
>>> from sector 0 to sector 8, but fail.
>>> And then, retry by single read(cmd 17), but still fail...
>>>
>>>> [    2.050460]  mmcblk1boot0: unable to read partition table
>>> You are trying to read boot partition data, as I remember when we
>>> access boot partition, we need to sync the bus width, frequency and
>>> timing(SDR, DDR).
>
> If you don't access at boot partition, use the MMC_CAP2_BOOTPART_NOACC.

How can I do that properly ?

>>>
>>> Maybe you can turn on the MMC debug config. As a result, you can check
>>> what kind of commands the kernel driver send.
>>>
>>
>> I don't have a big enough log buffer, but here is what I get after booting :
>> [  258.901572] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  258.901632] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  259.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  259.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  259.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  259.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  259.901578] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  259.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  260.893767] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  260.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  260.894906] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  260.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  260.901582] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  260.901641] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  261.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  261.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  261.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  261.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  261.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  261.901636] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  262.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  262.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  262.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  262.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  262.901583] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  262.901642] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  263.893763] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  263.893861] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  263.894903] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  263.894932] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  263.901576] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  263.901637] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  264.893758] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  264.893856] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  264.894898] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  264.894928] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  264.901574] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  264.901634] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  265.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  265.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  265.894908] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  265.894939] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  265.901585] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  265.901646] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  266.893766] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  266.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  266.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  266.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  266.901612] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  266.901672] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  267.893768] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  267.893865] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  267.894907] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  267.894937] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  267.901580] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  267.901640] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  268.893769] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  268.893867] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  268.894909] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  268.894938] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  268.901579] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
>> [  268.901638] mmc0: req done (CMD13): 0: 00000900 00000000 00000000 00000000
>> [  269.893765] mmc0: starting CMD13 arg 00020000 flags 00000195
>> [  269.893864] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>> [  269.894905] sdhci-esdhc-imx 2198000.usdhc: change pinctrl state for uhs 2
>> [  269.894935] sdhci-esdhc-imx 2198000.usdhc: desired SD clock:
>> 50000000, actual: 49500000
>>
>> Is this normal to get an interrupt every second, and change pinctrl
>> state each time ?
>
> It seems that your system is working the polling detect scheme.
> To detect the card, it's polling the card status at every time.

The DT is configured with "non-removable;" It should check card status
or I missed something :-( ?

Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-08  7:06                                           ` Jean-Michel Hautbois
@ 2014-08-08  7:54                                             ` Jean-Michel Hautbois
  2014-08-09  9:05                                               ` Hsin-Hsiang Tseng
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-08  7:54 UTC (permalink / raw)
  To: Jaehoon Chung; +Cc: Hsin-Hsiang Tseng, Fabio Estevam, linux-mmc

2014-08-08 9:06 GMT+02:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> 2014-08-08 5:12 GMT+02:00 Jaehoon Chung <jh80.chung@samsung.com>:
>> On 08/08/2014 12:44 AM, Jean-Michel Hautbois wrote:
>>> 2014-08-07 17:02 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>>>>> [    1.366291] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>>>> cmd response 0x900, card status 0xb00
>>>>> [    1.374409] mmcblk1: retrying using single block read
>>>>> [    1.378810] mmcblk1: error -84 transferring data, sector 0, nr 8,
>>>>> cmd response 0x900, card status 0x0
>>>> At first, the kernel driver uses multiple read(cmd 18) to read data
>>>> from sector 0 to sector 8, but fail.
>>>> And then, retry by single read(cmd 17), but still fail...
>>>>
>>>>> [    2.050460]  mmcblk1boot0: unable to read partition table
>>>> You are trying to read boot partition data, as I remember when we
>>>> access boot partition, we need to sync the bus width, frequency and
>>>> timing(SDR, DDR).
>>
>> If you don't access at boot partition, use the MMC_CAP2_BOOTPART_NOACC.
>
> How can I do that properly ?

In modified include/linux/mmc/host.h in order to return 0 in the
function mmc_boot_partition_access().
I don't have boot partition access, but still I/O errors :


[    4.518031] mmcblk1: error -84 transferring data, sector 12, nr 4,
cmd response 0x900, card status 0x0
[    4.518063] mmc1: starting CMD17 arg 00001a00 flags 000000b5
[    4.518085] mmc1:     blksz 512 blocks 1 flags 00000200 tsac 100 ms nsac 0
[    4.518147] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
[    4.518478] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00200002
[    4.518545] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
[    4.518563] mmc1:     0 bytes transferred: -84
[    4.518646] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000002
[    4.518690] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[    4.518732] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
[    4.518746] mmc0:     4096 bytes transferred: 0
[    4.518756] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
[    4.518783] mmc1: starting CMD13 arg 00010000 flags 00000195
[    4.518826] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
[    4.518849] mmc1: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[    4.519005] mmc0: starting CMD18 arg 00062000 flags 000000b5
[    4.519022] mmc0:     blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
[    4.519042] mmc0:     CMD12 arg 00000000 flags 00000095
[    4.519106] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[    4.521216] mmcblk1: error -84 transferring data, sector 13, nr 3,
cmd response 0x900, card status 0x0
[    4.521247] mmc1: starting CMD17 arg 00001c00 flags 000000b5
[    4.521258] mmc1:     blksz 512 blocks 1 flags 00000200 tsac 100 ms nsac 0
[    4.521309] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
[    4.521502] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000002
[    4.521539] sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
[    4.521566] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
[    4.521575] mmc0:     4096 bytes transferred: 0
[    4.521585] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
[    4.521646] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00200002
[    4.521678] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
[    4.521688] mmc1:     0 bytes transferred: -84
[    4.521746] mmc1: starting CMD13 arg 00010000 flags 00000195
[    4.521790] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
[    4.521813] mmc1: req done (CMD13): 0: 00000900 00000000 00000000 00000000
[    4.523600] mmcblk1: error -84 transferring data, sector 14, nr 2,
cmd response 0x900, card status 0x0


JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-08  7:54                                             ` Jean-Michel Hautbois
@ 2014-08-09  9:05                                               ` Hsin-Hsiang Tseng
  2014-08-28  7:28                                                 ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Hsin-Hsiang Tseng @ 2014-08-09  9:05 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

Could you change another sample to test?
As a result, we can check this is a driver issue or sample issue.

> [    4.518732] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
> [    4.518746] mmc0:     4096 bytes transferred: 0
> [    4.518756] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
the eMMC has change state to data state(0xb00) and the data transferred 0...
It means the cmd and clk pin work well. I will check the DMA and data
lines(pin).
> [    4.518545] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
> [    4.518563] mmc1:     0 bytes transferred: -84
No data transferred from your platform to eMMC....even use single block read.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-09  9:05                                               ` Hsin-Hsiang Tseng
@ 2014-08-28  7:28                                                 ` Jean-Michel Hautbois
  2014-08-28 14:20                                                   ` Hsin-Hsiang Tseng
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-28  7:28 UTC (permalink / raw)
  To: Hsin-Hsiang Tseng; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

Hi,

2014-08-09 11:05 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
> Could you change another sample to test?
> As a result, we can check this is a driver issue or sample issue.

I can change whatever you want :). I noticed that on first boot it
seems to be working fine, but after some minutes, if I reboot (POR or
poweroff/poweron) I have those messages.

>> [    4.518732] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
>> [    4.518746] mmc0:     4096 bytes transferred: 0
>> [    4.518756] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
> the eMMC has change state to data state(0xb00) and the data transferred 0...
> It means the cmd and clk pin work well. I will check the DMA and data
> lines(pin).
>> [    4.518545] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
>> [    4.518563] mmc1:     0 bytes transferred: -84
> No data transferred from your platform to eMMC....even use single block read.

What is the next step ? BTW, I am now on the latest 3.17-rc2 tag.

Thanks,
JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-28  7:28                                                 ` Jean-Michel Hautbois
@ 2014-08-28 14:20                                                   ` Hsin-Hsiang Tseng
  2014-08-28 14:31                                                     ` Jean-Michel Hautbois
  0 siblings, 1 reply; 28+ messages in thread
From: Hsin-Hsiang Tseng @ 2014-08-28 14:20 UTC (permalink / raw)
  To: Jean-Michel Hautbois; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

No matter which sample you changed to test has this issue?

Is your reboot means only re-init eMMC or entire platform?
If you re-init eMMC by your customized flow, you need to guarantee the
frequency and bus-width between host and device.


2014-08-28 15:28 GMT+08:00 Jean-Michel Hautbois
<jean-michel.hautbois@vodalys.com>:
> Hi,
>
> 2014-08-09 11:05 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>> Could you change another sample to test?
>> As a result, we can check this is a driver issue or sample issue.
>
> I can change whatever you want :). I noticed that on first boot it
> seems to be working fine, but after some minutes, if I reboot (POR or
> poweroff/poweron) I have those messages.
>
>>> [    4.518732] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
>>> [    4.518746] mmc0:     4096 bytes transferred: 0
>>> [    4.518756] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
>> the eMMC has change state to data state(0xb00) and the data transferred 0...
>> It means the cmd and clk pin work well. I will check the DMA and data
>> lines(pin).
>>> [    4.518545] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
>>> [    4.518563] mmc1:     0 bytes transferred: -84
>> No data transferred from your platform to eMMC....even use single block read.
>
> What is the next step ? BTW, I am now on the latest 3.17-rc2 tag.
>
> Thanks,
> JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: Sandisk MMC I/O errors
  2014-08-28 14:20                                                   ` Hsin-Hsiang Tseng
@ 2014-08-28 14:31                                                     ` Jean-Michel Hautbois
  0 siblings, 0 replies; 28+ messages in thread
From: Jean-Michel Hautbois @ 2014-08-28 14:31 UTC (permalink / raw)
  To: Hsin-Hsiang Tseng; +Cc: Jaehoon Chung, Fabio Estevam, linux-mmc

I will try to as clear as possible.

When I reset, this is a complete reset of the board.
I tried Freescale's kernel version, and it works, even after reset and
several minutes.
The same sample, the same board, but with a 3.17-rc2 kernel, I get
those errors  would say about 95% of times. The first but can be ok,
but this is not invariable...

On another board, with another sample, it has the same problem, but I
would say about 80% of times.
I tried to use dynamic debug on boot in order to get all dev_dbg
messages, but for the moment I don't have them...

Thanks,
JM


2014-08-28 16:20 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
> No matter which sample you changed to test has this issue?
>
> Is your reboot means only re-init eMMC or entire platform?
> If you re-init eMMC by your customized flow, you need to guarantee the
> frequency and bus-width between host and device.
>
>
> 2014-08-28 15:28 GMT+08:00 Jean-Michel Hautbois
> <jean-michel.hautbois@vodalys.com>:
>> Hi,
>>
>> 2014-08-09 11:05 GMT+02:00 Hsin-Hsiang Tseng <hsinhsiangtseng@gmail.com>:
>>> Could you change another sample to test?
>>> As a result, we can check this is a driver issue or sample issue.
>>
>> I can change whatever you want :). I noticed that on first boot it
>> seems to be working fine, but after some minutes, if I reboot (POR or
>> poweroff/poweron) I have those messages.
>>
>>>> [    4.518732] mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
>>>> [    4.518746] mmc0:     4096 bytes transferred: 0
>>>> [    4.518756] mmc0:     (CMD12): 0: 00000b00 00000000 00000000 00000000
>>> the eMMC has change state to data state(0xb00) and the data transferred 0...
>>> It means the cmd and clk pin work well. I will check the DMA and data
>>> lines(pin).
>>>> [    4.518545] mmc1: req done (CMD17): 0: 00000900 00000000 00000000 00000000
>>>> [    4.518563] mmc1:     0 bytes transferred: -84
>>> No data transferred from your platform to eMMC....even use single block read.
>>
>> What is the next step ? BTW, I am now on the latest 3.17-rc2 tag.
>>
>> Thanks,
>> JM

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2014-08-28 14:31 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-05 14:26 Sandisk MMC I/O errors Jean-Michel Hautbois
2014-08-05 15:13 ` Fabio Estevam
2014-08-05 15:20   ` Jean-Michel Hautbois
2014-08-05 15:35     ` Fabio Estevam
2014-08-05 15:44       ` Jean-Michel Hautbois
2014-08-05 15:54         ` Jean-Michel Hautbois
2014-08-05 15:59           ` Fabio Estevam
2014-08-05 16:01             ` Jean-Michel Hautbois
2014-08-06  1:15               ` Hsin-Hsiang Tseng
2014-08-06  6:54                 ` Jean-Michel Hautbois
2014-08-06 11:44                   ` Jaehoon Chung
2014-08-06 13:27                     ` Jean-Michel Hautbois
2014-08-06 13:37                       ` Fabio Estevam
2014-08-06 14:21                         ` Jean-Michel Hautbois
2014-08-07  6:59                           ` Jean-Michel Hautbois
2014-08-07  7:18                             ` Jean-Michel Hautbois
2014-08-07  7:51                               ` Jaehoon Chung
2014-08-07  7:54                                 ` Jean-Michel Hautbois
2014-08-07  8:54                                   ` Jean-Michel Hautbois
2014-08-07 15:02                                     ` Hsin-Hsiang Tseng
2014-08-07 15:44                                       ` Jean-Michel Hautbois
2014-08-08  3:12                                         ` Jaehoon Chung
2014-08-08  7:06                                           ` Jean-Michel Hautbois
2014-08-08  7:54                                             ` Jean-Michel Hautbois
2014-08-09  9:05                                               ` Hsin-Hsiang Tseng
2014-08-28  7:28                                                 ` Jean-Michel Hautbois
2014-08-28 14:20                                                   ` Hsin-Hsiang Tseng
2014-08-28 14:31                                                     ` Jean-Michel Hautbois

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.