2 * Copyright (c) 2008 Yahoo!, Inc.
4 * Written by: John Baldwin <jhb@FreeBSD.org>
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the author nor the names of any co-contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * LSI MPT-Fusion Host Adapter FreeBSD userland interface
38 #include <dev/mps/mpi/mpi2_type.h>
39 #include <dev/mps/mpi/mpi2.h>
40 #include <dev/mps/mpi/mpi2_cnfg.h>
41 #include <dev/mps/mpi/mpi2_sas.h>
44 * For the read header requests, the header should include the page
45 * type or extended page type, page number, and page version. The
46 * buffer and length are unused. The completed header is returned in
47 * the 'header' member.
49 * For the read page and write page requests, 'buf' should point to a
50 * buffer of 'len' bytes which holds the entire page (including the
53 * All requests specify the page address in 'page_address'.
55 struct mps_cfg_page_req {
56 MPI2_CONFIG_PAGE_HEADER header;
57 uint32_t page_address;
63 struct mps_ext_cfg_page_req {
64 MPI2_CONFIG_EXTENDED_PAGE_HEADER header;
65 uint32_t page_address;
71 struct mps_raid_action {
75 uint8_t phys_disk_num;
76 uint32_t action_data_word;
79 uint32_t volume_status;
80 uint32_t action_data[4];
81 uint16_t action_status;
86 struct mps_usr_command {
96 #define MPSIO_MPS_COMMAND_FLAG_VERBOSE 0x01
97 #define MPSIO_MPS_COMMAND_FLAG_DEBUG 0x02
98 #define MPSIO_READ_CFG_HEADER _IOWR('M', 200, struct mps_cfg_page_req)
99 #define MPSIO_READ_CFG_PAGE _IOWR('M', 201, struct mps_cfg_page_req)
100 #define MPSIO_READ_EXT_CFG_HEADER _IOWR('M', 202, struct mps_ext_cfg_page_req)
101 #define MPSIO_READ_EXT_CFG_PAGE _IOWR('M', 203, struct mps_ext_cfg_page_req)
102 #define MPSIO_WRITE_CFG_PAGE _IOWR('M', 204, struct mps_cfg_page_req)
103 #define MPSIO_RAID_ACTION _IOWR('M', 205, struct mps_raid_action)
104 #define MPSIO_MPS_COMMAND _IOWR('M', 210, struct mps_usr_command)
106 #endif /* !_MPS_IOCTL_H_ */