7b8719ed1c
If CONFIG_BLK_DEV_BSG is disabled on the vendor side, then struct request_queue will have an ABI diff. Remove the #ifdef in the struct so that vendors can choose whether or not to use the config. 'struct request_queue at blkdev.h:434:1' changed:¬ type size changed from 17600 to 17920 (in bits)¬ 2 data member insertions:¬ 'bsg_job_fn* request_queue::bsg_job_fn', at offset 13952 (in bits) at blkdev.h:650:1¬ 'bsg_class_device request_queue::bsg_dev', at offset 14016 (in bits) at blkdev.h:651:1¬ Signed-off-by: Will McVicker <willmcvicker@google.com> Bug: 152917514 Test: compile, verify ABI diff Change-Id: Iec2e3460b717b667fcc0409cbc4ec985cfe0f69c
39 lines
1,012 B
C
39 lines
1,012 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_BSG_H
|
|
#define _LINUX_BSG_H
|
|
|
|
#include <uapi/linux/bsg.h>
|
|
|
|
struct request;
|
|
|
|
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_class_device {
|
|
struct device *class_dev;
|
|
int minor;
|
|
struct request_queue *queue;
|
|
const struct bsg_ops *ops;
|
|
};
|
|
|
|
#ifdef CONFIG_BLK_DEV_BSG
|
|
int bsg_register_queue(struct request_queue *q, struct device *parent,
|
|
const char *name, const struct bsg_ops *ops);
|
|
int bsg_scsi_register_queue(struct request_queue *q, struct device *parent);
|
|
void bsg_unregister_queue(struct request_queue *q);
|
|
#else
|
|
static inline int bsg_scsi_register_queue(struct request_queue *q,
|
|
struct device *parent)
|
|
{
|
|
return 0;
|
|
}
|
|
static inline void bsg_unregister_queue(struct request_queue *q)
|
|
{
|
|
}
|
|
#endif /* CONFIG_BLK_DEV_BSG */
|
|
#endif /* _LINUX_BSG_H */
|