bsg: support for full generic block layer SG v3
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
8f41958bdd
commit
3d6392cfbd
10 changed files with 1171 additions and 79 deletions
21
include/linux/bsg.h
Normal file
21
include/linux/bsg.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef BSG_H
|
||||
#define BSG_H
|
||||
|
||||
#if defined(CONFIG_BLK_DEV_BSG)
|
||||
struct bsg_class_device {
|
||||
struct class_device *class_dev;
|
||||
struct device *dev;
|
||||
int minor;
|
||||
struct gendisk *disk;
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
extern int bsg_register_disk(struct gendisk *);
|
||||
extern void bsg_unregister_disk(struct gendisk *);
|
||||
#else
|
||||
struct bsg_class_device { };
|
||||
#define bsg_register_disk(disk) (0)
|
||||
#define bsg_unregister_disk(disk) do { } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue