OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [message/] [fusion/] [isense.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef ISENSE_H_INCLUDED
2
#define ISENSE_H_INCLUDED
3
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
4
 
5
#ifdef __KERNEL__
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  */
9
#else
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;
15
    #endif
16
#endif
17
 
18
#include "scsi3.h"                      /* needed for all things SCSI */
19
 
20
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
21
/*
22
 *  Defines and typedefs...
23
 */
24
 
25
#ifdef __KERNEL__
26
#define PrintF(x) printk x
27
#else
28
#define PrintF(x) printf x
29
#endif
30
 
31
#ifndef TRUE
32
#define TRUE 1
33
#define FALSE 0
34
#endif
35
 
36
#define RETRY_STATUS  ((int) 1)
37
#define PUT_STATUS    ((int) 0)
38
 
39
/*
40
 *    A generic structure to hold info about IO request that caused
41
 *    a Request Sense to be performed, and the resulting Sense Data.
42
 */
43
typedef struct IO_Info
44
{
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?                     */
57
    u16   rsvd_align1;
58
    u32   ComplCode;  /* Four-byte OS-dependent completion code.            */
59
    u32   NotifyL;    /* Four-byte OS-dependent notification field.         */
60
} IO_Info_t;
61
 
62
/*
63
 *  SCSI Additional Sense Code and Additional Sense Code Qualifier table.
64
 */
65
typedef struct ASCQ_Table
66
{
67
    u8     ASC;
68
    u8     ASCQ;
69
    char  *DevTypes;
70
    char  *Description;
71
} ASCQ_Table_t;
72
 
73
#if 0
74
/*
75
 *  SCSI Opcodes table.
76
 */
77
typedef struct SCSI_OPS_Table
78
{
79
    u8     OpCode;
80
    char  *DevTypes;
81
    char  *ScsiCmndStr;
82
} SCSI_OPS_Table_t;
83
#endif
84
 
85
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
86
/*
87
 *  Public entry point prototypes
88
 */
89
 
90
/* in scsiherr.c, needed by mptscsih.c */
91
extern int       mpt_ScsiHost_ErrorReport(IO_Info_t *ioop);
92
 
93
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
94
#endif
95
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.