@@ -40,6 +40,7 @@ struct mmc_blk_ioc_data;
struct mmc_blk_request {
struct mmc_request mrq;
struct mmc_command sbc;
+ struct mmc_command ext;
struct mmc_command cmd;
struct mmc_command stop;
struct mmc_data data;
@@ -1399,13 +1399,13 @@ static inline bool sdhci_auto_cmd12(struct sdhci_host *host,
static inline bool sdhci_auto_cmd23(struct sdhci_host *host,
struct mmc_request *mrq)
{
- return mrq->sbc && (host->flags & SDHCI_AUTO_CMD23);
+ return mrq->sbc && (host->flags & SDHCI_AUTO_CMD23) && !mrq->ext;
}
static inline bool sdhci_manual_cmd23(struct sdhci_host *host,
struct mmc_request *mrq)
{
- return mrq->sbc && !(host->flags & SDHCI_AUTO_CMD23);
+ return mrq->sbc && (mrq->ext || !(host->flags & SDHCI_AUTO_CMD23));
}
static inline void sdhci_auto_cmd_select(struct sdhci_host *host,
@@ -142,6 +142,7 @@ struct mmc_data {
struct mmc_host;
struct mmc_request {
struct mmc_command *sbc; /* SET_BLOCK_COUNT for multiblock */
+ struct mmc_command *ext; /* SD_ADDR_EXT for SDUC */
struct mmc_command *cmd;
struct mmc_data *data;
struct mmc_command *stop;
In Multi-Block read/write, CMD23 must precede CMD22. Therefore always use manual cmd23 so that we'll be able to control the sequence of commands. Also, add an applicable mmc_command member for both mmc_blk_request and mmc_request to accommodate the address extension command. Signed-off-by: Avri Altman <avri.altman@wdc.com> --- drivers/mmc/core/queue.h | 1 + drivers/mmc/host/sdhci.c | 4 ++-- include/linux/mmc/core.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-)