Print this page
7127 remove -Wno-missing-braces from Makefile.uts
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_fw.c
+++ new/usr/src/uts/common/io/fibre-channel/fca/emlxs/emlxs_fw.c
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at
9 9 * http://www.opensource.org/licenses/cddl1.txt.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2004-2012 Emulex. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #define DRIVER_NAME "emlxs"
28 28 #define EMLXS_FW_TABLE_DEF
29 29
30 30 #include <sys/types.h>
31 31 #include <sys/modctl.h>
32 32 #include <emlxs_version.h>
33 33 #include <emlxs_fw.h>
34 34
35 35 emlxs_firmware_t emlxs_fw_mod_table[] = EMLXS_FW_TABLE;
36 36 int emlxs_fw_mod_count = sizeof (emlxs_fw_mod_table) /
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
37 37 sizeof (emlxs_firmware_t);
38 38 char emlxs_fw_mod_name[] = EMLXS_FW_NAME;
39 39
40 40 static struct modlmisc emlxs_modlmisc = {
41 41 &mod_miscops,
42 42 emlxs_fw_mod_name
43 43 };
44 44
45 45 static struct modlinkage emlxs_modlinkage = {
46 46 MODREV_1,
47 - (void *)&emlxs_modlmisc,
48 - NULL
47 + { (void *)&emlxs_modlmisc, NULL }
49 48 };
50 49
51 50 int
52 51 _init(void)
53 52 {
54 53 int rval;
55 54
56 55 rval = mod_install(&emlxs_modlinkage);
57 56
58 57 return (rval);
59 58
60 59 } /* _init() */
61 60
62 61 int
63 62 _fini()
64 63 {
65 64 int rval;
66 65
67 66 rval = mod_remove(&emlxs_modlinkage);
68 67
69 68 return (rval);
70 69
71 70 } /* _fini() */
72 71
73 72 int
74 73 _info(struct modinfo *modinfop)
75 74 {
76 75 int rval;
77 76
78 77 rval = mod_info(&emlxs_modlinkage, modinfop);
79 78
80 79 return (rval);
81 80
82 81 } /* _fini() */
83 82
84 83 int
85 84 emlxs_fw_get(emlxs_firmware_t *fw)
86 85 {
87 86 uint32_t i;
88 87 emlxs_firmware_t *fw_table;
89 88
90 89 /* Find matching firmware table entry */
91 90 fw_table = emlxs_fw_mod_table;
92 91 for (i = 0; i < emlxs_fw_mod_count; i++, fw_table++) {
93 92 /* Validate requested fw image */
94 93 if ((fw_table->id == fw->id) &&
95 94 (fw_table->kern == fw->kern) &&
96 95 (fw_table->stub == fw->stub) &&
97 96 (fw_table->sli1 == fw->sli1) &&
98 97 (fw_table->sli2 == fw->sli2) &&
99 98 (fw_table->sli3 == fw->sli3) &&
100 99 (fw_table->sli4 == fw->sli4)) {
101 100 /* Return image data and size */
102 101 fw->image = fw_table->image;
103 102 fw->size = fw_table->size;
104 103
105 104 return (0);
106 105 }
107 106 }
108 107
109 108 fw->image = NULL;
110 109 fw->size = 0;
111 110
112 111 return (1);
113 112
114 113 } /* emlxs_fw_get() */
↓ open down ↓ |
56 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX