Skip to content
Snippets Groups Projects
Commit 64ea2d9f authored by Bin Meng's avatar Bin Meng Committed by Philippe Mathieu-Daudé
Browse files

hw/sd: sd: Fix address check in sd_erase()


For high capacity memory cards, the erase start address and end
address are multiplied by 512, but the address check is still
based on the original block number in sd->erase_{start, end}.

Fixes: 1bd6fd8e ("hw/sd/sdcard: Do not attempt to erase out of range addresses")
Signed-off-by: default avatarBin Meng <bin.meng@windriver.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210216150225.27996-2-bmeng.cn@gmail.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
parent 17674695
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment