scsi_driver.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. };
  15. #define to_scsi_driver(drv) \
  16. container_of((drv), struct scsi_driver, gendrv)
  17. extern int scsi_register_driver(struct device_driver *);
  18. #define scsi_unregister_driver(drv) \
  19. driver_unregister(drv);
  20. extern int scsi_register_interface(struct class_interface *);
  21. #define scsi_unregister_interface(intf) \
  22. class_interface_unregister(intf)
  23. int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req);
  24. int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
  25. int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
  26. int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
  27. int scsi_prep_fn(struct request_queue *, struct request *);
  28. #endif /* _SCSI_SCSI_DRIVER_H */