]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/scsi/scsi_driver.h
nvmet-fc: sync header templates with comments
[mirror_ubuntu-bionic-kernel.git] / include / scsi / scsi_driver.h
CommitLineData
1da177e4
LT
1#ifndef _SCSI_SCSI_DRIVER_H
2#define _SCSI_SCSI_DRIVER_H
3
4#include <linux/device.h>
5
6struct module;
a1b73fc1 7struct request;
1da177e4 8struct scsi_cmnd;
7f9a6bc4 9struct scsi_device;
1da177e4
LT
10
11struct scsi_driver {
1da177e4
LT
12 struct device_driver gendrv;
13
1da177e4 14 void (*rescan)(struct device *);
a1b73fc1
CH
15 int (*init_command)(struct scsi_cmnd *);
16 void (*uninit_command)(struct scsi_cmnd *);
7b3d9545 17 int (*done)(struct scsi_cmnd *);
2451079b 18 int (*eh_action)(struct scsi_cmnd *, int);
7a38dc0b 19 void (*eh_reset)(struct scsi_cmnd *);
1da177e4
LT
20};
21#define to_scsi_driver(drv) \
22 container_of((drv), struct scsi_driver, gendrv)
23
24extern int scsi_register_driver(struct device_driver *);
25#define scsi_unregister_driver(drv) \
26 driver_unregister(drv);
27
28extern int scsi_register_interface(struct class_interface *);
29#define scsi_unregister_interface(intf) \
30 class_interface_unregister(intf)
31
32#endif /* _SCSI_SCSI_DRIVER_H */