mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Use the per-device cdev_device_interface to store the bsg data in the char device inode, and thus remove the need to embedd the bsg_class_device structure in the request_queue. Link: https://lore.kernel.org/r/20210729064845.1044147-2-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
25 lines
641 B
C
25 lines
641 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_BSG_H
|
|
#define _LINUX_BSG_H
|
|
|
|
#include <uapi/linux/bsg.h>
|
|
|
|
struct bsg_device;
|
|
struct device;
|
|
struct request;
|
|
struct request_queue;
|
|
|
|
struct bsg_ops {
|
|
int (*check_proto)(struct sg_io_v4 *hdr);
|
|
int (*fill_hdr)(struct request *rq, struct sg_io_v4 *hdr,
|
|
fmode_t mode);
|
|
int (*complete_rq)(struct request *rq, struct sg_io_v4 *hdr);
|
|
void (*free_rq)(struct request *rq);
|
|
};
|
|
|
|
struct bsg_device *bsg_register_queue(struct request_queue *q,
|
|
struct device *parent, const char *name,
|
|
const struct bsg_ops *ops);
|
|
void bsg_unregister_queue(struct bsg_device *bcd);
|
|
|
|
#endif /* _LINUX_BSG_H */
|