2 * This file is provided under a dual BSD/GPLv2 license. When using or
3 * redistributing this file, you may do so under either license.
7 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of version 2 of the GNU General Public License as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
21 * The full GNU General Public License is included in this distribution
22 * in the file called LICENSE.GPL.
26 * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
27 * All rights reserved.
29 * Redistribution and use in source and binary forms, with or without
30 * modification, are permitted provided that the following conditions
33 * * Redistributions of source code must retain the above copyright
34 * notice, this list of conditions and the following disclaimer.
35 * * Redistributions in binary form must reproduce the above copyright
36 * notice, this list of conditions and the following disclaimer in
37 * the documentation and/or other materials provided with the
40 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 #ifndef _SCIF_SAS_USER_PARAMETERS_H_
55 #define _SCIF_SAS_USER_PARAMETERS_H_
60 * @brief This file contains all of the interface methods that can be called
61 * by an SCIF user on a SCIF_SAS_USER_PARAMETERS object.
68 #include <dev/isci/scil/sci_types.h>
69 #include <dev/isci/scil/sci_status.h>
70 #include <dev/isci/scil/intel_sas.h>
74 * @struct SCIF_SAS_USER_PARAMETERS
76 * @brief This structure delineates the various user parameters that can be
77 * changed by the framework user.
79 typedef struct SCIF_SAS_USER_PARAMETERS
82 * This field indicates if the user would like to have the SATA NCQ
83 * feature enabled for all remote devices.
85 BOOL is_sata_ncq_enabled;
88 * This field indicates if the user would like to have the SATA Automatic
89 * Standby Timer feature enabled for all remote devices.
91 BOOL is_sata_standby_timer_enabled;
94 * This field indicates if the user would like to have the SATA Non-zero
95 * Buffer Offset feature enabled for all remote devices.
97 BOOL is_non_zero_buffer_offsets_enabled;
100 * This field indicates if the user would like to clear affiliation for EA
101 * SATA devices during the controller stop process.
103 BOOL clear_affiliation_during_controller_stop;
106 * This field indicates the user's desired NCQ depth for all remote
107 * devices. The maximum legal value for this field is 32.
112 * This field indicates the type of reset to be applied to all remote
113 * devices the first time they are discovered.
115 SCI_SAS_TASK_MGMT_FUNCTION_T reset_type;
118 * This field indicates the os/user recommends ignoring fua in translation
119 * for perfromance reasons.
123 } SCIF_SAS_USER_PARAMETERS_T;
126 * @union SCIF_USER_PARAMETERS
127 * @brief This structure/union specifies the various different user
128 * parameter sets available. Each type is specific to a
129 * Serial Attached SCSI implementation of the framework.
132 typedef union SCIF_USER_PARAMETERS
134 SCIF_SAS_USER_PARAMETERS_T sas;
136 } SCIF_USER_PARAMETERS_T;
139 * @brief This method allows the user to attempt to change the user
140 * parameters utilized by the controller.
142 * @param[in] controller This parameter specifies the controller on which
143 * to set the user parameters.
144 * @param[in] user_parameters This parameter specifies the USER_PARAMETERS
145 * object containing the potential new values.
147 * @return Indicate if the update of the user parameters was successful.
148 * @retval SCI_SUCCESS This value is returned if the operation succeeded.
149 * @retval SCI_FAILURE_INVALID_STATE This value is returned if the attempt
150 * to change the user parameter failed, because changing one of
151 * the parameters is not currently allowed.
152 * @retval SCI_FAILURE_INVALID_PARAMETER_VALUE This value is returned if the
153 * user supplied an invalid reset_type, ncq depth, etc.
155 SCI_STATUS scif_user_parameters_set(
156 SCI_CONTROLLER_HANDLE_T controller,
157 SCIF_USER_PARAMETERS_T * user_parameters
161 * @brief This method allows the user to retrieve the user parameters
162 * utilized by the controller.
164 * @param[in] controller This parameter specifies the controller on which
165 * to set the user parameters.
166 * @param[in] user_parameters This parameter specifies the USER_PARAMETERS
167 * object into which the framework shall save it's parameters.
171 void scif_user_parameters_get(
172 SCI_CONTROLLER_HANDLE_T controller,
173 SCIF_USER_PARAMETERS_T * user_parameters
178 #endif // __cplusplus
180 #endif // _SCIF_SAS_USER_PARAMETERS_H_