Lines Matching +full:software +full:- +full:initiated

2  * Copyright (c) 2003-2017 Cavium, Inc.
9 * published by the Free Software Foundation. When using or redistributing
25 * used to endorse or promote products derived from this software without
28 * This Software, including technical data, may be subject to U.S. export
33 * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS"
36 * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY
42 * ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE LIES
55 union zip_zres_s *result_ptr = &s->result; in prepare_inflate_zcmd()
57 memset(zip_cmd, 0, sizeof(s->zip_cmd)); in prepare_inflate_zcmd()
58 memset(result_ptr, 0, sizeof(s->result)); in prepare_inflate_zcmd()
62 /* Decompression History Gather list - no gather list */ in prepare_inflate_zcmd()
63 zip_cmd->s.hg = 0; in prepare_inflate_zcmd()
65 zip_cmd->s.ce = 0; in prepare_inflate_zcmd()
67 zip_cmd->s.ss = 0; in prepare_inflate_zcmd()
69 zip_cmd->s.sf = 1; in prepare_inflate_zcmd()
72 if (zip_ops->begin_file == 0) in prepare_inflate_zcmd()
73 zip_cmd->s.bf = 0; in prepare_inflate_zcmd()
75 zip_cmd->s.bf = 1; in prepare_inflate_zcmd()
77 zip_cmd->s.ef = 1; in prepare_inflate_zcmd()
79 zip_cmd->s.cc = zip_ops->ccode; in prepare_inflate_zcmd()
84 zip_cmd->s.adlercrc32 = zip_ops->csum; in prepare_inflate_zcmd()
90 zip_cmd->s.historylength = 0; in prepare_inflate_zcmd()
91 zip_cmd->s.ds = 0; in prepare_inflate_zcmd()
93 /* IWORD # 8 and 9 - Output pointer */ in prepare_inflate_zcmd()
94 zip_cmd->s.out_ptr_addr.s.addr = __pa(zip_ops->output); in prepare_inflate_zcmd()
95 zip_cmd->s.out_ptr_ctl.s.length = zip_ops->output_len; in prepare_inflate_zcmd()
97 /* Maximum number of output-stream bytes that can be written */ in prepare_inflate_zcmd()
98 zip_cmd->s.totaloutputlength = zip_ops->output_len; in prepare_inflate_zcmd()
102 /* IWORD # 6 and 7 - input pointer */ in prepare_inflate_zcmd()
103 zip_cmd->s.dg = 0; in prepare_inflate_zcmd()
104 zip_cmd->s.inp_ptr_addr.s.addr = __pa((u8 *)zip_ops->input); in prepare_inflate_zcmd()
105 zip_cmd->s.inp_ptr_ctl.s.length = zip_ops->input_len; in prepare_inflate_zcmd()
107 /* IWORD # 10 and 11 - Result pointer */ in prepare_inflate_zcmd()
108 zip_cmd->s.res_ptr_addr.s.addr = __pa(result_ptr); in prepare_inflate_zcmd()
111 result_ptr->s.compcode = 0; in prepare_inflate_zcmd()
118 * zip_inflate - API to offload inflate operation to hardware
131 union zip_inst_s *zip_cmd = &s->zip_cmd; in zip_inflate()
132 union zip_zres_s *result_ptr = &s->result; in zip_inflate()
138 atomic64_add(zip_ops->input_len, &zip_dev->stats.decomp_in_bytes); in zip_inflate()
144 atomic64_inc(&zip_dev->stats.decomp_req_submit); in zip_inflate()
150 atomic64_inc(&zip_dev->stats.decomp_req_complete); in zip_inflate()
152 zip_ops->compcode = result_ptr->s.compcode; in zip_inflate()
153 switch (zip_ops->compcode) { in zip_inflate()
163 zip_dbg(" Dynamic stop Initiated\n"); in zip_inflate()
167 zip_dbg("Instruction failed. Code = %d\n", zip_ops->compcode); in zip_inflate()
168 atomic64_inc(&zip_dev->stats.decomp_bad_reqs); in zip_inflate()
175 if ((zip_ops->ccode == 3) && (zip_ops->flush == 4) && in zip_inflate()
176 (zip_ops->compcode != ZIP_CMD_DYNAMIC_STOP)) in zip_inflate()
177 result_ptr->s.ef = 1; in zip_inflate()
179 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
181 atomic64_add(result_ptr->s.totalbyteswritten, in zip_inflate()
182 &zip_dev->stats.decomp_out_bytes); in zip_inflate()
184 if (zip_ops->output_len < result_ptr->s.totalbyteswritten) { in zip_inflate()
186 zip_ops->output_len, result_ptr->s.totalbyteswritten); in zip_inflate()
187 zip_ops->output_len = 0; in zip_inflate()
189 zip_ops->output_len = result_ptr->s.totalbyteswritten; in zip_inflate()
192 zip_ops->bytes_read = result_ptr->s.totalbytesread; in zip_inflate()
193 zip_ops->bits_processed = result_ptr->s.totalbitsprocessed; in zip_inflate()
194 zip_ops->end_file = result_ptr->s.ef; in zip_inflate()
195 if (zip_ops->end_file) { in zip_inflate()
196 switch (zip_ops->format) { in zip_inflate()
198 zip_dbg("RAW Format: %d ", zip_ops->format); in zip_inflate()
200 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
204 zip_dbg("ZLIB Format: %d ", zip_ops->format); in zip_inflate()
205 zip_ops->csum = result_ptr->s.adler32; in zip_inflate()
209 zip_dbg("GZIP Format: %d ", zip_ops->format); in zip_inflate()
210 zip_ops->csum = result_ptr->s.crc32; in zip_inflate()
214 zip_dbg("LZS Format: %d ", zip_ops->format); in zip_inflate()
218 zip_err("Format error:%d\n", zip_ops->format); in zip_inflate()