1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 #ifndef SCSIHOST_H_INCLUDED
49 #define SCSIHOST_H_INCLUDED
50
51
52
53
54
55
56 #define MPT_SCANDV_GOOD (0x00000000)
57 #define MPT_SCANDV_DID_RESET (0x00000001)
58 #define MPT_SCANDV_SENSE (0x00000002)
59 #define MPT_SCANDV_SOME_ERROR (0x00000004)
60 #define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008)
61 #define MPT_SCANDV_ISSUE_SENSE (0x00000010)
62 #define MPT_SCANDV_FALLBACK (0x00000020)
63 #define MPT_SCANDV_BUSY (0x00000040)
64
65 #define MPT_SCANDV_MAX_RETRIES (10)
66
67 #define MPT_ICFLAG_BUF_CAP 0x01
68 #define MPT_ICFLAG_ECHO 0x02
69 #define MPT_ICFLAG_EBOS 0x04
70 #define MPT_ICFLAG_PHYS_DISK 0x08
71 #define MPT_ICFLAG_TAGGED_CMD 0x10
72 #define MPT_ICFLAG_DID_RESET 0x20
73 #define MPT_ICFLAG_RESERVED 0x40
74
75 #define MPT_SCSI_CMD_PER_DEV_HIGH 64
76 #define MPT_SCSI_CMD_PER_DEV_LOW 32
77
78 #define MPT_SCSI_CMD_PER_LUN 7
79
80 #define MPT_SCSI_MAX_SECTORS 8192
81
82
83
84
85 #define MPTSCSIH_DOMAIN_VALIDATION 1
86 #define MPTSCSIH_MAX_WIDTH 1
87 #define MPTSCSIH_MIN_SYNC 0x08
88 #define MPTSCSIH_SAF_TE 0
89 #define MPTSCSIH_PT_CLEAR 0
90
91 #endif
92
93
94 typedef struct _internal_cmd {
95 char *data;
96 dma_addr_t data_dma;
97 int size;
98 u8 cmd;
99 u8 channel;
100 u8 id;
101 u64 lun;
102 u8 flags;
103 u8 physDiskNum;
104 u8 rsvd2;
105 u8 rsvd;
106 } INTERNAL_CMD;
107
108 extern void mptscsih_remove(struct pci_dev *);
109 extern void mptscsih_shutdown(struct pci_dev *);
110 #ifdef CONFIG_PM
111 extern int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);
112 extern int mptscsih_resume(struct pci_dev *pdev);
113 #endif
114 extern int mptscsih_show_info(struct seq_file *, struct Scsi_Host *);
115 extern const char * mptscsih_info(struct Scsi_Host *SChost);
116 extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt);
117 extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel,
118 u8 id, u64 lun, int ctx2abort, ulong timeout);
119 extern void mptscsih_slave_destroy(struct scsi_device *device);
120 extern int mptscsih_slave_configure(struct scsi_device *device);
121 extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
122 extern int mptscsih_dev_reset(struct scsi_cmnd * SCpnt);
123 extern int mptscsih_bus_reset(struct scsi_cmnd * SCpnt);
124 extern int mptscsih_host_reset(struct scsi_cmnd *SCpnt);
125 extern int mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, sector_t capacity, int geom[]);
126 extern int mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
127 extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
128 extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
129 extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
130 extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
131 extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
132 extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
133 extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
134 extern struct device_attribute *mptscsih_host_attrs[];
135 extern struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
136 extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code);
137 extern void mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd);