Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_BSG_H
3#define _LINUX_BSG_H
4
5#include <uapi/linux/bsg.h>
6
7struct bsg_device;
8struct device;
9struct request_queue;
10struct io_uring_cmd;
11
12typedef int (bsg_sg_io_fn)(struct request_queue *, struct sg_io_v4 *hdr,
13 bool open_for_write, unsigned int timeout);
14
15typedef int (bsg_uring_cmd_fn)(struct request_queue *q, struct io_uring_cmd *ioucmd,
16 unsigned int issue_flags, bool open_for_write);
17
18struct bsg_device *bsg_register_queue(struct request_queue *q,
19 struct device *parent, const char *name,
20 bsg_sg_io_fn *sg_io_fn, bsg_uring_cmd_fn *uring_cmd_fn);
21void bsg_unregister_queue(struct bsg_device *bcd);
22
23#endif /* _LINUX_BSG_H */