Deleted Added
full compact
idareg.h (103870) idareg.h (124471)
1/*-
2 * Copyright (c) 1999,2000 Jonathan Lemon
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999,2000 Jonathan Lemon
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/ida/idareg.h 103870 2002-09-23 18:54:32Z alfred $
26 * $FreeBSD: head/sys/dev/ida/idareg.h 124471 2004-01-13 11:28:21Z mdodd $
27 */
28
29/*
30 * #defines and software structures for the Compaq RAID card
31 */
32
33/*
34 * defines for older EISA controllers (IDA, IDA-2, IAES, SMART)
35 */
27 */
28
29/*
30 * #defines and software structures for the Compaq RAID card
31 */
32
33/*
34 * defines for older EISA controllers (IDA, IDA-2, IAES, SMART)
35 */
36#define R_EISA_INT_MASK 0x01
37#define R_EISA_LOCAL_MASK 0x04
38#define R_EISA_LOCAL_DOORBELL 0x05
39#define R_EISA_SYSTEM_MASK 0x06
40#define R_EISA_SYSTEM_DOORBELL 0x07
41#define R_EISA_LIST_ADDR 0x08
42#define R_EISA_LIST_LEN 0x0c
43#define R_EISA_TAG 0x0f
44#define R_EISA_COMPLETE_ADDR 0x10
45#define R_EISA_LIST_STATUS 0x16
36#define R_EISA_INT_MASK 0x01
37#define R_EISA_LOCAL_MASK 0x04
38#define R_EISA_LOCAL_DOORBELL 0x05
39#define R_EISA_SYSTEM_MASK 0x06
40#define R_EISA_SYSTEM_DOORBELL 0x07
41#define R_EISA_LIST_ADDR 0x08
42#define R_EISA_LIST_LEN 0x0c
43#define R_EISA_TAG 0x0f
44#define R_EISA_COMPLETE_ADDR 0x10
45#define R_EISA_LIST_STATUS 0x16
46
46
47#define EISA_CHANNEL_BUSY 0x01
48#define EISA_CHANNEL_CLEAR 0x02
47#define EISA_CHANNEL_BUSY 0x01
48#define EISA_CHANNEL_CLEAR 0x02
49
50/*
51 * board register offsets for SMART-2 controllers
52 */
49
50/*
51 * board register offsets for SMART-2 controllers
52 */
53#define R_CMD_FIFO 0x04
54#define R_DONE_FIFO 0x08
55#define R_INT_MASK 0x0C
56#define R_STATUS 0x10
57#define R_INT_PENDING 0x14
53#define R_CMD_FIFO 0x04
54#define R_DONE_FIFO 0x08
55#define R_INT_MASK 0x0C
56#define R_STATUS 0x10
57#define R_INT_PENDING 0x14
58
59/*
60 * interrupt mask values for SMART series
61 */
58
59/*
60 * interrupt mask values for SMART series
61 */
62#define INT_DISABLE 0x00
63#define INT_ENABLE 0x01
62#define INT_DISABLE 0x00
63#define INT_ENABLE 0x01
64
65/*
66 * board offsets for the 42xx series
67 */
64
65/*
66 * board offsets for the 42xx series
67 */
68#define R_42XX_STATUS 0x30
69#define R_42XX_INT_MASK 0x34
70#define R_42XX_REQUEST 0x40
71#define R_42XX_REPLY 0x44
68#define R_42XX_STATUS 0x30
69#define R_42XX_INT_MASK 0x34
70#define R_42XX_REQUEST 0x40
71#define R_42XX_REPLY 0x44
72
73/*
74 * interrupt values for 42xx series
75 */
72
73/*
74 * interrupt values for 42xx series
75 */
76#define INT_ENABLE_42XX 0x00
77#define INT_DISABLE_42XX 0x08
78#define STATUS_42XX_INT_PENDING 0x08
76#define INT_ENABLE_42XX 0x00
77#define INT_DISABLE_42XX 0x08
78#define STATUS_42XX_INT_PENDING 0x08
79
80/*
81 * return status codes
82 */
79
80/*
81 * return status codes
82 */
83#define SOFT_ERROR 0x02
84#define HARD_ERROR 0x04
85#define CMD_REJECTED 0x14
83#define SOFT_ERROR 0x02
84#define HARD_ERROR 0x04
85#define CMD_REJECTED 0x14
86
87/*
88 * command types
89 */
90#define CMD_GET_LOG_DRV_INFO 0x10
91#define CMD_GET_CTRL_INFO 0x11
92#define CMD_SENSE_DRV_STATUS 0x12
93#define CMD_START_RECOVERY 0x13
94#define CMD_GET_PHYS_DRV_INFO 0x15
95#define CMD_BLINK_DRV_LEDS 0x16
96#define CMD_SENSE_DRV_LEDS 0x17
97#define CMD_GET_LOG_DRV_EXT 0x18
98#define CMD_GET_CTRL_INFO 0x11
86
87/*
88 * command types
89 */
90#define CMD_GET_LOG_DRV_INFO 0x10
91#define CMD_GET_CTRL_INFO 0x11
92#define CMD_SENSE_DRV_STATUS 0x12
93#define CMD_START_RECOVERY 0x13
94#define CMD_GET_PHYS_DRV_INFO 0x15
95#define CMD_BLINK_DRV_LEDS 0x16
96#define CMD_SENSE_DRV_LEDS 0x17
97#define CMD_GET_LOG_DRV_EXT 0x18
98#define CMD_GET_CTRL_INFO 0x11
99#define CMD_READ 0x20
100#define CMD_WRITE 0x30
101#define CMD_WRITE_MEDIA 0x31
102#define CMD_GET_CONFIG 0x50
103#define CMD_SET_CONFIG 0x51
104#define CMD_START_FIRMWARE 0x99 /* for integrated RAID */
105#define CMD_FLUSH_CACHE 0xc2
99#define CMD_READ 0x20
100#define CMD_WRITE 0x30
101#define CMD_WRITE_MEDIA 0x31
102#define CMD_GET_CONFIG 0x50
103#define CMD_SET_CONFIG 0x51
104#define CMD_START_FIRMWARE 0x99 /* for integrated RAID */
105#define CMD_FLUSH_CACHE 0xc2
106
107/*
108 * command structures
109 */
110struct ida_drive_info {
111 u_int16_t secsize;
112 u_int32_t secperunit;
113 u_int16_t ncylinders;

--- 45 unchanged lines hidden ---
106
107/*
108 * command structures
109 */
110struct ida_drive_info {
111 u_int16_t secsize;
112 u_int32_t secperunit;
113 u_int16_t ncylinders;

--- 45 unchanged lines hidden ---