@@ -1382,7 +1382,7 @@ static void mmc_blk_cqe_complete_rq(struct mmc_queue *mq, struct request *req)
struct mmc_request *mrq = &mqrq->brq.mrq;
struct request_queue *q = req->q;
struct mmc_host *host = mq->card->host;
- enum mmc_issue_type issue_type = mmc_issue_type(mq, req);
+ enum mmc_issue_type issue_type = mmc_issue_type(host, req);
unsigned long flags;
bool put_card;
int err;
@@ -1977,7 +1977,7 @@ static void mmc_blk_mq_dec_in_flight(struct mmc_queue *mq, struct request *req)
spin_lock_irqsave(&mq->lock, flags);
- mq->in_flight[mmc_issue_type(mq, req)] -= 1;
+ mq->in_flight[mmc_issue_type(mq->card->host, req)] -= 1;
put_card = (mmc_tot_in_flight(mq) == 0);
@@ -2209,7 +2209,7 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue *mq, struct request *req)
if (ret)
return MMC_REQ_FAILED_TO_START;
- switch (mmc_issue_type(mq, req)) {
+ switch (mmc_issue_type(host, req)) {
case MMC_ISSUE_SYNC:
ret = mmc_blk_wait_for_idle(mq, host);
if (ret)
@@ -56,10 +56,8 @@ static enum mmc_issue_type mmc_cqe_issue_type(struct mmc_host *host,
}
}
-enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req)
+enum mmc_issue_type mmc_issue_type(struct mmc_host *host, struct request *req)
{
- struct mmc_host *host = mq->card->host;
-
if (host->cqe_enabled && !host->hsq_enabled)
return mmc_cqe_issue_type(host, req);
@@ -97,7 +95,7 @@ static enum blk_eh_timer_return mmc_cqe_timed_out(struct request *req)
struct mmc_request *mrq = &mqrq->brq.mrq;
struct mmc_queue *mq = req->q->queuedata;
struct mmc_host *host = mq->card->host;
- enum mmc_issue_type issue_type = mmc_issue_type(mq, req);
+ enum mmc_issue_type issue_type = mmc_issue_type(host, req);
bool recovery_needed = false;
switch (issue_type) {
@@ -259,7 +257,7 @@ static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
return BLK_STS_IOERR;
}
- issue_type = mmc_issue_type(mq, req);
+ issue_type = mmc_issue_type(host, req);
spin_lock_irq(&mq->lock);
@@ -104,7 +104,7 @@ extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
void mmc_cqe_check_busy(struct mmc_queue *mq);
void mmc_cqe_recovery_notifier(struct mmc_request *mrq);
-enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req);
+enum mmc_issue_type mmc_issue_type(struct mmc_host *host, struct request *req);
static inline int mmc_tot_in_flight(struct mmc_queue *mq)
{