Home
last modified time | relevance | path

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

12

/drivers/scsi/
Dsd.c651 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard()
732 sector >>= ilog2(sdp->sector_size) - 9; in sd_setup_discard_cmnd()
733 nr_sectors >>= ilog2(sdp->sector_size) - 9; in sd_setup_discard_cmnd()
762 len = sdkp->device->sector_size; in sd_setup_discard_cmnd()
774 len = sdkp->device->sector_size; in sd_setup_discard_cmnd()
809 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same()
858 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size); in sd_setup_write_same_cmnd()
860 sector >>= ilog2(sdp->sector_size) - 9; in sd_setup_write_same_cmnd()
861 nr_sectors >>= ilog2(sdp->sector_size) - 9; in sd_setup_write_same_cmnd()
877 cmd->transfersize = sdp->sector_size; in sd_setup_write_same_cmnd()
[all …]
Dsr.c356 if (cd->device->sector_size == 2048) in sr_done()
428 s_size = cd->device->sector_size; in sr_init_command()
509 SCpnt->transfersize = cd->device->sector_size; in sr_init_command()
674 if (cd->device->sector_size > 2048) in sr_release()
738 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe()
788 int sector_size; in get_sectorsize() local
808 sector_size = 2048; /* A guess, just in case */ in get_sectorsize()
824 sector_size = (buffer[4] << 24) | in get_sectorsize()
826 switch (sector_size) { in get_sectorsize()
836 sector_size = 2048; in get_sectorsize()
[all …]
Dsd.h151 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors()
156 return blocks * sdev->sector_size; in logical_to_bytes()
Dsr_vendor.c143 cd->device->sector_size = blocklength; in sr_set_blocklength()
316 if (2048 != cd->device->sector_size) { in sr_cd_check()
Dsr_ioctl.c533 if (blksize != cd->device->sector_size) { in sr_read_sector()
/drivers/nvdimm/
Dblk.c30 u32 sector_size; member
38 return blk_dev->nsblk->lbasize - blk_dev->sector_size; in nd_blk_meta_size()
75 ns_offset = lba * blk_dev->internal_lbasize + blk_dev->sector_size; in nd_blk_rw_integrity()
137 cur_len = bip ? min(len, blk_dev->sector_size) : len; in nd_blk_do_bvec()
139 lba = div_u64(sector << SECTOR_SHIFT, blk_dev->sector_size); in nd_blk_do_bvec()
158 sector += blk_dev->sector_size >> SECTOR_SHIFT; in nd_blk_do_bvec()
248 available_disk_size = internal_nlba * blk_dev->sector_size; in nd_blk_attach_disk()
257 blk_queue_logical_block_size(blk_dev->queue, blk_dev->sector_size); in nd_blk_attach_disk()
314 blk_dev->sector_size = ((nsblk->lbasize >= 4096) ? 4096 : 512); in nd_blk_probe()
Dbtt.c816 return btt->lbasize - btt->sector_size; in btt_meta_size()
830 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena()
914 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity()
975 cur_len = min(btt->sector_size, len); in btt_read_pg()
1032 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg()
1062 cur_len = min(btt->sector_size, len); in btt_write_pg()
1120 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg()
1178 BUG_ON(len < btt->sector_size); in btt_make_request()
1179 BUG_ON(len % btt->sector_size); in btt_make_request()
1256 blk_queue_logical_block_size(btt->btt_queue, btt->sector_size); in btt_blk_init()
[all …]
Dbtt.h179 u32 sector_size; member
Dbtt_devs.c84 static DEVICE_ATTR_RW(sector_size);
/drivers/mtd/nand/
Datmel_nand.c471 static int pmecc_get_ecc_bytes(int cap, int sector_size) in pmecc_get_ecc_bytes() argument
473 int m = 12 + sector_size / 512; in pmecc_get_ecc_bytes()
758 int sector_size = host->pmecc_sector_size; in pmecc_err_location() local
774 if (sector_size == 1024) in pmecc_err_location()
779 sector_size * 8 + host->pmecc_degree * cap); in pmecc_err_location()
808 int byte_pos, bit_pos, sector_size, pos; in pmecc_correct_data() local
812 sector_size = host->pmecc_sector_size; in pmecc_correct_data()
819 if (byte_pos >= (sector_size + extra_bytes)) in pmecc_correct_data()
822 if (byte_pos < sector_size) { in pmecc_correct_data()
832 + (byte_pos - sector_size); in pmecc_correct_data()
[all …]
/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/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);
346 if (_srom_read(devhdl, &srom->sector_size, in srom_setup_minor()
347 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.c401 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup()
439 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download()
463 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.c796 static int xlvbd_init_blk_queue(struct gendisk *gd, u16 sector_size, in xlvbd_init_blk_queue() argument
832 blk_queue_logical_block_size(rq, sector_size); in xlvbd_init_blk_queue()
946 u16 vdisk_info, u16 sector_size, in xlvbd_alloc_gendisk() argument
1014 if (xlvbd_init_blk_queue(gd, sector_size, physical_sector_size, in xlvbd_alloc_gendisk()
2050 unsigned long sector_size; in blkfront_connect() local
2091 "sector-size", "%lu", &sector_size, in blkfront_connect()
2108 physical_sector_size = sector_size; in blkfront_connect()
2117 err = xlvbd_alloc_gendisk(sectors, info, binfo, sector_size, in blkfront_connect()
/drivers/ide/
Dide-floppy.c316 u16 transfer_rate, sector_size, cyls, rpm; in ide_floppy_get_flexible_disk_page() local
336 sector_size = be16_to_cpup((__be16 *)&buf[8 + 6]); in ide_floppy_get_flexible_disk_page()
342 capacity = cyls * heads * sectors * sector_size; in ide_floppy_get_flexible_disk_page()
348 sectors, transfer_rate / 8, sector_size, rpm); in ide_floppy_get_flexible_disk_page()
/drivers/ata/
Dlibata-scsi.c1147 sdev->sector_size = ATA_SECT_SIZE; in ata_scsi_dev_config()
1161 sdev->sector_size = ata_id_logical_sector_size(dev->id); in ata_scsi_dev_config()
1172 if (sdev->sector_size > PAGE_SIZE) in ata_scsi_dev_config()
1175 sdev->sector_size); in ata_scsi_dev_config()
1177 blk_queue_update_dma_alignment(q, sdev->sector_size - 1); in ata_scsi_dev_config()
1665 req_blocks = blk_rq_bytes(rq) / scmd->device->sector_size; in ata_check_nblocks()
1755 qc->nbytes = n_block * scmd->device->sector_size; in ata_scsi_rw_xlat()
2528 u32 sector_size; /* physical sector size in bytes */ in ata_scsiop_read_cap() local
2532 sector_size = ata_id_logical_sector_size(dev->id); in ata_scsiop_read_cap()
2549 rbuf[4] = sector_size >> (8 * 3); in ata_scsiop_read_cap()
[all …]
/drivers/mtd/spi-nor/
Dspi-nor.c56 unsigned sector_size; member
625 .sector_size = (_sector_size), \
640 .sector_size = (_sector_size), \
646 .sector_size = (_sector_size), \
1183 mtd->size = info->sector_size * info->n_sectors; in spi_nor_scan()
1221 mtd->erasesize = info->sector_size; in spi_nor_scan()
1303 mtd->erasesize = info->sector_size; in spi_nor_scan()
/drivers/target/
Dtarget_core_pscsi.c171 sdev->sector_size = (buf[9] << 16) | (buf[10] << 8) | (buf[11]); 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()
319 min_not_zero((int)sd->sector_size, 512); in pscsi_add_device_to_list()
346 dev->dev_attrib.hw_block_size = sd->sector_size; in pscsi_add_device_to_list()
687 sd->sector_size = blocksize; in pscsi_transport_complete()
/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()
2113 fsm->mtd.size = info->sector_size * info->n_sectors; in stfsm_probe()
2114 fsm->mtd.erasesize = info->sector_size; in stfsm_probe()
/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.h234 fcp->fc_dl += fcp->fc_dl / scsi->device->sector_size * 8; in zfcp_fc_scsi_to_fcp()
/drivers/infiniband/ulp/iser/
Diser_verbs.c1282 unsigned long sector_size = iser_task->sc->device->sector_size; in iser_check_task_pi_status() local
1300 sector_div(sector_off, sector_size + 8); in iser_check_task_pi_status()
/drivers/scsi/be2iscsi/
Dbe_mgmt.c492 unsigned short region, sector_size, sector, offset; in mgmt_vendor_specific_fw_cmd() local
498 sector_size = bsg_req->rqst_data.h_vendor.vendor_cmd[2]; in mgmt_vendor_specific_fw_cmd()
508 offset = sector * sector_size + offset; in mgmt_vendor_specific_fw_cmd()

12