Home
last modified time | relevance | path

Searched refs:lba (Results 1 – 25 of 58) sorted by relevance

123

/drivers/scsi/
Dscsi_trace.c33 sector_t lba = 0, txlen = 0; in scsi_trace_rw6() local
35 lba |= ((cdb[1] & 0x1F) << 16); in scsi_trace_rw6()
36 lba |= (cdb[2] << 8); in scsi_trace_rw6()
37 lba |= cdb[3]; in scsi_trace_rw6()
41 (unsigned long long)lba, (unsigned long long)txlen); in scsi_trace_rw6()
51 sector_t lba = 0, txlen = 0; in scsi_trace_rw10() local
53 lba |= (cdb[2] << 24); in scsi_trace_rw10()
54 lba |= (cdb[3] << 16); in scsi_trace_rw10()
55 lba |= (cdb[4] << 8); in scsi_trace_rw10()
56 lba |= cdb[5]; in scsi_trace_rw10()
[all …]
Dsr_ioctl.c101 tocentry->cdte_addr.lba = (((((buffer[8] << 8) + buffer[9]) << 8) in sr_read_tocentry()
387 ms_info->addr.lba = cd->ms_offset; in sr_get_last_session()
482 static int sr_read_cd(Scsi_CD *cd, unsigned char *dest, int lba, int format, int blksize) in sr_read_cd() argument
488 lba, format, blksize); in sr_read_cd()
494 cgc.cmd[2] = (unsigned char) (lba >> 24) & 0xff; in sr_read_cd()
495 cgc.cmd[3] = (unsigned char) (lba >> 16) & 0xff; in sr_read_cd()
496 cgc.cmd[4] = (unsigned char) (lba >> 8) & 0xff; in sr_read_cd()
497 cgc.cmd[5] = (unsigned char) lba & 0xff; in sr_read_cd()
524 static int sr_read_sector(Scsi_CD *cd, int lba, int blksize, unsigned char *dest) in sr_read_sector() argument
531 rc = sr_read_cd(cd, dest, lba, 0, blksize); in sr_read_sector()
[all …]
Dscsi_debug.c679 static void *fake_store(unsigned long long lba) in fake_store() argument
681 lba = do_div(lba, sdebug_store_sectors); in fake_store()
683 return fake_storep + lba * sdebug_sector_size; in fake_store()
2335 unsigned long long lba, unsigned int num) in check_device_access_params() argument
2337 if (lba + num > sdebug_capacity) { in check_device_access_params()
2351 static int do_device_access(struct scsi_cmnd *scmd, u64 lba, u32 num, in do_device_access() argument
2372 block = do_div(lba, sdebug_store_sectors); in do_device_access()
2394 static bool comp_write_worker(u64 lba, u32 num, const u8 *arr) in comp_write_worker() argument
2401 block = do_div(lba, store_blks); in comp_write_worker()
2537 u64 lba; in resp_read_dt0() local
[all …]
Dsd.c2074 static bool sd_addressable_capacity(u64 lba, unsigned int sector_size) in sd_addressable_capacity() argument
2076 u64 last_sector = (lba + 1ULL) << (ilog2(sector_size) - 9); in sd_addressable_capacity()
2093 unsigned long long lba; in read_capacity_16() local
2142 lba = get_unaligned_be64(&buffer[0]); in read_capacity_16()
2149 if (!sd_addressable_capacity(lba, sector_size)) { in read_capacity_16()
2176 sdkp->capacity = lba + 1; in read_capacity_16()
2188 sector_t lba; in read_capacity_10() local
2224 lba = get_unaligned_be32(&buffer[0]); in read_capacity_10()
2226 if (sdp->no_read_capacity_16 && (lba == 0xffffffff)) { in read_capacity_10()
2235 if (!sd_addressable_capacity(lba, sector_size)) { in read_capacity_10()
[all …]
/drivers/usb/storage/
Dsddr55.c200 unsigned int lba, in sddr55_read_data() argument
232 if (lba >= info->max_log_blks) in sddr55_read_data()
235 pba = info->lba_to_pba[lba]; in sddr55_read_data()
244 pages, pba, lba, page); in sddr55_read_data()
306 lba++; in sddr55_read_data()
319 unsigned int lba, in sddr55_write_data() argument
359 if (lba >= info->max_log_blks) in sddr55_write_data()
362 pba = info->lba_to_pba[lba]; in sddr55_write_data()
375 pages, pba, lba, page); in sddr55_write_data()
387 pba = (lba / 1000) * 1024; in sddr55_write_data()
[all …]
Dsddr09.c750 unsigned int lba, maxlba, pba; in sddr09_read_data() local
757 lba = address >> info->blockshift; in sddr09_read_data()
760 if (lba >= maxlba) in sddr09_read_data()
786 if (lba >= maxlba) { in sddr09_read_data()
788 lba, maxlba); in sddr09_read_data()
794 pba = info->lba_to_pba[lba]; in sddr09_read_data()
799 pages, lba, page); in sddr09_read_data()
812 pages, pba, lba, page); in sddr09_read_data()
828 lba++; in sddr09_read_data()
837 sddr09_find_unused_pba(struct sddr09_card_info *info, unsigned int lba) { in sddr09_find_unused_pba() argument
[all …]
Dalauda.c812 static int alauda_write_lba(struct us_data *us, u16 lba, in alauda_write_lba() argument
824 unsigned int lba_offset = lba % uzonesize; in alauda_write_lba()
826 unsigned int zone = lba / uzonesize; in alauda_write_lba()
900 MEDIA_INFO(us).pba_to_lba[zone][new_pba_offset] = lba; in alauda_write_lba()
902 usb_stor_dbg(us, "Remapped LBA %d to PBA %d\n", lba, new_pba); in alauda_write_lba()
922 u16 lba, max_lba; in alauda_read_data() local
946 lba = address >> blockshift; in alauda_read_data()
955 unsigned int zone = lba / uzonesize; /* integer division */ in alauda_read_data()
956 unsigned int lba_offset = lba - (zone * uzonesize); in alauda_read_data()
962 if (lba >= max_lba) { in alauda_read_data()
[all …]
Disd200.c1239 unsigned long lba; in isd200_scsi_to_ata() local
1322 lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]); in isd200_scsi_to_ata()
1326 sectnum = (unsigned char)(lba); in isd200_scsi_to_ata()
1327 cylinder = (unsigned short)(lba>>8); in isd200_scsi_to_ata()
1328 head = ATA_ADDRESS_DEVHEAD_LBA_MODE | (unsigned char)(lba>>24 & 0x0F); in isd200_scsi_to_ata()
1330 sectnum = (u8)((lba % id[ATA_ID_SECTORS]) + 1); in isd200_scsi_to_ata()
1331 cylinder = (u16)(lba / (id[ATA_ID_SECTORS] * in isd200_scsi_to_ata()
1333 head = (u8)((lba / id[ATA_ID_SECTORS]) % in isd200_scsi_to_ata()
1354 lba = be32_to_cpu(*(__be32 *)&srb->cmnd[2]); in isd200_scsi_to_ata()
1358 sectnum = (unsigned char)(lba); in isd200_scsi_to_ata()
[all …]
/drivers/mtd/
Dsm_ftl.c132 static int sm_get_lba(uint8_t *lba) in sm_get_lba() argument
135 if ((lba[0] & 0xF8) != 0x10) in sm_get_lba()
139 if (hweight16(*(uint16_t *)lba) & 1) in sm_get_lba()
142 return (lba[1] >> 1) | ((lba[0] & 0x07) << 7); in sm_get_lba()
157 int lba; in sm_read_lba() local
169 lba = sm_get_lba(oob->lba_copy1); in sm_read_lba()
171 if (lba == -2) in sm_read_lba()
172 lba = sm_get_lba(oob->lba_copy2); in sm_read_lba()
174 return lba; in sm_read_lba()
177 static void sm_write_lba(struct sm_oob *oob, uint16_t lba) in sm_write_lba() argument
[all …]
/drivers/memstick/core/
Dms_block.c137 static int msb_get_zone_from_lba(int lba) in msb_get_zone_from_lba() argument
139 if (lba < 494) in msb_get_zone_from_lba()
141 return ((lba - 494) / 496) + 1; in msb_get_zone_from_lba()
1001 u16 pba, u32 lba, struct scatterlist *sg, int offset) in msb_write_block() argument
1015 if (pba >= msb->block_count || lba >= msb->logical_block_count) { in msb_write_block()
1021 if (msb_get_zone_from_lba(lba) != msb_get_zone_from_pba(pba)) { in msb_write_block()
1043 msb->regs.extra_data.logical_address = cpu_to_be16(lba); in msb_write_block()
1115 static int msb_update_block(struct msb_data *msb, u16 lba, in msb_update_block() argument
1121 pba = msb->lba_to_pba_table[lba]; in msb_update_block()
1122 dbg_verbose("start of a block update at lba %d, pba %d", lba, pba); in msb_update_block()
[all …]
/drivers/cdrom/
Dcdrom.c1567 addr->lba = (int) addr->msf.frame + in sanitize_format()
1570 int lba = addr->lba; in sanitize_format() local
1571 addr->msf.frame = lba % 75; in sanitize_format()
1572 lba /= 75; in sanitize_format()
1573 lba += 2; in sanitize_format()
1574 addr->msf.second = lba % 60; in sanitize_format()
1575 addr->msf.minute = lba / 60; in sanitize_format()
1693 cgc.cmd[5] = ai->lstk.lba; in dvd_do_auth()
1694 cgc.cmd[4] = ai->lstk.lba >> 8; in dvd_do_auth()
1695 cgc.cmd[3] = ai->lstk.lba >> 16; in dvd_do_auth()
[all …]
/drivers/nvdimm/
Dblk.c72 struct bio_integrity_payload *bip, u64 lba, int rw) in nd_blk_rw_integrity() argument
82 ns_offset = lba * internal_lbasize + sector_size; in nd_blk_rw_integrity()
117 struct bio_integrity_payload *bip, u64 lba, int rw) in nd_blk_rw_integrity() argument
132 u64 lba; in nsblk_do_bvec() local
147 lba = div_u64(sector << SECTOR_SHIFT, sector_size); in nsblk_do_bvec()
148 ns_offset = lba * internal_lbasize; in nsblk_do_bvec()
160 err = nd_blk_rw_integrity(nsblk, bip, lba, rw); in nsblk_do_bvec()
Dbtt.c82 static int __btt_map_write(struct arena_info *arena, u32 lba, __le32 mapping) in __btt_map_write() argument
84 u64 ns_off = arena->mapoff + (lba * MAP_ENT_SIZE); in __btt_map_write()
86 WARN_ON(lba >= arena->external_nlba); in __btt_map_write()
90 static int btt_map_write(struct arena_info *arena, u32 lba, u32 mapping, in btt_map_write() argument
130 return __btt_map_write(arena, lba, mapping_le); in btt_map_write()
133 static int btt_map_read(struct arena_info *arena, u32 lba, u32 *mapping, in btt_map_read() argument
139 u64 ns_off = arena->mapoff + (lba * MAP_ENT_SIZE); in btt_map_read()
141 WARN_ON(lba >= arena->external_nlba); in btt_map_read()
161 *mapping = lba; in btt_map_read()
433 ent.lba = cpu_to_le32(i); in btt_log_init()
[all …]
/drivers/scsi/aacraid/
Daachba.c1114 static int aac_bounds_32(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba) in aac_bounds_32() argument
1116 if (lba & 0xffffffff00000000LL) { in aac_bounds_32()
1133 static int aac_bounds_64(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba) in aac_bounds_64() argument
1140 static int aac_read_raw_io(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count) in aac_read_raw_io() argument
1151 readcmd2->blockLow = cpu_to_le32((u32)(lba&0xffffffff)); in aac_read_raw_io()
1152 readcmd2->blockHigh = cpu_to_le32((u32)((lba&0xffffffff00000000LL)>>32)); in aac_read_raw_io()
1167 readcmd->block[0] = cpu_to_le32((u32)(lba&0xffffffff)); in aac_read_raw_io()
1168 readcmd->block[1] = cpu_to_le32((u32)((lba&0xffffffff00000000LL)>>32)); in aac_read_raw_io()
1196 static int aac_read_block64(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count) in aac_read_block64() argument
1207 readcmd->block = cpu_to_le32((u32)(lba&0xffffffff)); in aac_read_block64()
[all …]
Daacraid.h564 int (*adapter_bounds)(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba);
565 int (*adapter_read)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count);
566 int (*adapter_write)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua);
1285 #define aac_adapter_bounds(dev,cmd,lba) \ argument
1286 dev->a_ops.adapter_bounds(dev,cmd,lba)
1288 #define aac_adapter_read(fib,cmd,lba,count) \ argument
1289 ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count)
1291 #define aac_adapter_write(fib,cmd,lba,count,fua) \ argument
1292 ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count,fua)
/drivers/char/agp/
Dparisc-agp.c376 struct parisc_device **lba = data; in find_quicksilver() local
380 *lba = padev; in find_quicksilver()
391 struct parisc_device *sba = NULL, *lba = NULL; in parisc_agp_init() local
405 device_for_each_child(&sba->dev, &lba, find_quicksilver); in parisc_agp_init()
407 if (!lba) { in parisc_agp_init()
412 lbadev = parisc_get_drvdata(lba); in parisc_agp_init()
/drivers/ide/
Dide-cd_ioctl.c264 ms_info->addr.lba = toc->last_session_lba; in ide_cdrom_get_last_session()
369 lba_start = first_toc->addr.lba; in ide_cd_fake_play_trkind()
370 lba_end = last_toc->addr.lba; in ide_cd_fake_play_trkind()
416 lba_to_msf(toce->addr.lba, in ide_cd_read_tocentry()
421 tocentry->cdte_addr.lba = toce->addr.lba; in ide_cd_read_tocentry()
Dide-disk.c357 int lba; in ide_disk_get_capacity() local
361 lba = 1; in ide_disk_get_capacity()
365 lba = 1; in ide_disk_get_capacity()
369 lba = 0; in ide_disk_get_capacity()
375 if (lba) { in ide_disk_get_capacity()
Dide-cd.h64 unsigned lba; member
/drivers/target/
Dtarget_core_file.c424 fd_do_prot_fill(struct se_device *se_dev, sector_t lba, sector_t nolb, in fd_do_prot_fill() argument
430 loff_t pos = lba * se_dev->prot_length; in fd_do_prot_fill()
454 fd_do_prot_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in fd_do_prot_unmap() argument
466 rc = fd_do_prot_fill(cmd->se_dev, lba, nolb, buf, PAGE_SIZE); in fd_do_prot_unmap()
474 fd_execute_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in fd_execute_unmap() argument
485 ret = fd_do_prot_unmap(cmd, lba, nolb); in fd_execute_unmap()
496 target_to_linux_sector(dev, lba), in fd_execute_unmap()
507 loff_t pos = lba * se_dev->dev_attrib.block_size; in fd_execute_unmap()
Dtarget_core_iblock.c314 iblock_get_bio(struct se_cmd *cmd, sector_t lba, u32 sg_num, int op, in iblock_get_bio() argument
336 bio->bi_iter.bi_sector = lba; in iblock_get_bio()
399 iblock_execute_unmap(struct se_cmd *cmd, sector_t lba, sector_t nolb) in iblock_execute_unmap() argument
406 target_to_linux_sector(dev, lba), in iblock_execute_unmap()
Dtarget_core_alua.c477 u64 segment_size, segment_mult, sectors, lba; in core_alua_state_lba_dependent() local
488 lba = cmd->t_task_lba; in core_alua_state_lba_dependent()
489 while (lba < cmd->t_task_lba + sectors) { in core_alua_state_lba_dependent()
499 u64 tmp = lba; in core_alua_state_lba_dependent()
505 lba += segment_size; in core_alua_state_lba_dependent()
511 if (lba >= first_lba && lba <= last_lba) { in core_alua_state_lba_dependent()
512 lba = last_lba + 1; in core_alua_state_lba_dependent()
/drivers/ata/
Dlibata-scsi.c1530 u64 lba = 0; in scsi_6_lba_len() local
1535 lba |= ((u64)(cdb[1] & 0x1f)) << 16; in scsi_6_lba_len()
1536 lba |= ((u64)cdb[2]) << 8; in scsi_6_lba_len()
1537 lba |= ((u64)cdb[3]); in scsi_6_lba_len()
1541 *plba = lba; in scsi_6_lba_len()
1557 u64 lba = 0; in scsi_10_lba_len() local
1562 lba |= ((u64)cdb[2]) << 24; in scsi_10_lba_len()
1563 lba |= ((u64)cdb[3]) << 16; in scsi_10_lba_len()
1564 lba |= ((u64)cdb[4]) << 8; in scsi_10_lba_len()
1565 lba |= ((u64)cdb[5]); in scsi_10_lba_len()
[all …]
/drivers/usb/gadget/function/
Df_mass_storage.c646 u32 lba; in do_read() local
659 lba = get_unaligned_be24(&common->cmnd[1]); in do_read()
661 lba = get_unaligned_be32(&common->cmnd[2]); in do_read()
673 if (lba >= curlun->num_sectors) { in do_read()
677 file_offset = ((loff_t) lba) << curlun->blkbits; in do_read()
777 u32 lba; in do_write() local
799 lba = get_unaligned_be24(&common->cmnd[1]); in do_write()
801 lba = get_unaligned_be32(&common->cmnd[2]); in do_write()
819 if (lba >= curlun->num_sectors) { in do_write()
826 file_offset = usb_offset = ((loff_t) lba) << curlun->blkbits; in do_write()
[all …]
/drivers/scsi/megaraid/
Dmbox_defs.h166 uint32_t lba; member
204 u32 lba; member

123