| .. | .. |
|---|
| 1 | | -/* |
|---|
| 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. |
|---|
| 4 | | - |
|---|
| 5 | | - GPL LICENSE SUMMARY |
|---|
| 6 | | - Copyright(c) 2014 Intel Corporation. |
|---|
| 7 | | - This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - it under the terms of version 2 of the GNU General Public License as |
|---|
| 9 | | - published by the Free Software Foundation. |
|---|
| 10 | | - |
|---|
| 11 | | - This program is distributed in the hope that it will be useful, but |
|---|
| 12 | | - WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 14 | | - General Public License for more details. |
|---|
| 15 | | - |
|---|
| 16 | | - Contact Information: |
|---|
| 17 | | - qat-linux@intel.com |
|---|
| 18 | | - |
|---|
| 19 | | - BSD LICENSE |
|---|
| 20 | | - Copyright(c) 2014 Intel Corporation. |
|---|
| 21 | | - Redistribution and use in source and binary forms, with or without |
|---|
| 22 | | - modification, are permitted provided that the following conditions |
|---|
| 23 | | - are met: |
|---|
| 24 | | - |
|---|
| 25 | | - * Redistributions of source code must retain the above copyright |
|---|
| 26 | | - notice, this list of conditions and the following disclaimer. |
|---|
| 27 | | - * Redistributions in binary form must reproduce the above copyright |
|---|
| 28 | | - notice, this list of conditions and the following disclaimer in |
|---|
| 29 | | - the documentation and/or other materials provided with the |
|---|
| 30 | | - distribution. |
|---|
| 31 | | - * Neither the name of Intel Corporation nor the names of its |
|---|
| 32 | | - contributors may be used to endorse or promote products derived |
|---|
| 33 | | - from this software without specific prior written permission. |
|---|
| 34 | | - |
|---|
| 35 | | - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|---|
| 36 | | - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|---|
| 37 | | - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|---|
| 38 | | - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|---|
| 39 | | - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|---|
| 40 | | - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|---|
| 41 | | - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|---|
| 42 | | - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|---|
| 43 | | - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|---|
| 44 | | - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|---|
| 45 | | - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|---|
| 46 | | -*/ |
|---|
| 1 | +/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only) */ |
|---|
| 2 | +/* Copyright(c) 2014 - 2020 Intel Corporation */ |
|---|
| 47 | 3 | #ifndef _ICP_QAT_FW_H_ |
|---|
| 48 | 4 | #define _ICP_QAT_FW_H_ |
|---|
| 49 | 5 | #include <linux/types.h> |
|---|
| .. | .. |
|---|
| 89 | 45 | struct icp_qat_fw_comn_req_hdr_cd_pars { |
|---|
| 90 | 46 | union { |
|---|
| 91 | 47 | struct { |
|---|
| 92 | | - uint64_t content_desc_addr; |
|---|
| 93 | | - uint16_t content_desc_resrvd1; |
|---|
| 94 | | - uint8_t content_desc_params_sz; |
|---|
| 95 | | - uint8_t content_desc_hdr_resrvd2; |
|---|
| 96 | | - uint32_t content_desc_resrvd3; |
|---|
| 48 | + __u64 content_desc_addr; |
|---|
| 49 | + __u16 content_desc_resrvd1; |
|---|
| 50 | + __u8 content_desc_params_sz; |
|---|
| 51 | + __u8 content_desc_hdr_resrvd2; |
|---|
| 52 | + __u32 content_desc_resrvd3; |
|---|
| 97 | 53 | } s; |
|---|
| 98 | 54 | struct { |
|---|
| 99 | | - uint32_t serv_specif_fields[4]; |
|---|
| 55 | + __u32 serv_specif_fields[4]; |
|---|
| 100 | 56 | } s1; |
|---|
| 101 | 57 | } u; |
|---|
| 102 | 58 | }; |
|---|
| 103 | 59 | |
|---|
| 104 | 60 | struct icp_qat_fw_comn_req_mid { |
|---|
| 105 | | - uint64_t opaque_data; |
|---|
| 106 | | - uint64_t src_data_addr; |
|---|
| 107 | | - uint64_t dest_data_addr; |
|---|
| 108 | | - uint32_t src_length; |
|---|
| 109 | | - uint32_t dst_length; |
|---|
| 61 | + __u64 opaque_data; |
|---|
| 62 | + __u64 src_data_addr; |
|---|
| 63 | + __u64 dest_data_addr; |
|---|
| 64 | + __u32 src_length; |
|---|
| 65 | + __u32 dst_length; |
|---|
| 110 | 66 | }; |
|---|
| 111 | 67 | |
|---|
| 112 | 68 | struct icp_qat_fw_comn_req_cd_ctrl { |
|---|
| 113 | | - uint32_t content_desc_ctrl_lw[ICP_QAT_FW_NUM_LONGWORDS_5]; |
|---|
| 69 | + __u32 content_desc_ctrl_lw[ICP_QAT_FW_NUM_LONGWORDS_5]; |
|---|
| 114 | 70 | }; |
|---|
| 115 | 71 | |
|---|
| 116 | 72 | struct icp_qat_fw_comn_req_hdr { |
|---|
| 117 | | - uint8_t resrvd1; |
|---|
| 118 | | - uint8_t service_cmd_id; |
|---|
| 119 | | - uint8_t service_type; |
|---|
| 120 | | - uint8_t hdr_flags; |
|---|
| 121 | | - uint16_t serv_specif_flags; |
|---|
| 122 | | - uint16_t comn_req_flags; |
|---|
| 73 | + __u8 resrvd1; |
|---|
| 74 | + __u8 service_cmd_id; |
|---|
| 75 | + __u8 service_type; |
|---|
| 76 | + __u8 hdr_flags; |
|---|
| 77 | + __u16 serv_specif_flags; |
|---|
| 78 | + __u16 comn_req_flags; |
|---|
| 123 | 79 | }; |
|---|
| 124 | 80 | |
|---|
| 125 | 81 | struct icp_qat_fw_comn_req_rqpars { |
|---|
| 126 | | - uint32_t serv_specif_rqpars_lw[ICP_QAT_FW_NUM_LONGWORDS_13]; |
|---|
| 82 | + __u32 serv_specif_rqpars_lw[ICP_QAT_FW_NUM_LONGWORDS_13]; |
|---|
| 127 | 83 | }; |
|---|
| 128 | 84 | |
|---|
| 129 | 85 | struct icp_qat_fw_comn_req { |
|---|
| .. | .. |
|---|
| 135 | 91 | }; |
|---|
| 136 | 92 | |
|---|
| 137 | 93 | struct icp_qat_fw_comn_error { |
|---|
| 138 | | - uint8_t xlat_err_code; |
|---|
| 139 | | - uint8_t cmp_err_code; |
|---|
| 94 | + __u8 xlat_err_code; |
|---|
| 95 | + __u8 cmp_err_code; |
|---|
| 140 | 96 | }; |
|---|
| 141 | 97 | |
|---|
| 142 | 98 | struct icp_qat_fw_comn_resp_hdr { |
|---|
| 143 | | - uint8_t resrvd1; |
|---|
| 144 | | - uint8_t service_id; |
|---|
| 145 | | - uint8_t response_type; |
|---|
| 146 | | - uint8_t hdr_flags; |
|---|
| 99 | + __u8 resrvd1; |
|---|
| 100 | + __u8 service_id; |
|---|
| 101 | + __u8 response_type; |
|---|
| 102 | + __u8 hdr_flags; |
|---|
| 147 | 103 | struct icp_qat_fw_comn_error comn_error; |
|---|
| 148 | | - uint8_t comn_status; |
|---|
| 149 | | - uint8_t cmd_id; |
|---|
| 104 | + __u8 comn_status; |
|---|
| 105 | + __u8 cmd_id; |
|---|
| 150 | 106 | }; |
|---|
| 151 | 107 | |
|---|
| 152 | 108 | struct icp_qat_fw_comn_resp { |
|---|
| 153 | 109 | struct icp_qat_fw_comn_resp_hdr comn_hdr; |
|---|
| 154 | | - uint64_t opaque_data; |
|---|
| 155 | | - uint32_t resrvd[ICP_QAT_FW_NUM_LONGWORDS_4]; |
|---|
| 110 | + __u64 opaque_data; |
|---|
| 111 | + __u32 resrvd[ICP_QAT_FW_NUM_LONGWORDS_4]; |
|---|
| 156 | 112 | }; |
|---|
| 157 | 113 | |
|---|
| 158 | 114 | #define ICP_QAT_FW_COMN_REQ_FLAG_SET 1 |
|---|