sdtool icon indicating copy to clipboard operation
sdtool copied to clipboard

Erro 110 o Raspibarry PI 4

Open josepacelli opened this issue 6 years ago • 6 comments

I tried do lock the sdcard on a Raspberri PI4 and the application returns Error 110. I compiled in my rasp and doesn work too.

image

josepacelli avatar Feb 11 '20 13:02 josepacelli

The same for me :(

mirkokg avatar Jul 19 '20 03:07 mirkokg

I can confirm the code does not seem to work on a Pi4. I am quite busy at the moment, but will take a look later.

BertoldVdb avatar Jul 20 '20 11:07 BertoldVdb

Got the same error on Ubuntu 20.04 with kernel Linux 5.6.0-1020-oem Error msg when I try to get status. It fails on sending ioctl with SD_READ_CSD (MMC_SEND_CSD) command opcode.

sudo ./sdtool  /dev/mmcblk0 unlock
[+] Found RCA for /dev/mmcblk0: E624.
Error 110
[-] Failed to send command: Connection timed out

dmesg output:

[82914.643211] rtsx_usb_sdmmc rtsx_usb_sdmmc.1.auto: Card stuck in wrong state! card_busy_detect status: 0x700

Hmm :thinking: It looks like my MMC controller driver error. Host can't execute SEND_CSD request. So I assume it's not this tool related problem.

bigunclemax avatar Aug 12 '20 18:08 bigunclemax

Still nothing? @BertoldVdb

LLinoor avatar Oct 24 '20 14:10 LLinoor

This problem was introduced in 5.5 by:

commit a0d4c7eb71dd08a89ad631177bb0cbbabd598f84
Author: Chaotian Jing <[email protected]>
Date:   Thu Sep 5 15:53:18 2019 +0800

    mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response
    
    MMC IOCTLS with R1B responses may cause the card to enter the busy state,
    which means it's not ready to receive a new request. To prevent new
    requests from being sent to the card, use a CMD13 polling loop to verify
    that the card returns to the transfer state, before completing the request.
    
    Signed-off-by: Chaotian Jing <[email protected]>
    Reviewed-by: Avri Altman <[email protected]>
    Cc: [email protected]
    Signed-off-by: Ulf Hansson <[email protected]>

And subsequently fixed in 5.10 by:

commit 6246d7c9d15aaff0bc3863f67900c6a6e6be921b
Author: Bean Huo <[email protected]>
Date:   Wed Dec 2 21:23:20 2020 +0100

    mmc: block: Fixup condition for CMD13 polling for RPMB requests
    
    The CMD13 polling is needed for commands with R1B responses. In commit
    a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B
    response"), the intent was to introduce this for requests targeted to the
    RPMB partition. However, the condition to trigger the polling loop became
    wrong, leading to unnecessary polling. Let's fix the condition to avoid
    this.
    
    Fixes: a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response")
    Cc: [email protected]
    Reported-by: Zhan Liu <[email protected]>
    Signed-off-by: Zhan Liu <[email protected]>
    Signed-off-by: Bean Huo <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>

juergh avatar Mar 05 '21 08:03 juergh

I'm seeing the same error with 5.11.4 with dmesg showing

rtsx_pci_sdmmc rtsx_pci_sdmmc.0: __mmc_blk_ioctl_cmd: cmd error -110

icewind1991 avatar Apr 09 '21 16:04 icewind1991

@icewind1991 Did you ever find a solution?

Manouchehri avatar Oct 21 '22 15:10 Manouchehri

This works again! It hasn't in years, since this issue has been open but I just tried it on a Raspberry Pi 3B with the newest Raspbian (based on bookworm and a 6.1.0 kernel) and it worked! I am so happy I can retire my ancient pi running Raspbian from 4 years ago (which I kept only because this tool stopped working on newer Raspbians).

sangh avatar Nov 08 '23 07:11 sangh

Thanks for figuring that out!

BertoldVdb avatar Nov 08 '23 10:11 BertoldVdb