Home
last modified time | relevance | path

Searched refs:sector_size (Results 1 – 25 of 42) sorted by relevance

12

/drivers/scsi/
Dsd.c709 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard()
764 u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_unmap_cmnd()
765 u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_unmap_cmnd()
799 u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_write_same16_cmnd()
800 u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_write_same16_cmnd()
801 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd()
830 u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_write_same10_cmnd()
831 u32 nr_sectors = blk_rq_sectors(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_write_same10_cmnd()
832 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd()
862 u64 sector = blk_rq_pos(rq) >> (ilog2(sdp->sector_size) - 9); in sd_setup_write_zeroes_cmnd()
[all …]
Dsr.c354 if (cd->device->sector_size == 2048) in sr_done()
426 s_size = cd->device->sector_size; in sr_init_command()
510 SCpnt->transfersize = cd->device->sector_size; in sr_init_command()
675 if (cd->device->sector_size > 2048) in sr_release()
739 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe()
784 int sector_size; in get_sectorsize() local
804 sector_size = 2048; /* A guess, just in case */ in get_sectorsize()
820 sector_size = (buffer[4] << 24) | in get_sectorsize()
822 switch (sector_size) { in get_sectorsize()
832 sector_size = 2048; in get_sectorsize()
[all …]
Dsd.h175 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors()
180 return blocks * sdev->sector_size; in logical_to_bytes()
185 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical()
190 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
Dsr_vendor.c144 cd->device->sector_size = blocklength; in sr_set_blocklength()
317 if (2048 != cd->device->sector_size) { in sr_cd_check()
/drivers/nvdimm/
Dblk.c77 u32 internal_lbasize, sector_size; in nd_blk_rw_integrity() local
81 sector_size = nsblk_sector_size(nsblk); in nd_blk_rw_integrity()
82 ns_offset = lba * internal_lbasize + sector_size; in nd_blk_rw_integrity()
130 u32 internal_lbasize, sector_size; in nsblk_do_bvec() local
136 sector_size = nsblk_sector_size(nsblk); in nsblk_do_bvec()
146 cur_len = bip ? min(len, sector_size) : len; in nsblk_do_bvec()
148 lba = div_u64(sector << SECTOR_SHIFT, sector_size); in nsblk_do_bvec()
167 sector += sector_size >> SECTOR_SHIFT; in nsblk_do_bvec()
Dbtt.c520 unsigned long len = arena->sector_size; in arena_clear_freelist_error()
754 arena->sector_size = btt->sector_size; in alloc_arena()
1056 return btt->lbasize - btt->sector_size; in btt_meta_size()
1070 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena()
1149 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity()
1213 cur_len = min(btt->sector_size, len); in btt_read_pg()
1281 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg()
1328 cur_len = min(btt->sector_size, len); in btt_write_pg()
1411 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg()
1457 if (len > PAGE_SIZE || len < btt->sector_size || in btt_make_request()
[all …]
Dbtt.h184 u32 sector_size; member
232 u32 sector_size; member
Dcore.c423 const unsigned int sector_size = 512; in __add_badblock_range() local
428 start_sector = div_u64(ns_offset, sector_size); in __add_badblock_range()
429 end_sector = div_u64_rem(ns_offset + len, sector_size, &rem); in __add_badblock_range()
/drivers/video/fbdev/
Dbroadsheetfb.c593 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(sizeof(char)*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/md/
Ddm-crypt.c177 unsigned short int sector_size; member
557 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr()
715 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr()
973 if (1 << bi->interval_exp != cc->sector_size) { in crypt_integrity_ctr()
1092 if (unlikely(bv_in.bv_len & (cc->sector_size - 1))) in crypt_convert_block_aead()
1119 sg_set_page(&dmreq->sg_in[2], bv_in.bv_page, cc->sector_size, bv_in.bv_offset); in crypt_convert_block_aead()
1125 sg_set_page(&dmreq->sg_out[2], bv_out.bv_page, cc->sector_size, bv_out.bv_offset); in crypt_convert_block_aead()
1147 cc->sector_size, iv); in crypt_convert_block_aead()
1154 cc->sector_size + cc->integrity_tag_size, iv); in crypt_convert_block_aead()
1165 bio_advance_iter(ctx->bio_in, &ctx->iter_in, cc->sector_size); in crypt_convert_block_aead()
[all …]
/drivers/char/
Dtile-srom.c66 u32 sector_size; /* Size of a sector */ member
293 return sprintf(buf, "%u\n", srom->sector_size); in sector_size_show()
295 static DEVICE_ATTR_RO(sector_size);
345 if (_srom_read(devhdl, &srom->sector_size, in srom_setup_minor()
346 SROM_SECTOR_SIZE_OFF, sizeof(srom->sector_size)) < 0) in srom_setup_minor()
/drivers/nfc/s3fwrn5/
Dfirmware.h54 __u16 sector_size; member
95 u32 sector_size; member
Dfirmware.c399 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup()
436 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download()
479 for (off = 0; off < image_size; off += fw_info->sector_size) { in s3fwrn5_fw_download()
/drivers/block/
Dswim_asm.S47 .equ sector_size, 512 define
197 movel #sector_size-1, %d4 /* sector size */
240 movel #sector_size, %d0
Dxen-blkfront.c196 u16 sector_size; member
947 blk_queue_logical_block_size(rq, info->sector_size); in blkif_set_queue_limits()
962 static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size, in xlvbd_init_blk_queue() argument
997 info->sector_size = sector_size; in xlvbd_init_blk_queue()
1095 u16 vdisk_info, u16 sector_size, in xlvbd_alloc_gendisk() argument
1162 if (xlvbd_init_blk_queue(gd, sector_size, physical_sector_size)) { in xlvbd_alloc_gendisk()
2315 unsigned long sector_size; in blkfront_connect() local
2359 "sector-size", "%lu", &sector_size, in blkfront_connect()
2375 sector_size); in blkfront_connect()
2387 err = xlvbd_alloc_gendisk(sectors, info, binfo, sector_size, in blkfront_connect()
/drivers/ide/
Dide-floppy.c322 u16 transfer_rate, sector_size, cyls, rpm; in ide_floppy_get_flexible_disk_page() local
342 sector_size = be16_to_cpup((__be16 *)&buf[8 + 6]); in ide_floppy_get_flexible_disk_page()
348 capacity = cyls * heads * sectors * sector_size; in ide_floppy_get_flexible_disk_page()
354 sectors, transfer_rate / 8, sector_size, rpm); in ide_floppy_get_flexible_disk_page()
/drivers/target/
Dtarget_core_pscsi.c171 sdev->sector_size = get_unaligned_be24(&buf[9]); in pscsi_tape_read_blocksize()
173 if (!sdev->sector_size) in pscsi_tape_read_blocksize()
174 sdev->sector_size = 1024; in pscsi_tape_read_blocksize()
317 min_not_zero((int)sd->sector_size, 512); in pscsi_add_device_to_list()
344 dev->dev_attrib.hw_block_size = sd->sector_size; in pscsi_add_device_to_list()
688 sd->sector_size = blocksize; in pscsi_complete_cmd()
/drivers/ata/
Dlibata-scsi.c1279 sdev->sector_size = ATA_SECT_SIZE; in ata_scsi_dev_config()
1293 sdev->sector_size = ata_id_logical_sector_size(dev->id); in ata_scsi_dev_config()
1304 if (sdev->sector_size > PAGE_SIZE) in ata_scsi_dev_config()
1307 sdev->sector_size); in ata_scsi_dev_config()
1309 blk_queue_update_dma_alignment(q, sdev->sector_size - 1); in ata_scsi_dev_config()
1815 req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size; in ata_check_nblocks()
1915 qc->nbytes = n_block * scmd->device->sector_size; in ata_scsi_rw_xlat()
2725 u32 sector_size; /* physical sector size in bytes */ in ata_scsiop_read_cap() local
2729 sector_size = ata_id_logical_sector_size(dev->id); in ata_scsiop_read_cap()
2746 rbuf[4] = sector_size >> (8 * 3); in ata_scsiop_read_cap()
[all …]
/drivers/mtd/devices/
Dst_spi_fsm.c305 unsigned sector_size; member
1433 for (offs = 0; offs < info->sector_size * info->n_sectors;) { in stfsm_s25fl_config()
1439 if ((offs < info->sector_size * 2) || in stfsm_s25fl_config()
1440 (offs >= (info->sector_size - info->n_sectors * 4))) in stfsm_s25fl_config()
2090 if (info->sector_size * info->n_sectors > 0x1000000) in stfsm_probe()
2114 fsm->mtd.size = info->sector_size * info->n_sectors; in stfsm_probe()
2115 fsm->mtd.erasesize = info->sector_size; in stfsm_probe()
/drivers/mtd/nand/atmel/
Dpmecc.c646 int sector_size = get_sectorsize(user); in atmel_pmecc_err_location() local
647 int degree = sector_size == 512 ? 13 : 14; in atmel_pmecc_err_location()
664 if (sector_size == 1024) in atmel_pmecc_err_location()
668 writel((sector_size * 8) + (degree * strength), in atmel_pmecc_err_location()
/drivers/mtd/spi-nor/
Dspi-nor.c58 unsigned sector_size; member
251 nor->mtd.erasesize = info->sector_size; in spi_nor_set_4byte_opcodes()
883 .sector_size = (_sector_size), \
898 .sector_size = (_sector_size), \
904 .sector_size = (_sector_size), \
917 .sector_size = (8*_page_size), \
2385 params->size = (u64)info->sector_size * info->n_sectors; in spi_nor_init_params()
2581 mtd->erasesize = info->sector_size; in spi_nor_select_erase()
/drivers/scsi/isci/
Drequest.c280 switch (sdp->sector_size) { in scu_bg_blk_size()
292 static u32 scu_dif_bytes(u32 len, u32 sector_size) in scu_dif_bytes() argument
294 return (len >> ilog2(sector_size)) * 8; in scu_dif_bytes()
310 scmd->device->sector_size); in scu_ssp_ireq_dif_insert()
321 tc->UD_bytes_immed_val = scmd->device->sector_size; in scu_ssp_ireq_dif_insert()
329 tc->bgc_blk_sz = scmd->device->sector_size; in scu_ssp_ireq_dif_insert()
365 scmd->device->sector_size); in scu_ssp_ireq_dif_strip()
380 tc->UD_bytes_immed_val = scmd->device->sector_size; in scu_ssp_ireq_dif_strip()
388 tc->bgc_blk_sz = scmd->device->sector_size; in scu_ssp_ireq_dif_strip()
/drivers/s390/scsi/
Dzfcp_fc.h238 datalen += datalen / scsi->device->sector_size * 8; in zfcp_fc_scsi_to_fcp()
/drivers/crypto/caam/
Dcaamalg_desc.c1283 __be64 sector_size = cpu_to_be64(512); in cnstr_shdsc_xts_ablkcipher_encap() local
1296 append_load_as_imm(desc, (void *)&sector_size, 8, LDST_CLASS_1_CCB | in cnstr_shdsc_xts_ablkcipher_encap()
1335 __be64 sector_size = cpu_to_be64(512); in cnstr_shdsc_xts_ablkcipher_decap() local
1348 append_load_as_imm(desc, (void *)&sector_size, 8, LDST_CLASS_1_CCB | in cnstr_shdsc_xts_ablkcipher_decap()
/drivers/infiniband/ulp/iser/
Diser_verbs.c1101 unsigned long sector_size = iser_task->sc->device->sector_size; in iser_check_task_pi_status() local
1119 sector_div(sector_off, sector_size + 8); in iser_check_task_pi_status()

12