Lines Matching refs:zip_ops
53 static int prepare_zip_command(struct zip_operation *zip_ops, in prepare_zip_command() argument
69 if (zip_ops->flush == ZIP_FLUSH_FINISH) { in prepare_zip_command()
74 zip_cmd->s.cc = zip_ops->ccode; in prepare_zip_command()
76 zip_cmd->s.ss = zip_ops->speed; in prepare_zip_command()
80 zip_cmd->s.adlercrc32 = zip_ops->csum; in prepare_zip_command()
81 zip_cmd->s.historylength = zip_ops->history_len; in prepare_zip_command()
85 zip_cmd->s.inp_ptr_addr.s.addr = __pa(zip_ops->input); in prepare_zip_command()
86 zip_cmd->s.inp_ptr_ctl.s.length = (zip_ops->input_len + in prepare_zip_command()
87 zip_ops->history_len); in prepare_zip_command()
91 zip_cmd->s.out_ptr_addr.s.addr = __pa(zip_ops->output); in prepare_zip_command()
92 zip_cmd->s.out_ptr_ctl.s.length = zip_ops->output_len; in prepare_zip_command()
94 zip_cmd->s.totaloutputlength = zip_ops->output_len; in prepare_zip_command()
115 int zip_deflate(struct zip_operation *zip_ops, struct zip_state *s, in zip_deflate() argument
123 prepare_zip_command(zip_ops, s, zip_cmd); in zip_deflate()
125 atomic64_add(zip_ops->input_len, &zip_dev->stats.comp_in_bytes); in zip_deflate()
138 zip_ops->compcode = result_ptr->s.compcode; in zip_deflate()
139 switch (zip_ops->compcode) { in zip_deflate()
155 zip_err("Zip instruction failed. Code:%d", zip_ops->compcode); in zip_deflate()
160 switch (zip_ops->format) { in zip_deflate()
162 zip_dbg("RAW Format: %d ", zip_ops->format); in zip_deflate()
164 zip_ops->csum = result_ptr->s.adler32; in zip_deflate()
168 zip_dbg("ZLIB Format: %d ", zip_ops->format); in zip_deflate()
169 zip_ops->csum = result_ptr->s.adler32; in zip_deflate()
173 zip_dbg("GZIP Format: %d ", zip_ops->format); in zip_deflate()
174 zip_ops->csum = result_ptr->s.crc32; in zip_deflate()
178 zip_dbg("LZS Format: %d ", zip_ops->format); in zip_deflate()
182 zip_err("Unknown Format:%d\n", zip_ops->format); in zip_deflate()
189 if (zip_ops->output_len < result_ptr->s.totalbyteswritten) { in zip_deflate()
192 zip_ops->output_len, result_ptr->s.totalbyteswritten); in zip_deflate()
193 zip_ops->output_len = 0; in zip_deflate()
196 zip_ops->output_len = result_ptr->s.totalbyteswritten; in zip_deflate()