2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0
4 * This file is provided under a dual BSD/GPLv2 license. When using or
5 * redistributing this file, you may do so under either license.
9 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of version 2 of the GNU General Public License as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
23 * The full GNU General Public License is included in this distribution
24 * in the file called LICENSE.GPL.
28 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
29 * All rights reserved.
31 * Redistribution and use in source and binary forms, with or without
32 * modification, are permitted provided that the following conditions
35 * * Redistributions of source code must retain the above copyright
36 * notice, this list of conditions and the following disclaimer.
37 * * Redistributions in binary form must reproduce the above copyright
38 * notice, this list of conditions and the following disclaimer in
39 * the documentation and/or other materials provided with the
42 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
46 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
47 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
49 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 #ifndef _SCIF_SAS_USER_PARAMETERS_H_
57 #define _SCIF_SAS_USER_PARAMETERS_H_
62 * @brief This file contains all of the interface methods that can be called
63 * by an SCIF user on a SCIF_SAS_USER_PARAMETERS object.
70 #include <dev/isci/scil/sci_types.h>
71 #include <dev/isci/scil/sci_status.h>
72 #include <dev/isci/scil/intel_sas.h>
76 * @struct SCIF_SAS_USER_PARAMETERS
78 * @brief This structure delineates the various user parameters that can be
79 * changed by the framework user.
81 typedef struct SCIF_SAS_USER_PARAMETERS
84 * This field indicates if the user would like to have the SATA NCQ
85 * feature enabled for all remote devices.
87 BOOL is_sata_ncq_enabled;
90 * This field indicates if the user would like to have the SATA Automatic
91 * Standby Timer feature enabled for all remote devices.
93 BOOL is_sata_standby_timer_enabled;
96 * This field indicates if the user would like to have the SATA Non-zero
97 * Buffer Offset feature enabled for all remote devices.
99 BOOL is_non_zero_buffer_offsets_enabled;
102 * This field indicates if the user would like to clear affiliation for EA
103 * SATA devices during the controller stop process.
105 BOOL clear_affiliation_during_controller_stop;
108 * This field indicates the user's desired NCQ depth for all remote
109 * devices. The maximum legal value for this field is 32.
114 * This field indicates the type of reset to be applied to all remote
115 * devices the first time they are discovered.
117 SCI_SAS_TASK_MGMT_FUNCTION_T reset_type;
120 * This field indicates the os/user recommends ignoring fua in translation
121 * for performance reasons.
125 } SCIF_SAS_USER_PARAMETERS_T;
128 * @union SCIF_USER_PARAMETERS
129 * @brief This structure/union specifies the various different user
130 * parameter sets available. Each type is specific to a
131 * Serial Attached SCSI implementation of the framework.
134 typedef union SCIF_USER_PARAMETERS
136 SCIF_SAS_USER_PARAMETERS_T sas;
138 } SCIF_USER_PARAMETERS_T;
141 * @brief This method allows the user to attempt to change the user
142 * parameters utilized by the controller.
144 * @param[in] controller This parameter specifies the controller on which
145 * to set the user parameters.
146 * @param[in] user_parameters This parameter specifies the USER_PARAMETERS
147 * object containing the potential new values.
149 * @return Indicate if the update of the user parameters was successful.
150 * @retval SCI_SUCCESS This value is returned if the operation succeeded.
151 * @retval SCI_FAILURE_INVALID_STATE This value is returned if the attempt
152 * to change the user parameter failed, because changing one of
153 * the parameters is not currently allowed.
154 * @retval SCI_FAILURE_INVALID_PARAMETER_VALUE This value is returned if the
155 * user supplied an invalid reset_type, ncq depth, etc.
157 SCI_STATUS scif_user_parameters_set(
158 SCI_CONTROLLER_HANDLE_T controller,
159 SCIF_USER_PARAMETERS_T * user_parameters
163 * @brief This method allows the user to retrieve the user parameters
164 * utilized by the controller.
166 * @param[in] controller This parameter specifies the controller on which
167 * to set the user parameters.
168 * @param[in] user_parameters This parameter specifies the USER_PARAMETERS
169 * object into which the framework shall save it's parameters.
173 void scif_user_parameters_get(
174 SCI_CONTROLLER_HANDLE_T controller,
175 SCIF_USER_PARAMETERS_T * user_parameters
180 #endif // __cplusplus
182 #endif // _SCIF_SAS_USER_PARAMETERS_H_