summaryrefslogtreecommitdiff
path: root/include/linux/bsg.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-07-29 08:48:45 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-07-30 22:22:36 -0400
commit75ca56409e5b35aa6ceef94462f39ef4f533fc41 (patch)
treebb531f9b0f990e9bb763ae66577519f04ab733bf /include/linux/bsg.h
parent1e61c1a804d2a2a3c46add01cac3a6e9eca01080 (diff)
scsi: bsg: Move the whole request execution into the SCSI/transport handlers
Remove the amount of indirect calls by making the handler responsible for the entire execution of the request. Link: https://lore.kernel.org/r/20210729064845.1044147-5-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/linux/bsg.h')
-rw-r--r--include/linux/bsg.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/bsg.h b/include/linux/bsg.h
index fa21f79beda2..1ac81c809da9 100644
--- a/include/linux/bsg.h
+++ b/include/linux/bsg.h
@@ -6,20 +6,14 @@
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);
-};
+typedef int (bsg_sg_io_fn)(struct request_queue *, struct sg_io_v4 *hdr,
+ fmode_t mode, unsigned int timeout);
struct bsg_device *bsg_register_queue(struct request_queue *q,
struct device *parent, const char *name,
- const struct bsg_ops *ops);
+ bsg_sg_io_fn *sg_io_fn);
void bsg_unregister_queue(struct bsg_device *bcd);
#endif /* _LINUX_BSG_H */