#include <linux/bsg.h>
#include <linux/slab.h>
#include <linux/blk-mq.h>
#include <linux/delay.h>
#include <linux/scatterlist.h>
#include <linux/bsg-lib.h>
#include <linux/export.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/sg.h>
#define uptr64(val) …
struct bsg_set { … };
static int bsg_transport_sg_io_fn(struct request_queue *q, struct sg_io_v4 *hdr,
bool open_for_write, unsigned int timeout)
{ … }
static void bsg_teardown_job(struct kref *kref)
{ … }
void bsg_job_put(struct bsg_job *job)
{ … }
EXPORT_SYMBOL_GPL(…);
int bsg_job_get(struct bsg_job *job)
{ … }
EXPORT_SYMBOL_GPL(…);
void bsg_job_done(struct bsg_job *job, int result,
unsigned int reply_payload_rcv_len)
{ … }
EXPORT_SYMBOL_GPL(…);
static void bsg_complete(struct request *rq)
{ … }
static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
{ … }
static bool bsg_prepare_job(struct device *dev, struct request *req)
{ … }
static blk_status_t bsg_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd)
{ … }
static int bsg_init_rq(struct blk_mq_tag_set *set, struct request *req,
unsigned int hctx_idx, unsigned int numa_node)
{ … }
static void bsg_exit_rq(struct blk_mq_tag_set *set, struct request *req,
unsigned int hctx_idx)
{ … }
void bsg_remove_queue(struct request_queue *q)
{ … }
EXPORT_SYMBOL_GPL(…);
static enum blk_eh_timer_return bsg_timeout(struct request *rq)
{ … }
static const struct blk_mq_ops bsg_mq_ops = …;
struct request_queue *bsg_setup_queue(struct device *dev, const char *name,
struct queue_limits *lim, bsg_job_fn *job_fn,
bsg_timeout_fn *timeout, int dd_job_size)
{ … }
EXPORT_SYMBOL_GPL(…);