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 2009 QLogic Corporation. All rights reserved.
24 * Use is subject to license terms.
28 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
40 * stmf error codes from qlt_ioctl
42 typedef enum qlt_ioctl_err
{
44 QLTIO_DUMP_INPROGRESS
,
46 QLTIO_INVALID_FW_SIZE
,
47 QLTIO_INVALID_FW_TYPE
,
48 QLTIO_ALREADY_FETCHED
,
49 QLTIO_MBOX_NOT_INITIALIZED
,
50 QLTIO_CANT_GET_MBOXES
,
57 #define QLTIO_ERR_STRINGS { \
58 "No additional information", \
59 "No firmware dump available", \
60 "Firmware dump in progress", \
61 "Port is not online", \
62 "Firmware size is invalid", \
63 "Firmware type does not match this chip", \
64 "Firmware dump already fetched by user", \
65 "Mailboxes are not yet initialized", \
66 "Mailboxes are not busy", \
67 "Mailbox command timed out", \
68 "Mailbox command got aborted", \
72 typedef struct qlt_fw_info
{
73 uint32_t fwi_stay_offline
:1,
77 uint16_t fwi_active_major
;
78 uint16_t fwi_active_minor
;
79 uint16_t fwi_active_subminor
;
80 uint16_t fwi_active_attr
;
81 uint16_t fwi_loaded_major
;
82 uint16_t fwi_loaded_minor
;
83 uint16_t fwi_loaded_subminor
;
84 uint16_t fwi_loaded_attr
;
85 uint16_t fwi_default_major
;
86 uint16_t fwi_default_minor
;
87 uint16_t fwi_default_subminor
;
88 uint16_t fwi_default_attr
;
91 typedef struct qlt_ioctl_mbox
{
95 uint32_t from_fw_mask
;
98 #define QLT_FWDUMP_BUFSIZE (4 * 1024 * 1024)
102 #define QLT_IOCTL_FETCH_FWDUMP 0x9001
103 #define QLT_IOCTL_TRIGGER_FWDUMP 0x9002
104 #define QLT_IOCTL_UPLOAD_FW 0x9003
105 #define QLT_IOCTL_CLEAR_FW 0x9004
106 #define QLT_IOCTL_GET_FW_INFO 0x9005
107 #define QLT_IOCTL_STAY_OFFLINE 0x9006
108 #define QLT_IOCTL_MBOX 0x9007
109 #define QLT_IOCTL_ELOG 0x9008
115 #endif /* _QLT_IOCTL_H */