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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [scsi/] [gdth_ioctl.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#ifndef _GDTH_IOCTL_H
2
#define _GDTH_IOCTL_H
3
 
4
/* gdth_ioctl.h
5
 * $Id: gdth_ioctl.h,v 1.1.1.1 2004-04-15 02:10:52 phoenix Exp $
6
 */
7
 
8
/* IOCTLs */
9
#define GDTIOCTL_MASK       ('J'<<8)
10
#define GDTIOCTL_GENERAL    (GDTIOCTL_MASK | 0) /* general IOCTL */
11
#define GDTIOCTL_DRVERS     (GDTIOCTL_MASK | 1) /* get driver version */
12
#define GDTIOCTL_CTRTYPE    (GDTIOCTL_MASK | 2) /* get controller type */
13
#define GDTIOCTL_OSVERS     (GDTIOCTL_MASK | 3) /* get OS version */
14
#define GDTIOCTL_HDRLIST    (GDTIOCTL_MASK | 4) /* get host drive list */
15
#define GDTIOCTL_CTRCNT     (GDTIOCTL_MASK | 5) /* get controller count */
16
#define GDTIOCTL_LOCKDRV    (GDTIOCTL_MASK | 6) /* lock host drive */
17
#define GDTIOCTL_LOCKCHN    (GDTIOCTL_MASK | 7) /* lock channel */
18
#define GDTIOCTL_EVENT      (GDTIOCTL_MASK | 8) /* read controller events */
19
#define GDTIOCTL_SCSI       (GDTIOCTL_MASK | 9) /* SCSI command */
20
#define GDTIOCTL_RESET_BUS  (GDTIOCTL_MASK |10) /* reset SCSI bus */
21
#define GDTIOCTL_RESCAN     (GDTIOCTL_MASK |11) /* rescan host drives */
22
#define GDTIOCTL_RESET_DRV  (GDTIOCTL_MASK |12) /* reset (remote) drv. res. */
23
 
24
#define GDTIOCTL_MAGIC      0xaffe0004
25
#define EVENT_SIZE          294 
26
#define MAX_HDRIVES         100                     
27
 
28
/* IOCTL structure (write) */
29
typedef struct {
30
    ulong32                 magic;              /* IOCTL magic */
31
    ushort                  ioctl;              /* IOCTL */
32
    ushort                  ionode;             /* controller number */
33
    ushort                  service;            /* controller service */
34
    ushort                  timeout;            /* timeout */
35
    union {
36
        struct {
37
            unchar          command[512];       /* controller command */
38
            unchar          data[1];            /* add. data */
39
        } general;
40
        struct {
41
            unchar          lock;               /* lock/unlock */
42
            unchar          drive_cnt;          /* drive count */
43
            ushort          drives[MAX_HDRIVES];/* drives */
44
        } lockdrv;
45
        struct {
46
            unchar          lock;               /* lock/unlock */
47
            unchar          channel;            /* channel */
48
        } lockchn;
49
        struct {
50
            int             erase;              /* erase event ? */
51
            int             handle;
52
            unchar          evt[EVENT_SIZE];    /* event structure */
53
        } event;
54
        struct {
55
            unchar          bus;                /* SCSI bus */
56
            unchar          target;             /* target ID */
57
            unchar          lun;                /* LUN */
58
            unchar          cmd_len;            /* command length */
59
            unchar          cmd[12];            /* SCSI command */
60
        } scsi;
61
        struct {
62
            ushort          hdr_no;             /* host drive number */
63
            unchar          flag;               /* old meth./add/remove */
64
        } rescan;
65
    } iu;
66
} gdth_iowr_str;
67
 
68
/* IOCTL structure (read) */
69
typedef struct {
70
    ulong32                 size;               /* buffer size */
71
    ulong32                 status;             /* IOCTL error code */
72
    union {
73
        struct {
74
            unchar          data[1];            /* data */
75
        } general;
76
        struct {
77
            ushort          version;            /* driver version */
78
        } drvers;
79
        struct {
80
            unchar          type;               /* controller type */
81
            ushort          info;               /* slot etc. */
82
            ushort          oem_id;             /* OEM ID */
83
            ushort          bios_ver;           /* not used */
84
            ushort          access;             /* not used */
85
            ushort          ext_type;           /* extended type */
86
            ushort          device_id;          /* device ID */
87
            ushort          sub_device_id;      /* sub device ID */
88
        } ctrtype;
89
        struct {
90
            unchar          version;            /* OS version */
91
            unchar          subversion;         /* OS subversion */
92
            ushort          revision;           /* revision */
93
        } osvers;
94
        struct {
95
            ushort          count;              /* controller count */
96
        } ctrcnt;
97
        struct {
98
            int             handle;
99
            unchar          evt[EVENT_SIZE];    /* event structure */
100
        } event;
101
        struct {
102
            unchar          bus;                /* SCSI bus, 0xff: invalid */
103
            unchar          target;             /* target ID */
104
            unchar          lun;                /* LUN */
105
            unchar          cluster_type;       /* cluster properties */
106
        } hdr_list[MAX_HDRIVES];                /* index is host drive number */
107
    } iu;
108
} gdth_iord_str;
109
 
110
 
111
#endif
112
 

powered by: WebSVN 2.1.0

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