scsi_driver.h 781 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _SCSI_SCSI_DRIVER_H
  2. #define _SCSI_SCSI_DRIVER_H
  3. #include <linux/device.h>
  4. struct module;
  5. struct request;
  6. struct scsi_cmnd;
  7. struct scsi_device;
  8. struct scsi_driver {
  9. struct device_driver gendrv;
  10. void (*rescan)(struct device *);
  11. int (*init_command)(struct scsi_cmnd *);
  12. void (*uninit_command)(struct scsi_cmnd *);
  13. int (*done)(struct scsi_cmnd *);
  14. int (*eh_action)(struct scsi_cmnd *, int);
  15. };
  16. #define to_scsi_driver(drv) \
  17. container_of((drv), struct scsi_driver, gendrv)
  18. extern int scsi_register_driver(struct device_driver *);
  19. #define scsi_unregister_driver(drv) \
  20. driver_unregister(drv);
  21. extern int scsi_register_interface(struct class_interface *);
  22. #define scsi_unregister_interface(intf) \
  23. class_interface_unregister(intf)
  24. #endif /* _SCSI_SCSI_DRIVER_H */