4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SATA_CFGADM_H
28 #define _SATA_CFGADM_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 /* SATA cfgadm plugin interface definitions */
39 * Sub-commands of DEVCTL_AP_CONTROL.
42 SATA_CFGA_GET_AP_TYPE
= 1,
43 SATA_CFGA_GET_MODEL_INFO
,
44 SATA_CFGA_GET_REVFIRMWARE_INFO
,
45 SATA_CFGA_GET_SERIALNUMBER_INFO
,
47 SATA_CFGA_RESET_DEVICE
,
49 SATA_CFGA_PORT_DEACTIVATE
,
50 SATA_CFGA_PORT_ACTIVATE
,
51 SATA_CFGA_PORT_SELF_TEST
,
52 SATA_CFGA_GET_DEVICE_PATH
55 /* SATA cfgadm plugin interface implementation definitions */
57 typedef struct sata_ioctl_data
{
58 uint_t cmd
; /* one of the above commands */
59 uint_t port
; /* port */
60 uint_t get_size
; /* get size/data flag */
61 caddr_t buf
; /* data buffer */
62 uint_t bufsiz
; /* data buffer size */
63 uint_t misc_arg
; /* reserved */
67 /* For 32-bit app/64-bit kernel */
68 typedef struct sata_ioctl_data_32
{
69 uint32_t cmd
; /* one of the above commands */
70 uint32_t port
; /* port */
71 uint32_t get_size
; /* get size/data flag */
72 caddr32_t buf
; /* data buffer */
73 uint32_t bufsiz
; /* data buffer size */
74 uint32_t misc_arg
; /* reserved */
75 } sata_ioctl_data_32_t
;
78 * Port encoding for ioctl "port" parameter - corresponds to
79 * scsi target encoding for sata devices
81 #define SATA_CFGA_CPORT_MASK 0x1f
82 #define SATA_CFGA_PMPORT_MASK 0xf
83 #define SATA_CFGA_PMPORT_SHIFT 0x5
84 #define SATA_CFGA_PMPORT_QUAL 0x200
90 #endif /* _SATA_CFGADM_H */