@@ -1642,8 +1642,12 @@ static int mmc_do_erase(struct mmc_card *card, sector_t from,
cmd.opcode = SD_ERASE_WR_BLK_START;
else
cmd.opcode = MMC_ERASE_GROUP_START;
- cmd.arg = from;
+ cmd.arg = from & 0xFFFFFFFF;
cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
+
+ if (mmc_card_ult_capacity(card))
+ mmc_send_ext_addr(card->host, from);
+
err = mmc_wait_for_cmd(card->host, &cmd, 0);
if (err) {
pr_err("mmc_erase: group start error %d, "
@@ -1657,8 +1661,12 @@ static int mmc_do_erase(struct mmc_card *card, sector_t from,
cmd.opcode = SD_ERASE_WR_BLK_END;
else
cmd.opcode = MMC_ERASE_GROUP_END;
- cmd.arg = to;
+ cmd.arg = to & 0xFFFFFFFF;
cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
+
+ if (mmc_card_ult_capacity(card))
+ mmc_send_ext_addr(card->host, to);
+
err = mmc_wait_for_cmd(card->host, &cmd, 0);
if (err) {
pr_err("mmc_erase: group end error %d, status %#x\n",