scsi_driver.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #ifndef _SCSI_SCSI_DRIVER_H
  2. #define _SCSI_SCSI_DRIVER_H
  3. #include <linux/device.h>
  4. struct module;
  5. struct scsi_cmnd;
  6. struct scsi_device;
  7. struct request;
  8. struct request_queue;
  9. struct scsi_driver {
  10. struct module *owner;
  11. struct device_driver gendrv;
  12. void (*rescan)(struct device *);
  13. int (*done)(struct scsi_cmnd *);
  14. int (*eh_action)(struct scsi_cmnd *, unsigned char *, int, 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. int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req);
  25. int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
  26. int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
  27. int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
  28. int scsi_prep_fn(struct request_queue *, struct request *);
  29. #endif /* _SCSI_SCSI_DRIVER_H */