arm64: dts: exynos: Move pmu and timer nodes out of soc
[linux/fpc-iii.git] / include / scsi / scsi_eh.h
blob3810b340551c35d2a621c7b243dced26dd4d7c28
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SCSI_SCSI_EH_H
3 #define _SCSI_SCSI_EH_H
5 #include <linux/scatterlist.h>
7 #include <scsi/scsi_cmnd.h>
8 #include <scsi/scsi_common.h>
9 struct scsi_device;
10 struct Scsi_Host;
12 extern void scsi_eh_finish_cmd(struct scsi_cmnd *scmd,
13 struct list_head *done_q);
14 extern void scsi_eh_flush_done_q(struct list_head *done_q);
15 extern void scsi_report_bus_reset(struct Scsi_Host *, int);
16 extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
17 extern int scsi_block_when_processing_errors(struct scsi_device *);
18 extern bool scsi_command_normalize_sense(const struct scsi_cmnd *cmd,
19 struct scsi_sense_hdr *sshdr);
20 extern int scsi_check_sense(struct scsi_cmnd *);
22 static inline bool scsi_sense_is_deferred(const struct scsi_sense_hdr *sshdr)
24 return ((sshdr->response_code >= 0x70) && (sshdr->response_code & 1));
27 extern bool scsi_get_sense_info_fld(const u8 *sense_buffer, int sb_len,
28 u64 *info_out);
30 extern int scsi_ioctl_reset(struct scsi_device *, int __user *);
32 struct scsi_eh_save {
33 /* saved state */
34 int result;
35 int eh_eflags;
36 enum dma_data_direction data_direction;
37 unsigned underflow;
38 unsigned char cmd_len;
39 unsigned char prot_op;
40 unsigned char *cmnd;
41 struct scsi_data_buffer sdb;
42 /* new command support */
43 unsigned char eh_cmnd[BLK_MAX_CDB];
44 struct scatterlist sense_sgl;
47 extern void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
48 struct scsi_eh_save *ses, unsigned char *cmnd,
49 int cmnd_size, unsigned sense_bytes);
51 extern void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
52 struct scsi_eh_save *ses);
54 #endif /* _SCSI_SCSI_EH_H */