diff --git a/cmd/bcb.c b/cmd/bcb.c index 1622a90c97..02d0c70d87 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -14,6 +14,7 @@ #include #include #include +#include enum bcb_cmd { BCB_CMD_LOAD, @@ -128,6 +129,16 @@ static int __bcb_load(int devnum, const char *partp) goto err_read_fail; } + /* + * always select the USER mmc hwpart in case another + * blk operation selected a different hwpart + */ + ret = blk_dselect_hwpart(desc, 0); + if (IS_ERR_VALUE(ret)) { + ret = -ENODEV; + goto err_read_fail; + } + part = simple_strtoul(partp, &endp, 0); if (*endp == '\0') { ret = part_get_info(desc, part, &info);