Home
last modified time | relevance | path

Searched refs:blocks (Results 1 – 25 of 74) sorted by relevance

123

/drivers/mtd/
Drfd_ftl.c86 struct block *blocks; member
93 struct block *block = &part->blocks[block_no]; in build_block_map()
186 part->blocks = kcalloc(part->total_blocks, sizeof(struct block), in scan_header()
188 if (!part->blocks) in scan_header()
235 kfree(part->blocks); in scan_header()
278 if (i >= part->total_blocks || part->blocks[i].offset != erase->addr || in erase_callback()
290 part->blocks[i].state = BLOCK_FAILED; in erase_callback()
291 part->blocks[i].free_sectors = 0; in erase_callback()
292 part->blocks[i].used_sectors = 0; in erase_callback()
301 part->blocks[i].state = BLOCK_ERASED; in erase_callback()
[all …]
/drivers/mmc/card/
Dblock.c151 __be32 *blocks; in mmc_sd_num_wr_blocks() local
193 data.blocks = 1; in mmc_sd_num_wr_blocks()
203 blocks = kmalloc(4, GFP_KERNEL); in mmc_sd_num_wr_blocks()
204 if (!blocks) in mmc_sd_num_wr_blocks()
207 sg_init_one(&sg, blocks, 4); in mmc_sd_num_wr_blocks()
211 result = ntohl(*blocks); in mmc_sd_num_wr_blocks()
212 kfree(blocks); in mmc_sd_num_wr_blocks()
296 brq.data.blocks = req->nr_sectors; in mmc_blk_issue_rq()
303 if (brq.data.blocks > card->host->max_blk_count) in mmc_blk_issue_rq()
304 brq.data.blocks = card->host->max_blk_count; in mmc_blk_issue_rq()
[all …]
Dmmc_test.c64 unsigned dev_addr, unsigned blocks, unsigned blksz, int write) in mmc_test_prepare_mrq() argument
68 if (blocks > 1) { in mmc_test_prepare_mrq()
79 if (blocks == 1) in mmc_test_prepare_mrq()
88 mrq->data->blocks = blocks; in mmc_test_prepare_mrq()
242 if (mrq->data->blocks > 1) { in mmc_test_prepare_broken_mrq()
271 mrq->data->blocks * mrq->data->blksz) in mmc_test_check_result()
300 if (mrq->data->blocks > 1) { in mmc_test_check_broken_result()
319 unsigned blocks, unsigned blksz, int write) in mmc_test_simple_transfer() argument
336 blocks, blksz, write); in mmc_test_simple_transfer()
349 unsigned blocks, unsigned blksz, int write) in mmc_test_broken_transfer() argument
[all …]
/drivers/gpu/drm/radeon/
Dradeon_mem.c137 struct mem_block *blocks = drm_alloc(sizeof(*blocks), DRM_MEM_BUFS); in init_heap() local
139 if (!blocks) in init_heap()
144 drm_free(blocks, sizeof(*blocks), DRM_MEM_BUFS); in init_heap()
148 blocks->start = start; in init_heap()
149 blocks->size = size; in init_heap()
150 blocks->file_priv = NULL; in init_heap()
151 blocks->next = blocks->prev = *heap; in init_heap()
155 (*heap)->next = (*heap)->prev = blocks; in init_heap()
/drivers/ide/
Dide-floppy.c242 int blocks = rq->nr_sectors / floppy->bs_factor; in idefloppy_create_rw_cmd() local
246 block, blocks); in idefloppy_create_rw_cmd()
250 put_unaligned(cpu_to_be16(blocks), (unsigned short *)&pc->c[7]); in idefloppy_create_rw_cmd()
260 pc->req_xfer = pc->buf_size = blocks * floppy->block_size; in idefloppy_create_rw_cmd()
392 lba_capacity = floppy->blocks * floppy->block_size; in ide_floppy_get_flexible_disk_page()
398 floppy->blocks = floppy->block_size ? in ide_floppy_get_flexible_disk_page()
400 drive->capacity64 = floppy->blocks * floppy->bs_factor; in ide_floppy_get_flexible_disk_page()
417 int i, rc = 1, blocks, length; in ide_floppy_get_capacity() local
421 floppy->blocks = 0; in ide_floppy_get_capacity()
437 blocks = be32_to_cpup((__be32 *)&pc.buf[desc_start]); in ide_floppy_get_capacity()
[all …]
Dide-floppy_ioctl.c40 int i, blocks, length, u_array_size, u_index; in ide_floppy_get_format_capacities() local
72 blocks = be32_to_cpup((__be32 *)&pc->buf[desc_start]); in ide_floppy_get_format_capacities()
75 if (put_user(blocks, argp)) in ide_floppy_get_format_capacities()
137 int blocks, length, flags, err = 0; in ide_floppy_format_unit() local
162 if (get_user(blocks, arg) || in ide_floppy_format_unit()
170 ide_floppy_create_format_unit_cmd(pc, blocks, length, flags); in ide_floppy_format_unit()
Dide-tape.c535 int blocks = pc->xferred / tape->blk_size; in ide_tape_callback() local
537 tape->avg_size += blocks * tape->blk_size; in ide_tape_callback()
546 tape->first_frame += blocks; in ide_tape_callback()
547 rq->current_nr_sectors -= blocks; in ide_tape_callback()
1201 static int idetape_queue_rw_tail(ide_drive_t *drive, int cmd, int blocks, in idetape_queue_rw_tail() argument
1216 rq->nr_sectors = blocks; in idetape_queue_rw_tail()
1217 rq->current_nr_sectors = blocks; in idetape_queue_rw_tail()
1221 ret = tape->blk_size * (blocks - rq->current_nr_sectors); in idetape_queue_rw_tail()
1268 static int idetape_add_chrdev_write_request(ide_drive_t *drive, int blocks) in idetape_add_chrdev_write_request() argument
1275 blocks, tape->merge_bh); in idetape_add_chrdev_write_request()
[all …]
/drivers/mmc/core/
Dsdio_ops.c115 unsigned addr, int incr_addr, u8 *buf, unsigned blocks, unsigned blksz) in mmc_io_rw_extended() argument
124 BUG_ON(blocks == 1 && blksz > 512); in mmc_io_rw_extended()
125 WARN_ON(blocks == 0); in mmc_io_rw_extended()
140 if (blocks == 1 && blksz <= 512) in mmc_io_rw_extended()
143 cmd.arg |= 0x08000000 | blocks; /* block mode */ in mmc_io_rw_extended()
147 data.blocks = blocks; in mmc_io_rw_extended()
152 sg_init_one(&sg, buf, blksz * blocks); in mmc_io_rw_extended()
Dsdio_io.c312 unsigned blocks; in sdio_io_rw_ext_helper() local
314 blocks = remainder / func->cur_blksize; in sdio_io_rw_ext_helper()
315 if (blocks > max_blocks) in sdio_io_rw_ext_helper()
316 blocks = max_blocks; in sdio_io_rw_ext_helper()
317 size = blocks * func->cur_blksize; in sdio_io_rw_ext_helper()
321 blocks, func->cur_blksize); in sdio_io_rw_ext_helper()
/drivers/usb/storage/
Djumpshot.c436 unsigned long block, blocks; in jumpshot_transport() local
492 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in jumpshot_transport()
494 US_DEBUGP("jumpshot_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks); in jumpshot_transport()
495 return jumpshot_read_data(us, info, block, blocks); in jumpshot_transport()
504 blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | in jumpshot_transport()
507 US_DEBUGP("jumpshot_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks); in jumpshot_transport()
508 return jumpshot_read_data(us, info, block, blocks); in jumpshot_transport()
515 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in jumpshot_transport()
517 US_DEBUGP("jumpshot_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks); in jumpshot_transport()
518 return jumpshot_write_data(us, info, block, blocks); in jumpshot_transport()
[all …]
Ddatafab.c507 unsigned long block, blocks; in datafab_transport() local
562 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in datafab_transport()
564 US_DEBUGP("datafab_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks); in datafab_transport()
565 return datafab_read_data(us, info, block, blocks); in datafab_transport()
574 blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | in datafab_transport()
577 US_DEBUGP("datafab_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks); in datafab_transport()
578 return datafab_read_data(us, info, block, blocks); in datafab_transport()
585 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in datafab_transport()
587 US_DEBUGP("datafab_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks); in datafab_transport()
588 return datafab_write_data(us, info, block, blocks); in datafab_transport()
[all …]
Dshuttle_usbat.c1554 unsigned long block, blocks; in usbat_flash_transport() local
1602 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in usbat_flash_transport()
1604 US_DEBUGP("usbat_flash_transport: READ_10: read block 0x%04lx count %ld\n", block, blocks); in usbat_flash_transport()
1605 return usbat_flash_read_data(us, info, block, blocks); in usbat_flash_transport()
1615 blocks = ((u32)(srb->cmnd[6]) << 24) | ((u32)(srb->cmnd[7]) << 16) | in usbat_flash_transport()
1618 US_DEBUGP("usbat_flash_transport: READ_12: read block 0x%04lx count %ld\n", block, blocks); in usbat_flash_transport()
1619 return usbat_flash_read_data(us, info, block, blocks); in usbat_flash_transport()
1626 blocks = ((u32)(srb->cmnd[7]) << 8) | ((u32)(srb->cmnd[8])); in usbat_flash_transport()
1628 US_DEBUGP("usbat_flash_transport: WRITE_10: write block 0x%04lx count %ld\n", block, blocks); in usbat_flash_transport()
1629 return usbat_flash_write_data(us, info, block, blocks); in usbat_flash_transport()
[all …]
/drivers/gpu/drm/i915/
Di915_mem.c188 struct mem_block *blocks = drm_alloc(sizeof(*blocks), DRM_MEM_BUFLISTS); in init_heap() local
190 if (!blocks) in init_heap()
195 drm_free(blocks, sizeof(*blocks), DRM_MEM_BUFLISTS); in init_heap()
199 blocks->start = start; in init_heap()
200 blocks->size = size; in init_heap()
201 blocks->file_priv = NULL; in init_heap()
202 blocks->next = blocks->prev = *heap; in init_heap()
206 (*heap)->next = (*heap)->prev = blocks; in init_heap()
/drivers/md/
Dbitmap.c1072 sector_t offset, int *blocks,
1085 int blocks; in bitmap_daemon_work() local
1157 &blocks, 0); in bitmap_daemon_work()
1205 sector_t offset, int *blocks, in bitmap_get_counter() argument
1219 *blocks = csize - (offset & (csize- 1)); in bitmap_get_counter()
1230 *blocks = csize - (offset & (csize- 1)); in bitmap_get_counter()
1235 *blocks = csize - (offset & (csize- 1)); in bitmap_get_counter()
1252 int blocks; in bitmap_startwrite() local
1256 bmc = bitmap_get_counter(bitmap, offset, &blocks, 1); in bitmap_startwrite()
1291 offset += blocks; in bitmap_startwrite()
[all …]
/drivers/scsi/
Dg_NCR5380.c574 int blocks = len / 128; in NCR5380_pread() local
582 NCR5380_write(C400_BLOCK_COUNTER_REG, blocks); in NCR5380_pread()
588 printk(KERN_ERR "53C400r: Got 53C80_IRQ start=%d, blocks=%d\n", start, blocks); in NCR5380_pread()
604 blocks--; in NCR5380_pread()
607 if (blocks) { in NCR5380_pread()
624 blocks--; in NCR5380_pread()
658 int blocks = len / 128; in NCR5380_pwrite() local
667 NCR5380_write(C400_BLOCK_COUNTER_REG, blocks); in NCR5380_pwrite()
670 printk(KERN_ERR "53C400w: Got 53C80_IRQ start=%d, blocks=%d\n", start, blocks); in NCR5380_pwrite()
689 blocks--; in NCR5380_pwrite()
[all …]
/drivers/block/
Dataflop.c90 unsigned blocks; /* total number of blocks */ member
664 if (!UDT || desc->track >= UDT->blocks/UDT->spt/2 || desc->head >= 2) { in do_format()
1068 if (SUDT[-1].blocks > ReqBlock) { in fd_rwsec_done1()
1072 SUDT->blocks); in fd_rwsec_done1()
1087 SUDT->blocks); in fd_rwsec_done1()
1363 if (default_params[drive].blocks == 0) in floppy_revalidate()
1425 set_capacity(floppy->disk, UDT->blocks); in redo_fd_request()
1443 set_capacity(floppy->disk, UDT->blocks); in redo_fd_request()
1447 if (CURRENT->sector + 1 > UDT->blocks) { in redo_fd_request()
1520 getprm.size = dtp->blocks; in fd_ioctl()
[all …]
/drivers/staging/rtl8187se/ieee80211/
Dieee80211_crypt_ccmp.c249 int blocks, last, len; in ieee80211_ccmp_encrypt() local
291 blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN; in ieee80211_ccmp_encrypt()
294 for (i = 1; i <= blocks; i++) { in ieee80211_ccmp_encrypt()
295 len = (i == blocks && last) ? last : AES_BLOCK_LEN; in ieee80211_ccmp_encrypt()
326 int i, blocks, last, len; in ieee80211_ccmp_decrypt() local
383 blocks = (data_len + AES_BLOCK_LEN - 1) / AES_BLOCK_LEN; in ieee80211_ccmp_decrypt()
386 for (i = 1; i <= blocks; i++) { in ieee80211_ccmp_decrypt()
387 len = (i == blocks && last) ? last : AES_BLOCK_LEN; in ieee80211_ccmp_decrypt()
/drivers/mmc/host/
Dat91_mci.c201 size = data->blksz * data->blocks; in at91_mci_sg_to_dma()
401 if (cmd->data->blocks > 1) { in at91_mci_handle_transmitted()
426 data->bytes_xfered = data->blksz * data->blocks; in at91_mci_update_bytes_xfered()
491 unsigned int blocks; in at91_mci_send_command() local
539 blocks = data->blocks; in at91_mci_send_command()
549 if (data->blocks > 1) in at91_mci_send_command()
554 blocks = 0; in at91_mci_send_command()
567 cmd->opcode, cmdr, cmd->arg, blocks, block_length, at91_mci_read(host, AT91_MCI_MR)); in at91_mci_send_command()
590 AT91_MCI_BLKR_BCNT(blocks) | in at91_mci_send_command()
616 host->total_length = block_length * blocks; in at91_mci_send_command()
[all …]
Dsdhci.c278 if (host->blocks == 0) in sdhci_transfer_pio()
292 (host->data->blocks == 1)) in sdhci_transfer_pio()
301 host->blocks--; in sdhci_transfer_pio()
302 if (host->blocks == 0) in sdhci_transfer_pio()
576 BUG_ON(data->blksz * data->blocks > 524288); in sdhci_prepare_data()
578 BUG_ON(data->blocks > 65535); in sdhci_prepare_data()
709 host->blocks = data->blocks; in sdhci_prepare_data()
715 writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); in sdhci_prepare_data()
729 if (data->blocks > 1) in sdhci_set_transfer_mode()
768 data->bytes_xfered = data->blksz * data->blocks; in sdhci_finish_data()
Dtmio_mmc.c162 if (data->blocks > 1) { in tmio_mmc_start_command()
239 data->bytes_xfered = data->blocks * data->blksz; in tmio_mmc_data_irq()
397 data->blksz, data->blocks); in tmio_mmc_start_data()
411 tmio_iowrite16(data->blocks, ctl + CTL_XFER_BLK_COUNT); in tmio_mmc_start_data()
Datmel-mci.c239 data->bytes_xfered, data->blocks, in atmci_req_show()
471 else if (data->blocks > 1) in atmci_prepare_command()
583 if (data->blocks * data->blksz < ATMCI_DMA_THRESHOLD) in atmci_submit_data_dma()
664 if (data->blocks * data->blksz < 12 in atmci_submit_data()
665 || (data->blocks * data->blksz) & 3) in atmci_submit_data()
720 mci_writel(host, BLKR, MCI_BCNT(data->blocks) in atmci_start_request()
723 MCI_BCNT(data->blocks) | MCI_BLKLEN(data->blksz)); in atmci_start_request()
795 if (data && data->blocks > 1 && data->blksz & 3) { in atmci_request()
1194 data->bytes_xfered = data->blocks * data->blksz; in atmci_tasklet_func()
/drivers/media/video/saa7134/
Dsaa7134-alsa.c168 if (dev->dmasound.read_count >= dev->dmasound.blksize * (dev->dmasound.blocks-2)) { in saa7134_irq_alsa_done()
170 dev->dmasound.bufsize, dev->dmasound.blocks); in saa7134_irq_alsa_done()
177 next_blk = (dev->dmasound.dma_blk + 2) % dev->dmasound.blocks; in saa7134_irq_alsa_done()
182 …next_blk * dev->dmasound.blksize, dev->dmasound.blocks, dev->dmasound.blksize, dev->dmasound.read_… in saa7134_irq_alsa_done()
185 dev->dmasound.dma_blk = (dev->dmasound.dma_blk + 1) % dev->dmasound.blocks; in saa7134_irq_alsa_done()
310 dev->dmasound.blocks = 0; in dsp_buffer_free()
500 if (dev->dmasound.blocks == periods && in snd_card_saa7134_hw_params()
511 dev->dmasound.blocks = periods; in snd_card_saa7134_hw_params()
517 dev->dmasound.blocks = 0; in snd_card_saa7134_hw_params()
/drivers/mtd/nand/
Ddiskonchip.c1116 unsigned blocks, maxblocks; in nftl_partscan() local
1141 blocks = mtd->size >> this->phys_erase_shift; in nftl_partscan()
1151 while (blocks > maxblocks) { in nftl_partscan()
1152 blocks >>= 1; in nftl_partscan()
1168 blocks = mtd->size >> this->bbt_erase_shift; in nftl_partscan()
1172 if (blocks > maxblocks) { in nftl_partscan()
1219 int blocks; in inftl_partscan() local
1265 blocks = mtd->size >> vshift; in inftl_partscan()
1266 if (blocks > 32768) { in inftl_partscan()
1271 blocks = doc->chips_per_floor << (this->chip_shift - this->phys_erase_shift); in inftl_partscan()
[all …]
/drivers/s390/block/
Ddasd_diag.c427 block->blocks = (unsigned long) label->block_count; in dasd_diag_check_device()
429 block->blocks = end_block; in dasd_diag_check_device()
443 (unsigned long) (block->blocks << in dasd_diag_check_device()
465 geo->cylinders = (block->blocks << block->s2b_shift) >> 10; in dasd_diag_fill_geometry()
/drivers/mtd/onenand/
DKconfig57 of 4KiB. Plane1 has only even blocks such as block0, block2, block4
58 while Plane2 has only odd blocks such as block1, block3, block5.

123