Message ID | 5225C24B.9020705@de.bosch.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On Tue, Sep 03 2013, Dirk Behme wrote: > + if ((cmd.opcode == MMC_SWITCH) && ((cmd.arg >> 24) & 0x3)) { > + /* In case the IOCTL has modified the EXT_CSD, update > it, i.e. re-read the EXT_CSD */ > + mmc_update_ext_csd(card->ext_csd); > + } > + Your analysis looks good, please go ahead and submit a full patch. Thanks! - Chris.
On 03.09.2013 13:26, Chris Ball wrote: > Hi, > > On Tue, Sep 03 2013, Dirk Behme wrote: >> + if ((cmd.opcode == MMC_SWITCH) && ((cmd.arg >> 24) & 0x3)) { >> + /* In case the IOCTL has modified the EXT_CSD, update >> it, i.e. re-read the EXT_CSD */ >> + mmc_update_ext_csd(card->ext_csd); >> + } >> + > > Your analysis looks good, please go ahead and submit a full patch. The issue here is that something like mmc_update_ext_csd() doesn't exist, yet? So we have to implement a mmc_update_ext_csd() in core/mmc.c and call it from mmc_blk_ioctl_cmd() in card/block.c? Or any better proposal? Thanks Dirk -- 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
--- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -542,11 +544,17 @@ static int mmc_blk_ioctl_cmd(struct block_device *bdev, __func__, status, err); } + if ((cmd.opcode == MMC_SWITCH) && ((cmd.arg >> 24) & 0x3)) { + /* In case the IOCTL has modified the EXT_CSD, update it, i.e. re-read the EXT_CSD */ + mmc_update_ext_csd(card->ext_csd); + } + cmd_rel_host: mmc_release_host(card->host); ? Opinions?