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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *    Disk Array driver for Compaq SMART2 Controllers
3
 *    Copyright 1998 Compaq Computer Corporation
4
 *
5
 *    This program is free software; you can redistribute it and/or modify
6
 *    it under the terms of the GNU General Public License as published by
7
 *    the Free Software Foundation; either version 2 of the License, or
8
 *    (at your option) any later version.
9
 *
10
 *    This program is distributed in the hope that it will be useful,
11
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
13
 *    NON INFRINGEMENT.  See the GNU General Public License for more details.
14
 *
15
 *    You should have received a copy of the GNU General Public License
16
 *    along with this program; if not, write to the Free Software
17
 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
 *
19
 *    Questions/Comments/Bugfixes to arrays@compaq.com
20
 *
21
 */
22
#ifndef IDA_IOCTL_H
23
#define IDA_IOCTL_H
24
 
25
#include "ida_cmd.h"
26
#include "cpqarray.h"
27
 
28
#define IDAGETDRVINFO           0x27272828
29
#define IDAPASSTHRU             0x28282929
30
#define IDAGETCTLRSIG           0x29293030
31
#define IDAREVALIDATEVOLS       0x30303131
32
#define IDADRIVERVERSION        0x31313232
33
#define IDAGETPCIINFO           0x32323333
34
#define IDADEREGDISK            0x33333434
35
#define IDAREGNEWDISK           0x34343535
36
#define IDAGETLOGINFO           0x35353636
37
#define IDABIGPASSTHRU          0x36363535
38
 
39
typedef struct _ida_pci_info_struct
40
{
41
        unsigned char   bus;
42
        unsigned char   dev_fn;
43
        __u32           board_id;
44
} ida_pci_info_struct;
45
 
46
typedef struct _idaLogvolInfo_struct{
47
int             LogVolID;
48
int             num_opens;  /* number of opens on the logical volume */
49
int             num_parts;  /* number of partitions configured on logvol */
50
} idaLogvolInfo_struct;
51
 
52
/*
53
 * Normally, the ioctl determines the logical unit for this command by
54
 * the major,minor number of the fd passed to ioctl.  If you need to send
55
 * a command to a different/nonexistant unit (such as during config), you
56
 * can override the normal behavior by setting the unit valid bit. (Normally,
57
 * it should be zero) The controller the command is sent to is still
58
 * determined by the major number of the open device.
59
 */
60
 
61
#define UNITVALID       0x80
62
typedef struct {
63
        __u8    cmd;
64
        __u8    rcode;
65
        __u8    unit;
66
        __u32   blk;
67
        __u16   blk_cnt;
68
 
69
/* currently, sg_cnt is assumed to be 1: only the 0th element of sg is used */
70
        struct {
71
                void    *addr;
72
                size_t  size;
73
        } sg[SG_MAX];
74
        int     sg_cnt;
75
 
76
        union ctlr_cmds {
77
                drv_info_t              drv;
78
                unsigned char           buf[1024];
79
 
80
                id_ctlr_t               id_ctlr;
81
                drv_param_t             drv_param;
82
                id_log_drv_t            id_log_drv;
83
                id_log_drv_ext_t        id_log_drv_ext;
84
                sense_log_drv_stat_t    sense_log_drv_stat;
85
                id_phys_drv_t           id_phys_drv;
86
                blink_drv_leds_t        blink_drv_leds;
87
                sense_blink_leds_t      sense_blink_leds;
88
                config_t                config;
89
                reorder_log_drv_t       reorder_log_drv;
90
                label_log_drv_t         label_log_drv;
91
                surf_delay_t            surf_delay;
92
                overhead_delay_t        overhead_delay;
93
                mp_delay_t              mp_delay;
94
                scsi_param_t            scsi_param;
95
        } c;
96
} ida_ioctl_t;
97
 
98
#define IDA_MAX_KMALLOC_SIZE 128000
99
 
100
/* transfer type of the commands */
101
#define IDA_XFER_NONE   0x00
102
#define IDA_XFER_READ   0x01
103
#define IDA_XFER_WRITE  0x02
104
#define IDA_XFER_BOTH   0x03
105
 
106
typedef struct {
107
        __u8    cmd;
108
        __u8    rcode;
109
        __u8    unit;
110
        __u32   blk;
111
        __u16   blk_cnt;
112
 
113
        __u8    xfer_type;
114
        __u8    *buff;
115
        size_t  buff_size;
116
        __u32   buff_malloc_size;
117
        scsi_param_t *scsi_param; /* used only for PASSTHRU_A */
118
 
119
} ida_big_ioctl_t;
120
 
121
#endif /* IDA_IOCTL_H */

powered by: WebSVN 2.1.0

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