mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
b391277a56
If a SCSI ULD driver sets blk_queue_prep_rq(), it should clean it up itself on remove(), and not from the bus callbacks. This removes the need to hook into bus->remove(), which should not be used at the same time as driver->remove(). [jejb: fix sdkp initialisation problem due to mismerge] Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
#ifndef _SCSI_SCSI_DRIVER_H
|
|
#define _SCSI_SCSI_DRIVER_H
|
|
|
|
#include <linux/device.h>
|
|
|
|
struct module;
|
|
struct scsi_cmnd;
|
|
struct scsi_device;
|
|
struct request;
|
|
struct request_queue;
|
|
|
|
|
|
struct scsi_driver {
|
|
struct module *owner;
|
|
struct device_driver gendrv;
|
|
|
|
void (*rescan)(struct device *);
|
|
int (*done)(struct scsi_cmnd *);
|
|
};
|
|
#define to_scsi_driver(drv) \
|
|
container_of((drv), struct scsi_driver, gendrv)
|
|
|
|
extern int scsi_register_driver(struct device_driver *);
|
|
#define scsi_unregister_driver(drv) \
|
|
driver_unregister(drv);
|
|
|
|
extern int scsi_register_interface(struct class_interface *);
|
|
#define scsi_unregister_interface(intf) \
|
|
class_interface_unregister(intf)
|
|
|
|
int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req);
|
|
int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req);
|
|
int scsi_prep_state_check(struct scsi_device *sdev, struct request *req);
|
|
int scsi_prep_return(struct request_queue *q, struct request *req, int ret);
|
|
int scsi_prep_fn(struct request_queue *, struct request *);
|
|
|
|
#endif /* _SCSI_SCSI_DRIVER_H */
|