/drivers/md/ |
D | dm-default-key.c | 46 unsigned int sector_size; member 107 &dkc->sector_size, &dummy) == 1) { in default_key_ctr_optional() 108 if (dkc->sector_size < SECTOR_SIZE || in default_key_ctr_optional() 109 dkc->sector_size > 4096 || in default_key_ctr_optional() 110 !is_power_of_2(dkc->sector_size)) { in default_key_ctr_optional() 125 if (dkc->sector_size != SECTOR_SIZE && !iv_large_sectors) { in default_key_ctr_optional() 219 dkc->sector_size = SECTOR_SIZE; in default_key_ctr() 225 dkc->sector_bits = ilog2(dkc->sector_size); in default_key_ctr() 226 if (ti->len & ((dkc->sector_size >> SECTOR_SHIFT) - 1)) { in default_key_ctr() 238 dun_bytes, dkc->sector_size); in default_key_ctr() [all …]
|
D | dm-crypt.c | 173 unsigned short int sector_size; member 425 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 583 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 755 *(__le64 *)buf = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_eboiv_gen() 957 *(__le64 *)es = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_elephant() 983 memcpy(data_offset, data2 + sg2->offset, cc->sector_size); in crypt_iv_elephant() 988 diffuser_disk_to_cpu((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 989 diffuser_b_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 990 diffuser_a_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 991 diffuser_cpu_to_disk((__le32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() [all …]
|
/drivers/scsi/ |
D | sd.c | 820 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard() 914 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd() 946 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd() 1001 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same() 1081 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size); in sd_setup_write_same_cmnd() 1097 cmd->transfersize = sdp->sector_size; in sd_setup_write_same_cmnd() 1110 rq->__data_len = sdp->sector_size; in sd_setup_write_same_cmnd() 1304 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd() 1310 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd() 1955 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes() [all …]
|
D | sr.c | 364 if (cd->device->sector_size == 2048) in sr_done() 426 s_size = cd->device->sector_size; in sr_init_command() 498 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 711 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe() 760 int sector_size; in get_sectorsize() local 780 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 795 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 796 switch (sector_size) { in get_sectorsize() 806 sector_size = 2048; in get_sectorsize() 815 "unsupported sector size %d.", sector_size); in get_sectorsize() [all …]
|
D | sd.h | 204 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 209 return blocks * sdev->sector_size; in logical_to_bytes() 214 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 219 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
D | sr_vendor.c | 156 cd->device->sector_size = blocklength; in sr_set_blocklength() 327 if (2048 != cd->device->sector_size) { in sr_cd_check()
|
/drivers/nvdimm/ |
D | blk.c | 69 u32 internal_lbasize, sector_size; in nd_blk_rw_integrity() local 73 sector_size = nsblk_sector_size(nsblk); in nd_blk_rw_integrity() 74 ns_offset = lba * internal_lbasize + sector_size; in nd_blk_rw_integrity() 122 u32 internal_lbasize, sector_size; in nsblk_do_bvec() local 128 sector_size = nsblk_sector_size(nsblk); in nsblk_do_bvec() 138 cur_len = bip ? min(len, sector_size) : len; in nsblk_do_bvec() 140 lba = div_u64(sector << SECTOR_SHIFT, sector_size); in nsblk_do_bvec() 159 sector += sector_size >> SECTOR_SHIFT; in nsblk_do_bvec()
|
D | btt.c | 514 unsigned long len = arena->sector_size; in arena_clear_freelist_error() 757 arena->sector_size = btt->sector_size; in alloc_arena() 1059 return btt->lbasize - btt->sector_size; in btt_meta_size() 1073 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena() 1152 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity() 1216 cur_len = min(btt->sector_size, len); in btt_read_pg() 1284 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg() 1331 cur_len = min(btt->sector_size, len); in btt_write_pg() 1414 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg() 1462 if (len > PAGE_SIZE || len < btt->sector_size || in btt_submit_bio() [all …]
|
D | badrange.c | 187 const unsigned int sector_size = 512; in __add_badblock_range() local 192 start_sector = div_u64(ns_offset, sector_size); in __add_badblock_range() 193 end_sector = div_u64_rem(ns_offset + len, sector_size, &rem); in __add_badblock_range()
|
D | btt.h | 178 u32 sector_size; member 227 u32 sector_size; member
|
/drivers/video/fbdev/ |
D | broadsheetfb.c | 593 int addr, const char *data, int sector_size) in broadsheet_spiflash_write_sector() argument 598 for (i = 0; i < sector_size; i += BS_SPIFLASH_PAGE_SIZE) { in broadsheet_spiflash_write_sector() 612 int sector_size, int data_start_addr, in broadsheet_spiflash_rewrite_sector() argument 620 sector_buffer = kzalloc(sector_size, GFP_KERNEL); in broadsheet_spiflash_rewrite_sector() 625 start_sector_addr = (data_start_addr / sector_size) * sector_size; in broadsheet_spiflash_rewrite_sector() 649 tail_start_addr = (data_start_addr + data_len) % sector_size; in broadsheet_spiflash_rewrite_sector() 654 tail_len = sector_size - tail_start_addr; in broadsheet_spiflash_rewrite_sector() 672 sector_buffer, sector_size); in broadsheet_spiflash_rewrite_sector() 681 int sector_size; in broadsheet_write_spiflash() local 690 sector_size = 32*1024; in broadsheet_write_spiflash() [all …]
|
/drivers/mtd/spi-nor/ |
D | core.h | 327 unsigned sector_size; member 402 .sector_size = (_sector_size), \ 417 .sector_size = (_sector_size), \ 423 .sector_size = (_sector_size), \ 436 .sector_size = (8*_page_size), \
|
D | xilinx.c | 75 nor->mtd.erasesize = nor->info->sector_size; in xilinx_nor_setup()
|
D | swp.c | 44 return nor->info->sector_size << in spi_nor_get_min_prot_length_sr() 47 return nor->info->sector_size; in spi_nor_get_min_prot_length_sr()
|
/drivers/nfc/s3fwrn5/ |
D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
D | firmware.c | 381 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup() 418 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download() 451 for (off = 0; off < image_size; off += fw_info->sector_size) { in s3fwrn5_fw_download()
|
/drivers/block/ |
D | swim_asm.S | 43 .equ sector_size, 512 define 193 movel #sector_size-1, %d4 /* sector size */ 236 movel #sector_size, %d0
|
D | xen-blkfront.c | 203 u16 sector_size; member 964 blk_queue_logical_block_size(rq, info->sector_size); in blkif_set_queue_limits() 1071 u16 vdisk_info, u16 sector_size, in xlvbd_alloc_gendisk() argument 1164 info->sector_size = sector_size; in xlvbd_alloc_gendisk() 2344 unsigned long sector_size; in blkfront_connect() local 2385 "sector-size", "%lu", §or_size, in blkfront_connect() 2401 sector_size); in blkfront_connect() 2413 err = xlvbd_alloc_gendisk(sectors, info, binfo, sector_size, in blkfront_connect()
|
/drivers/ata/ |
D | libata-scsi.c | 1036 sdev->sector_size = ATA_SECT_SIZE; in ata_scsi_dev_config() 1051 sdev->sector_size = ata_id_logical_sector_size(dev->id); in ata_scsi_dev_config() 1062 if (sdev->sector_size > PAGE_SIZE) in ata_scsi_dev_config() 1065 sdev->sector_size); in ata_scsi_dev_config() 1067 blk_queue_update_dma_alignment(q, sdev->sector_size - 1); in ata_scsi_dev_config() 1505 req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size; in ata_check_nblocks() 1605 qc->nbytes = n_block * scmd->device->sector_size; in ata_scsi_rw_xlat() 2375 u32 sector_size; /* physical sector size in bytes */ in ata_scsiop_read_cap() local 2379 sector_size = ata_id_logical_sector_size(dev->id); in ata_scsiop_read_cap() 2396 rbuf[4] = sector_size >> (8 * 3); in ata_scsiop_read_cap() [all …]
|
/drivers/target/ |
D | target_core_pscsi.c | 156 sdev->sector_size = get_unaligned_be24(&buf[9]); in pscsi_tape_read_blocksize() 158 if (!sdev->sector_size) in pscsi_tape_read_blocksize() 159 sdev->sector_size = 1024; in pscsi_tape_read_blocksize() 302 min_not_zero((int)sd->sector_size, 512); in pscsi_add_device_to_list() 329 dev->dev_attrib.hw_block_size = sd->sector_size; in pscsi_add_device_to_list() 674 sd->sector_size = blocksize; in pscsi_complete_cmd()
|
/drivers/mtd/devices/ |
D | st_spi_fsm.c | 300 unsigned sector_size; member 1428 for (offs = 0; offs < info->sector_size * info->n_sectors;) { in stfsm_s25fl_config() 1434 if ((offs < info->sector_size * 2) || in stfsm_s25fl_config() 1435 (offs >= (info->sector_size - info->n_sectors * 4))) in stfsm_s25fl_config() 2080 if (info->sector_size * info->n_sectors > 0x1000000) in stfsm_probe() 2104 fsm->mtd.size = info->sector_size * info->n_sectors; in stfsm_probe() 2105 fsm->mtd.erasesize = info->sector_size; in stfsm_probe()
|
/drivers/mtd/nand/raw/ |
D | cadence-nand-controller.c | 519 u32 sector_size; member 1211 u32 last_sec_size = cdns_chip->sector_size; in cadence_nand_prepare_data_size() 1221 sec_size = cdns_chip->sector_size; in cadence_nand_prepare_data_size() 1226 last_sec_size = cdns_chip->sector_size in cadence_nand_prepare_data_size() 1228 sec_size = cdns_chip->sector_size; in cadence_nand_prepare_data_size() 1558 (cdns_chip->sector_size + chip->ecc.bytes) in cadence_nand_write_page_raw() 1559 + cdns_chip->sector_size + oob_skip; in cadence_nand_write_page_raw() 1759 (cdns_chip->sector_size + chip->ecc.bytes) in cadence_nand_read_page_raw() 1760 + cdns_chip->sector_size + oob_skip; in cadence_nand_read_page_raw() 2636 cdns_chip->sector_size = chip->ecc.size; in cadence_nand_attach_chip() [all …]
|
/drivers/mtd/nand/raw/atmel/ |
D | pmecc.c | 643 int sector_size = get_sectorsize(user); in atmel_pmecc_err_location() local 644 int degree = sector_size == 512 ? 13 : 14; in atmel_pmecc_err_location() 661 if (sector_size == 1024) in atmel_pmecc_err_location() 665 writel((sector_size * 8) + (degree * strength), in atmel_pmecc_err_location()
|
/drivers/scsi/isci/ |
D | request.c | 277 switch (sdp->sector_size) { in scu_bg_blk_size() 289 static u32 scu_dif_bytes(u32 len, u32 sector_size) in scu_dif_bytes() argument 291 return (len >> ilog2(sector_size)) * 8; in scu_dif_bytes() 307 scmd->device->sector_size); in scu_ssp_ireq_dif_insert() 318 tc->UD_bytes_immed_val = scmd->device->sector_size; in scu_ssp_ireq_dif_insert() 326 tc->bgc_blk_sz = scmd->device->sector_size; in scu_ssp_ireq_dif_insert() 362 scmd->device->sector_size); in scu_ssp_ireq_dif_strip() 377 tc->UD_bytes_immed_val = scmd->device->sector_size; in scu_ssp_ireq_dif_strip() 385 tc->bgc_blk_sz = scmd->device->sector_size; in scu_ssp_ireq_dif_strip()
|
/drivers/s390/scsi/ |
D | zfcp_fc.h | 248 datalen += datalen / scsi->device->sector_size * 8; in zfcp_fc_scsi_to_fcp()
|