1 #ifndef ISENSE_H_INCLUDED
2 #define ISENSE_H_INCLUDED
3 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
6 #include <linux/types.h> /* needed for u8, etc. */
7 #include <linux/string.h> /* needed for strcat */
8 #include <linux/kernel.h> /* needed for sprintf */
10 #ifndef U_STUFF_DEFINED
11 #define U_STUFF_DEFINED
12 typedef unsigned char u8;
13 typedef unsigned short u16;
14 typedef unsigned int u32;
18 #include "scsi3.h" /* needed for all things SCSI */
20 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
22 * Defines and typedefs...
26 #define PrintF(x) printk x
28 #define PrintF(x) printf x
36 #define RETRY_STATUS ((int) 1)
37 #define PUT_STATUS ((int) 0)
40 * A generic structure to hold info about IO request that caused
41 * a Request Sense to be performed, and the resulting Sense Data.
43 typedef struct IO_Info
45 char *DevIDStr; /* String of chars which identifies the device. */
46 u8 *cdbPtr; /* Pointer (Virtual/Logical addr) to CDB bytes of
47 IO request that caused ContAllegianceCond. */
48 u8 *sensePtr; /* Pointer (Virtual/Logical addr) to Sense Data
49 returned by Request Sense operation. */
50 u8 *dataPtr; /* Pointer (Virtual/Logical addr) to Data buffer
51 of IO request caused ContAllegianceCondition. */
52 u8 *inqPtr; /* Pointer (Virtual/Logical addr) to Inquiry Data for
53 IO *Device* that caused ContAllegianceCondition. */
54 u8 SCSIStatus; /* SCSI status byte of IO request that caused
55 Contingent Allegiance Condition. */
56 u8 DoDisplay; /* Shall we display any messages? */
58 u32 ComplCode; /* Four-byte OS-dependent completion code. */
59 u32 NotifyL; /* Four-byte OS-dependent notification field. */
63 * SCSI Additional Sense Code and Additional Sense Code Qualifier table.
65 typedef struct ASCQ_Table
77 typedef struct SCSI_OPS_Table
85 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
87 * Public entry point prototypes
90 /* in scsiherr.c, needed by mptscsih.c */
91 extern int mpt_ScsiHost_ErrorReport(IO_Info_t *ioop);
93 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/