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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 #ifndef _SYS_DKIO_H
27 #define _SYS_DKIO_H
28
29 #include <sys/dklabel.h> /* Needed for NDKMAP define */
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 /*
36 * Structures and definitions for disk io control commands
37 */
38
39 /*
40 * Structures used as data by ioctl calls.
41 */
42
43 #define DK_DEVLEN 16 /* device name max length, including */
498 typedef struct dk_updatefw {
499 caddr_t dku_ptrbuf; /* pointer to firmware buf */
500 uint_t dku_size; /* firmware buf length */
501 uint8_t dku_type; /* firmware update type */
502 } dk_updatefw_t;
503
504 #ifdef _SYSCALL32
505 typedef struct dk_updatefw_32 {
506 caddr32_t dku_ptrbuf; /* pointer to firmware buf */
507 uint_t dku_size; /* firmware buf length */
508 uint8_t dku_type; /* firmware update type */
509 } dk_updatefw_32_t;
510 #endif /* _SYSCALL32 */
511
512 /*
513 * firmware update type - temporary or permanent use
514 */
515 #define FW_TYPE_TEMP 0x0 /* temporary use */
516 #define FW_TYPE_PERM 0x1 /* permanent use */
517
518
519 #ifdef __cplusplus
520 }
521 #endif
522
523 #endif /* _SYS_DKIO_H */
|
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1982, 2010, Oracle and/or its affiliates. All rights reserved.
24 *
25 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 */
27
28 #ifndef _SYS_DKIO_H
29 #define _SYS_DKIO_H
30
31 #include <sys/dklabel.h> /* Needed for NDKMAP define */
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /*
38 * Structures and definitions for disk io control commands
39 */
40
41 /*
42 * Structures used as data by ioctl calls.
43 */
44
45 #define DK_DEVLEN 16 /* device name max length, including */
500 typedef struct dk_updatefw {
501 caddr_t dku_ptrbuf; /* pointer to firmware buf */
502 uint_t dku_size; /* firmware buf length */
503 uint8_t dku_type; /* firmware update type */
504 } dk_updatefw_t;
505
506 #ifdef _SYSCALL32
507 typedef struct dk_updatefw_32 {
508 caddr32_t dku_ptrbuf; /* pointer to firmware buf */
509 uint_t dku_size; /* firmware buf length */
510 uint8_t dku_type; /* firmware update type */
511 } dk_updatefw_32_t;
512 #endif /* _SYSCALL32 */
513
514 /*
515 * firmware update type - temporary or permanent use
516 */
517 #define FW_TYPE_TEMP 0x0 /* temporary use */
518 #define FW_TYPE_PERM 0x1 /* permanent use */
519
520 /*
521 * ioctl to free space (e.g. SCSI UNMAP) off a disk.
522 */
523 #define DKIOCFREE (DKIOC|50)
524
525 typedef struct dkioc_free_s {
526 uint32_t df_flags;
527 uint32_t df_reserved; /* For easy 64-bit alignment below... */
528 diskaddr_t df_start;
529 diskaddr_t df_length;
530 } dkioc_free_t;
531
532 #define DF_WAIT_SYNC 0x00000001 /* Wait for full write-out of free. */
533
534 #ifdef __cplusplus
535 }
536 #endif
537
538 #endif /* _SYS_DKIO_H */
|