diff options
| -rw-r--r-- | drivers/mmc/card/block.c | 12 | ||||
| -rw-r--r-- | drivers/mmc/card/queue.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/card/queue.h | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 2c25271f8c41..60f7141a6b02 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
| @@ -1029,6 +1029,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type) | |||
| 1029 | md->reset_done &= ~type; | 1029 | md->reset_done &= ~type; |
| 1030 | } | 1030 | } |
| 1031 | 1031 | ||
| 1032 | int mmc_access_rpmb(struct mmc_queue *mq) | ||
| 1033 | { | ||
| 1034 | struct mmc_blk_data *md = mq->data; | ||
| 1035 | /* | ||
| 1036 | * If this is a RPMB partition access, return ture | ||
| 1037 | */ | ||
| 1038 | if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB) | ||
| 1039 | return true; | ||
| 1040 | |||
| 1041 | return false; | ||
| 1042 | } | ||
| 1043 | |||
| 1032 | static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) | 1044 | static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) |
| 1033 | { | 1045 | { |
| 1034 | struct mmc_blk_data *md = mq->data; | 1046 | struct mmc_blk_data *md = mq->data; |
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 236d194c2883..8efa3684aef8 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
| @@ -38,7 +38,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req) | |||
| 38 | return BLKPREP_KILL; | 38 | return BLKPREP_KILL; |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | if (mq && mmc_card_removed(mq->card)) | 41 | if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq))) |
| 42 | return BLKPREP_KILL; | 42 | return BLKPREP_KILL; |
| 43 | 43 | ||
| 44 | req->cmd_flags |= REQ_DONTPREP; | 44 | req->cmd_flags |= REQ_DONTPREP; |
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h index 5752d50049a3..99e6521e6169 100644 --- a/drivers/mmc/card/queue.h +++ b/drivers/mmc/card/queue.h | |||
| @@ -73,4 +73,6 @@ extern void mmc_queue_bounce_post(struct mmc_queue_req *); | |||
| 73 | extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *); | 73 | extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *); |
| 74 | extern void mmc_packed_clean(struct mmc_queue *); | 74 | extern void mmc_packed_clean(struct mmc_queue *); |
| 75 | 75 | ||
| 76 | extern int mmc_access_rpmb(struct mmc_queue *); | ||
| 77 | |||
| 76 | #endif | 78 | #endif |
