mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
1e61c1a804
commit
75ca56409e
4 changed files with 99 additions and 134 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue