mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 05:49:40 +07:00
2451079bc2
Commit18a4d0a22e
(Handle disk devices which can not process medium access commands) was introduced to offline any device which cannot process medium access commands. However, commit3eef6257de
(Reduce error recovery time by reducing use of TURs) reduced the number of TURs by sending it only on the first failing command, which might or might not be a medium access command. So in combination this results in an erratic device offlining during EH; if the command where the TUR was sent upon happens to be a medium access command the device will be set offline, if not everything proceeds as normal. This patch moves the check to the final test, eliminating this problem. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
39 lines
1.1 KiB
C
39 lines
1.1 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 *);
|
|
int (*eh_action)(struct scsi_cmnd *, int);
|
|
};
|
|
#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 */
|