linux/drivers/mmc/core/queue.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  Copyright (C) 2003 Russell King, All Rights Reserved.
 *  Copyright 2006-2007 Pierre Ossman
 */
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/blkdev.h>
#include <linux/freezer.h>
#include <linux/scatterlist.h>
#include <linux/dma-mapping.h>
#include <linux/backing-dev.h>

#include <linux/mmc/card.h>
#include <linux/mmc/host.h>

#include "queue.h"
#include "block.h"
#include "core.h"
#include "card.h"
#include "crypto.h"
#include "host.h"

#define MMC_DMA_MAP_MERGE_SEGMENTS

static inline bool mmc_cqe_dcmd_busy(struct mmc_queue *mq)
{}

void mmc_cqe_check_busy(struct mmc_queue *mq)
{}

static inline bool mmc_cqe_can_dcmd(struct mmc_host *host)
{}

static enum mmc_issue_type mmc_cqe_issue_type(struct mmc_host *host,
					      struct request *req)
{}

enum mmc_issue_type mmc_issue_type(struct mmc_queue *mq, struct request *req)
{}

static void __mmc_cqe_recovery_notifier(struct mmc_queue *mq)
{}

void mmc_cqe_recovery_notifier(struct mmc_request *mrq)
{}

static enum blk_eh_timer_return mmc_cqe_timed_out(struct request *req)
{}

static enum blk_eh_timer_return mmc_mq_timed_out(struct request *req)
{}

static void mmc_mq_recovery_handler(struct work_struct *work)
{}

static struct scatterlist *mmc_alloc_sg(unsigned short sg_len, gfp_t gfp)
{}

static void mmc_queue_setup_discard(struct mmc_card *card,
		struct queue_limits *lim)
{}

static unsigned short mmc_get_max_segments(struct mmc_host *host)
{}

static int mmc_mq_init_request(struct blk_mq_tag_set *set, struct request *req,
			       unsigned int hctx_idx, unsigned int numa_node)
{}

static void mmc_mq_exit_request(struct blk_mq_tag_set *set, struct request *req,
				unsigned int hctx_idx)
{}

static blk_status_t mmc_mq_queue_rq(struct blk_mq_hw_ctx *hctx,
				    const struct blk_mq_queue_data *bd)
{}

static const struct blk_mq_ops mmc_mq_ops =;

static struct gendisk *mmc_alloc_disk(struct mmc_queue *mq,
		struct mmc_card *card, unsigned int features)
{}

static inline bool mmc_merge_capable(struct mmc_host *host)
{}

/* Set queue depth to get a reasonable value for q->nr_requests */
#define MMC_QUEUE_DEPTH

/**
 * mmc_init_queue - initialise a queue structure.
 * @mq: mmc queue
 * @card: mmc card to attach this queue
 * @features: block layer features (BLK_FEAT_*)
 *
 * Initialise a MMC card request queue.
 */
struct gendisk *mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card,
		unsigned int features)
{}

void mmc_queue_suspend(struct mmc_queue *mq)
{}

void mmc_queue_resume(struct mmc_queue *mq)
{}

void mmc_cleanup_queue(struct mmc_queue *mq)
{}

/*
 * Prepare the sg list(s) to be handed of to the host driver
 */
unsigned int mmc_queue_map_sg(struct mmc_queue *mq, struct mmc_queue_req *mqrq)
{}