Home
last modified time | relevance | path

Searched refs:block_size (Results 1 – 25 of 136) sorted by relevance

123456

/drivers/s390/char/
Dtape_char.c97 tapechar_check_idalbuffer(struct tape_device *device, size_t block_size) in tapechar_check_idalbuffer() argument
102 device->char_data.idal_buf->size == block_size) in tapechar_check_idalbuffer()
105 if (block_size > MAX_BLOCKSIZE) { in tapechar_check_idalbuffer()
107 block_size, MAX_BLOCKSIZE); in tapechar_check_idalbuffer()
112 new = idal_buffer_alloc(block_size, 0); in tapechar_check_idalbuffer()
132 size_t block_size; in tapechar_read() local
148 if (device->char_data.block_size != 0) { in tapechar_read()
149 if (count < device->char_data.block_size) { in tapechar_read()
154 block_size = device->char_data.block_size; in tapechar_read()
156 block_size = count; in tapechar_read()
[all …]
/drivers/staging/comedi/
Dcomedi_buf.c302 int block_size = num_bytes - count; in comedi_buf_munge() local
306 if (block_size > buf_end) in comedi_buf_munge()
307 block_size = buf_end; in comedi_buf_munge()
311 block_size, async->munge_chan); in comedi_buf_munge()
319 async->munge_chan += block_size / num_sample_bytes; in comedi_buf_munge()
321 async->munge_count += block_size; in comedi_buf_munge()
322 async->munge_ptr += block_size; in comedi_buf_munge()
324 count += block_size; in comedi_buf_munge()
469 unsigned int block_size; in comedi_buf_memcpy_to() local
472 block_size = async->prealloc_bufsz - write_ptr; in comedi_buf_memcpy_to()
[all …]
/drivers/net/wireless/rsi/
Drsi_91x_usb_ops.c41 u32 block_size = dev->tx_blk_size; in rsi_copy_to_card() local
47 for (indx = 0, ii = 0; ii < num_blocks; ii++, indx += block_size) { in rsi_copy_to_card()
52 block_size)) { in rsi_copy_to_card()
59 base_address += block_size; in rsi_copy_to_card()
62 if (len % block_size) { in rsi_copy_to_card()
67 len % block_size)) { in rsi_copy_to_card()
137 u32 block_size = dev->tx_blk_size; in rsi_load_ta_instructions() local
155 num_blocks = (len / block_size); in rsi_load_ta_instructions()
Drsi_91x_sdio_ops.c84 u32 block_size = dev->tx_blk_size; in rsi_copy_to_card() local
96 for (indx = 0, ii = 0; ii < num_blocks; ii++, indx += block_size) { in rsi_copy_to_card()
101 block_size)) { in rsi_copy_to_card()
108 base_address += block_size; in rsi_copy_to_card()
121 if (len % block_size) { in rsi_copy_to_card()
126 len % block_size)) { in rsi_copy_to_card()
177 u32 block_size = dev->tx_blk_size; in rsi_load_ta_instructions() local
210 num_blocks = (len / block_size); in rsi_load_ta_instructions()
/drivers/crypto/ccp/
Dccp-crypto-sha.c63 unsigned int block_size = in ccp_do_sha_update() local
72 if (!final && (len <= block_size)) { in ccp_do_sha_update()
84 rctx->hash_rem = final ? 0 : len & (block_size - 1); in ccp_do_sha_update()
88 rctx->hash_cnt -= block_size; in ccp_do_sha_update()
89 rctx->hash_rem = block_size; in ccp_do_sha_update()
153 unsigned int block_size = in ccp_sha_init() local
163 memcpy(rctx->buf, ctx->u.sha.ipad, block_size); in ccp_sha_init()
164 rctx->buf_count = block_size; in ccp_sha_init()
244 unsigned int block_size = crypto_shash_blocksize(shash); in ccp_sha_setkey() local
256 if (key_len > block_size) { in ccp_sha_setkey()
[all …]
Dccp-crypto-aes-cmac.c64 unsigned int block_size = in ccp_do_cmac_update() local
79 if (!final && (len <= block_size)) { in ccp_do_cmac_update()
91 rctx->hash_rem = final ? 0 : len & (block_size - 1); in ccp_do_cmac_update()
95 rctx->hash_cnt -= block_size; in ccp_do_cmac_update()
96 rctx->hash_rem = block_size; in ccp_do_cmac_update()
99 if (final && (rctx->null_msg || (len & (block_size - 1)))) in ccp_do_cmac_update()
126 int pad_length = block_size - (len & (block_size - 1)); in ccp_do_cmac_update()
/drivers/gpu/drm/vmwgfx/
Dsvga3d_surfacedefs.h208 surf_size_struct block_size; member
754 surf_size_struct *block_size) in svga3dsurface_get_size_in_blocks() argument
756 block_size->width = DIV_ROUND_UP(pixel_size->width, in svga3dsurface_get_size_in_blocks()
757 desc->block_size.width); in svga3dsurface_get_size_in_blocks()
758 block_size->height = DIV_ROUND_UP(pixel_size->height, in svga3dsurface_get_size_in_blocks()
759 desc->block_size.height); in svga3dsurface_get_size_in_blocks()
760 block_size->depth = DIV_ROUND_UP(pixel_size->depth, in svga3dsurface_get_size_in_blocks()
761 desc->block_size.depth); in svga3dsurface_get_size_in_blocks()
870 const u32 bw = desc->block_size.width, bh = desc->block_size.height; in svga3dsurface_get_pixel_offset()
871 const u32 bd = desc->block_size.depth; in svga3dsurface_get_pixel_offset()
/drivers/target/
Dtarget_core_file.c271 prot_size = (cmd->data_length / se_dev->dev_attrib.block_size) * in fd_do_prot_rw()
327 loff_t pos = (cmd->t_task_lba * se_dev->dev_attrib.block_size); in fd_do_rw()
408 start = cmd->t_task_lba * dev->dev_attrib.block_size; in fd_execute_sync_cache()
435 unsigned int block_size = se_dev->dev_attrib.block_size; in fd_setup_write_same_buf() local
459 memcpy(p, kmap_buf, block_size); in fd_setup_write_same_buf()
461 i += block_size; in fd_setup_write_same_buf()
462 p += block_size; in fd_setup_write_same_buf()
479 loff_t pos = cmd->t_task_lba * se_dev->dev_attrib.block_size; in fd_execute_write_same()
491 sg->length != cmd->se_dev->dev_attrib.block_size) { in fd_execute_write_same()
494 cmd->se_dev->dev_attrib.block_size); in fd_execute_write_same()
[all …]
Dtarget_core_sbc.c73 buf[4] = (dev->dev_attrib.block_size >> 24) & 0xff; in sbc_emulate_readcapacity()
74 buf[5] = (dev->dev_attrib.block_size >> 16) & 0xff; in sbc_emulate_readcapacity()
75 buf[6] = (dev->dev_attrib.block_size >> 8) & 0xff; in sbc_emulate_readcapacity()
76 buf[7] = dev->dev_attrib.block_size & 0xff; in sbc_emulate_readcapacity()
106 buf[8] = (dev->dev_attrib.block_size >> 24) & 0xff; in sbc_emulate_readcapacity_16()
107 buf[9] = (dev->dev_attrib.block_size >> 16) & 0xff; in sbc_emulate_readcapacity_16()
108 buf[10] = (dev->dev_attrib.block_size >> 8) & 0xff; in sbc_emulate_readcapacity_16()
109 buf[11] = dev->dev_attrib.block_size & 0xff; in sbc_emulate_readcapacity_16()
176 return cmd->se_dev->dev_attrib.block_size * sectors; in sbc_get_size()
402 unsigned int block_size = dev->dev_attrib.block_size; in compare_and_write_callback() local
[all …]
Dtarget_core_iblock.c219 u32 block_size = bdev_logical_block_size(bd); in iblock_emulate_read_cap_with_block_size() local
221 if (block_size == dev->dev_attrib.block_size) in iblock_emulate_read_cap_with_block_size()
224 switch (block_size) { in iblock_emulate_read_cap_with_block_size()
226 switch (dev->dev_attrib.block_size) { in iblock_emulate_read_cap_with_block_size()
240 switch (dev->dev_attrib.block_size) { in iblock_emulate_read_cap_with_block_size()
255 switch (dev->dev_attrib.block_size) { in iblock_emulate_read_cap_with_block_size()
270 switch (dev->dev_attrib.block_size) { in iblock_emulate_read_cap_with_block_size()
469 sg->length != cmd->se_dev->dev_attrib.block_size) { in iblock_execute_write_same()
472 cmd->se_dev->dev_attrib.block_size); in iblock_execute_write_same()
645 bip->bip_iter.bi_size = (cmd->data_length / dev->dev_attrib.block_size) * in iblock_alloc_bip()
[all …]
Dtarget_core_spc.c534 put_unaligned_be16(min / dev->dev_attrib.block_size, &buf[6]); in spc_emulate_evpd_b0()
547 put_unaligned_be32(opt / dev->dev_attrib.block_size, &buf[12]); in spc_emulate_evpd_b0()
958 static int spc_modesense_blockdesc(unsigned char *buf, u64 blocks, u32 block_size) in spc_modesense_blockdesc() argument
963 put_unaligned_be32(block_size, buf); in spc_modesense_blockdesc()
967 static int spc_modesense_long_blockdesc(unsigned char *buf, u64 blocks, u32 block_size) in spc_modesense_long_blockdesc() argument
970 return spc_modesense_blockdesc(buf + 3, blocks, block_size) + 3; in spc_modesense_long_blockdesc()
977 put_unaligned_be32(block_size, buf); in spc_modesense_long_blockdesc()
1026 u32 block_size = dev->dev_attrib.block_size; in spc_emulate_modesense() local
1031 blocks, block_size); in spc_emulate_modesense()
1035 blocks, block_size); in spc_emulate_modesense()
[all …]
/drivers/mtd/
Drfd_ftl.c25 static int block_size = 0; variable
26 module_param(block_size, int, 0);
27 MODULE_PARM_DESC(block_size, "Block size to use by RFD, defaults to erase unit size");
73 u_int block_size; /* size of erase unit */ member
97 block->offset = part->block_size * block_no; in build_block_map()
157 sectors_per_block = part->block_size / SECTOR_SIZE; in scan_header()
158 part->total_blocks = (u32)part->mbd.mtd->size / part->block_size; in scan_header()
203 rc = mtd_read(part->mbd.mtd, i * part->block_size, in scan_header()
278 i = (u32)erase->addr / part->block_size; in erase_callback()
338 erase->len = part->block_size; in erase_block()
[all …]
Dsm_ftl.c200 WARN_ON(boffset >= ftl->block_size); in sm_mkoffset()
205 return (zone * SM_MAX_ZONE_SIZE + block) * ftl->block_size + boffset; in sm_mkoffset()
212 *boffset = do_div(offset, ftl->block_size); in sm_break_offset()
380 for (boffset = 0; boffset < ftl->block_size; in sm_write_block()
447 for (boffset = 0; boffset < ftl->block_size; boffset += SM_SECTOR_SIZE) in sm_mark_block_bad()
465 erase.len = ftl->block_size; in sm_erase_block()
522 for (boffset = 0; boffset < ftl->block_size; in sm_check_block()
587 ftl->block_size = 8 * SM_SECTOR_SIZE; in sm_get_media_info()
596 ftl->block_size = 8 * SM_SECTOR_SIZE; in sm_get_media_info()
606 ftl->block_size = 16 * SM_SECTOR_SIZE; in sm_get_media_info()
[all …]
/drivers/md/
Ddm-bufio.c87 unsigned block_size; member
368 if (c->block_size <= DM_BUFIO_BLOCK_SIZE_SLAB_LIMIT) { in alloc_buffer_data()
373 if (c->block_size <= DM_BUFIO_BLOCK_SIZE_GFP_LIMIT && in alloc_buffer_data()
396 ptr = __vmalloc(c->block_size, gfp_mask | __GFP_HIGHMEM, PAGE_KERNEL); in alloc_buffer_data()
449 adjust_total_allocated(b->data_mode, (long)c->block_size); in alloc_buffer()
461 adjust_total_allocated(b->data_mode, -(long)c->block_size); in free_buffer()
558 .count = b->c->block_size >> SECTOR_SHIFT, in use_dmio()
612 len = b->c->block_size; in use_inline_bio()
623 BUG_ON(b->c->block_size <= PAGE_SIZE); in use_inline_bio()
641 if (b->c->block_size <= DM_BUFIO_INLINE_VECS * PAGE_SIZE && in submit_io()
[all …]
/drivers/gpu/drm/nouveau/core/core/
Dmm.c132 s = roundup(s, mm->block_size); in nouveau_mm_head()
136 e = rounddown(e, mm->block_size); in nouveau_mm_head()
204 s = roundup(s, mm->block_size); in nouveau_mm_tail()
208 e = rounddown(e, mm->block_size); in nouveau_mm_tail()
255 BUG_ON(block != mm->block_size); in nouveau_mm_init()
259 mm->block_size = block; in nouveau_mm_init()
268 node->offset = roundup(offset, mm->block_size); in nouveau_mm_init()
269 node->length = rounddown(offset + length, mm->block_size); in nouveau_mm_init()
/drivers/scsi/
Dst.c627 if (STp->block_size == 0) in write_behind_check()
630 STps->drv_block += STbuffer->writing / STp->block_size; in write_behind_check()
718 blks = transfer / STp->block_size; in st_flush_write_buffer()
785 if (STp->block_size == 0) in flush_buffer()
789 (STp->buffer)->read_pointer) / STp->block_size - in flush_buffer()
790 ((STp->buffer)->read_pointer + STp->block_size - 1) / in flush_buffer()
791 STp->block_size; in flush_buffer()
834 STm->default_blksize != STp->block_size) { in set_mode_densblk()
838 arg |= STp->block_size; in set_mode_densblk()
1035 STp->block_size = 0; in check_tape()
[all …]
/drivers/gpu/drm/gma500/
Dintel_bios.c152 u16 *block_ptr, block_size; in get_blocksize() local
155 block_size = *block_ptr; in get_blocksize()
156 return block_size; in get_blocksize()
343 u16 block_size; in parse_sdvo_device_mapping() local
361 block_size = get_blocksize(p_defs); in parse_sdvo_device_mapping()
363 child_device_num = (block_size - sizeof(*p_defs)) / in parse_sdvo_device_mapping()
453 u16 block_size; in parse_device_mapping() local
471 block_size = get_blocksize(p_defs); in parse_device_mapping()
473 child_device_num = (block_size - sizeof(*p_defs)) / in parse_device_mapping()
/drivers/gpu/drm/i915/
Dintel_bios.c78 u16 *block_ptr, block_size; in get_blocksize() local
81 block_size = *block_ptr; in get_blocksize()
82 return block_size; in get_blocksize()
441 u16 block_size = get_blocksize(general); in parse_general_definitions() local
442 if (block_size >= sizeof(*general)) { in parse_general_definitions()
449 block_size); in parse_general_definitions()
462 u16 block_size; in parse_sdvo_device_mapping() local
480 block_size = get_blocksize(p_defs); in parse_sdvo_device_mapping()
482 child_device_num = (block_size - sizeof(*p_defs)) / in parse_sdvo_device_mapping()
747 u16 block_size; in parse_mipi() local
[all …]
/drivers/md/persistent-data/
Ddm-btree-spine.c20 size_t block_size);
24 size_t block_size) in node_prepare_for_write() argument
31 block_size - sizeof(__le32), in node_prepare_for_write()
39 size_t block_size) in node_check() argument
54 block_size - sizeof(__le32), in node_check()
65 (sizeof(__le64) + value_size) * le32_to_cpu(h->max_entries) > block_size) { in node_check()
Ddm-block-manager.h35 struct block_device *bdev, unsigned block_size,
52 void (*prepare_for_write)(struct dm_block_validator *v, struct dm_block *b, size_t block_size);
57 int (*check)(struct dm_block_validator *v, struct dm_block *b, size_t block_size);
Ddm-space-map-common.c24 size_t block_size) in index_prepare_for_write() argument
30 block_size - sizeof(__le32), in index_prepare_for_write()
36 size_t block_size) in index_check() argument
48 block_size - sizeof(__le32), in index_check()
74 size_t block_size) in bitmap_prepare_for_write() argument
80 block_size - sizeof(__le32), in bitmap_prepare_for_write()
86 size_t block_size) in bitmap_check() argument
98 block_size - sizeof(__le32), in bitmap_check()
215 ll->block_size = dm_bm_block_size(dm_tm_get_bm(tm)); in sm_ll_init()
217 if (ll->block_size > (1 << 30)) { in sm_ll_init()
[all …]
/drivers/net/wireless/cw1200/
Dfwio.c179 size_t block_size; in cw1200_load_firmware_cw1200() local
205 tx_size = block_size = min_t(size_t, firmware->size - put, in cw1200_load_firmware_cw1200()
208 memcpy(buf, &firmware->data[put], block_size); in cw1200_load_firmware_cw1200()
209 if (block_size < DOWNLOAD_BLOCK_SIZE) { in cw1200_load_firmware_cw1200()
210 memset(&buf[block_size], 0, in cw1200_load_firmware_cw1200()
211 DOWNLOAD_BLOCK_SIZE - block_size); in cw1200_load_firmware_cw1200()
227 put += block_size; in cw1200_load_firmware_cw1200()
/drivers/scsi/esas2r/
Desas2r_targdb.c146 || dc->block_size == 0) { in esas2r_targ_db_add_raid()
156 t->block_size = dc->block_size; in esas2r_targ_db_add_raid()
158 t->inter_block = dc->interleave / dc->block_size; in esas2r_targ_db_add_raid()
205 t->block_size = 0; in esas2r_targ_db_add_pthru()
/drivers/misc/c2port/
Dcore.c332 return sprintf(buf, "%d\n", ops->block_size); in c2port_show_flash_block_size()
342 return sprintf(buf, "%d\n", ops->blocks_num * ops->block_size); in c2port_show_flash_size()
638 if (offset >= ops->block_size * ops->blocks_num) in __c2port_read_flash_data()
641 if (ops->block_size * ops->blocks_num - offset < nread) in __c2port_read_flash_data()
642 nread = ops->block_size * ops->blocks_num - offset; in __c2port_read_flash_data()
752 if (ops->block_size * ops->blocks_num - offset < nwrite) in __c2port_write_flash_data()
753 nwrite = ops->block_size * ops->blocks_num - offset; in __c2port_write_flash_data()
756 if (offset >= ops->block_size * ops->blocks_num) in __c2port_write_flash_data()
925 bin_attr_flash_data.size = ops->blocks_num * ops->block_size; in c2port_device_register()
946 name, ops->blocks_num, ops->block_size, in c2port_device_register()
[all …]
/drivers/dma/
Dcoh901318_lli.c199 size_t block_size = MAX_DMA_PACKET_SIZE; in coh901318_lli_fill_single() local
209 block_size = MAX_DMA_PACKET_SIZE/2; in coh901318_lli_fill_single()
211 s -= block_size; in coh901318_lli_fill_single()
218 src += block_size; in coh901318_lli_fill_single()
220 dst += block_size; in coh901318_lli_fill_single()

123456