1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <uapi/linux/bsg.h>
9 #ifdef CONFIG_BLK_DEV_BSG
11 int (*check_proto)(struct sg_io_v4 *hdr);
12 int (*fill_hdr)(struct request *rq, struct sg_io_v4 *hdr,
14 int (*complete_rq)(struct request *rq, struct sg_io_v4 *hdr);
15 void (*free_rq)(struct request *rq);
18 struct bsg_class_device {
19 struct device *class_dev;
21 struct request_queue *queue;
22 const struct bsg_ops *ops;
25 int bsg_register_queue(struct request_queue *q, struct device *parent,
26 const char *name, const struct bsg_ops *ops);
27 int bsg_scsi_register_queue(struct request_queue *q, struct device *parent);
28 void bsg_unregister_queue(struct request_queue *q);
30 static inline int bsg_scsi_register_queue(struct request_queue *q,
31 struct device *parent)
35 static inline void bsg_unregister_queue(struct request_queue *q)
38 #endif /* CONFIG_BLK_DEV_BSG */
39 #endif /* _LINUX_BSG_H */