Lines Matching refs:sector_size
174 unsigned short int sector_size; member
426 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr()
584 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr()
756 *(__le64 *)buf = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_eboiv_gen()
958 *(__le64 *)es = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_elephant()
984 memcpy(data_offset, data2 + sg2->offset, cc->sector_size); in crypt_iv_elephant()
989 diffuser_disk_to_cpu((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
990 diffuser_b_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
991 diffuser_a_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
992 diffuser_cpu_to_disk((__le32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
995 for (i = 0; i < (cc->sector_size / 32); i++) in crypt_iv_elephant()
999 diffuser_disk_to_cpu((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
1000 diffuser_a_encrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
1001 diffuser_b_encrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
1002 diffuser_cpu_to_disk((__le32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant()
1181 if (1 << bi->interval_exp != cc->sector_size) { in crypt_integrity_ctr()
1300 if (unlikely(bv_in.bv_len & (cc->sector_size - 1))) in crypt_convert_block_aead()
1327 sg_set_page(&dmreq->sg_in[2], bv_in.bv_page, cc->sector_size, bv_in.bv_offset); in crypt_convert_block_aead()
1333 sg_set_page(&dmreq->sg_out[2], bv_out.bv_page, cc->sector_size, bv_out.bv_offset); in crypt_convert_block_aead()
1355 cc->sector_size, iv); in crypt_convert_block_aead()
1362 cc->sector_size + cc->integrity_tag_size, iv); in crypt_convert_block_aead()
1379 bio_advance_iter(ctx->bio_in, &ctx->iter_in, cc->sector_size); in crypt_convert_block_aead()
1380 bio_advance_iter(ctx->bio_out, &ctx->iter_out, cc->sector_size); in crypt_convert_block_aead()
1399 if (unlikely(bv_in.bv_len & (cc->sector_size - 1))) in crypt_convert_block_skcipher()
1422 sg_set_page(sg_in, bv_in.bv_page, cc->sector_size, bv_in.bv_offset); in crypt_convert_block_skcipher()
1425 sg_set_page(sg_out, bv_out.bv_page, cc->sector_size, bv_out.bv_offset); in crypt_convert_block_skcipher()
1446 skcipher_request_set_crypt(req, sg_in, sg_out, cc->sector_size, iv); in crypt_convert_block_skcipher()
1456 bio_advance_iter(ctx->bio_in, &ctx->iter_in, cc->sector_size); in crypt_convert_block_skcipher()
1457 bio_advance_iter(ctx->bio_out, &ctx->iter_out, cc->sector_size); in crypt_convert_block_skcipher()
1553 unsigned int sector_step = cc->sector_size >> SECTOR_SHIFT; in crypt_convert()
3131 } else if (sscanf(opt_string, "sector_size:%hu%c", &cc->sector_size, &dummy) == 1) { in crypt_ctr_optional()
3132 if (cc->sector_size < (1 << SECTOR_SHIFT) || in crypt_ctr_optional()
3133 cc->sector_size > 4096 || in crypt_ctr_optional()
3134 (cc->sector_size & (cc->sector_size - 1))) { in crypt_ctr_optional()
3138 if (ti->len & ((cc->sector_size >> SECTOR_SHIFT) - 1)) { in crypt_ctr_optional()
3142 cc->sector_shift = __ffs(cc->sector_size) - SECTOR_SHIFT; in crypt_ctr_optional()
3200 cc->sector_size = (1 << SECTOR_SHIFT); in crypt_ctr()
3282 (tmpll & ((cc->sector_size >> SECTOR_SHIFT) - 1))) { in crypt_ctr()
3416 if (unlikely((bio->bi_iter.bi_sector & ((cc->sector_size >> SECTOR_SHIFT) - 1)) != 0)) in crypt_map()
3419 if (unlikely(bio->bi_iter.bi_size & (cc->sector_size - 1))) in crypt_map()
3484 num_feature_args += cc->sector_size != (1 << SECTOR_SHIFT); in crypt_status()
3502 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status()
3503 DMEMIT(" sector_size:%d", cc->sector_size); in crypt_status()
3525 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status()
3526 DMEMIT(",sector_size=%d", cc->sector_size); in crypt_status()
3631 max_t(unsigned, limits->logical_block_size, cc->sector_size); in crypt_io_hints()
3633 max_t(unsigned, limits->physical_block_size, cc->sector_size); in crypt_io_hints()
3634 limits->io_min = max_t(unsigned, limits->io_min, cc->sector_size); in crypt_io_hints()