Lines Matching refs:lba
154 unsigned int lba, in sddr55_read_data() argument
186 if (lba >= info->max_log_blks) in sddr55_read_data()
189 pba = info->lba_to_pba[lba]; in sddr55_read_data()
199 pages, pba, lba, page); in sddr55_read_data()
261 lba++; in sddr55_read_data()
274 unsigned int lba, in sddr55_write_data() argument
314 if (lba >= info->max_log_blks) in sddr55_write_data()
317 pba = info->lba_to_pba[lba]; in sddr55_write_data()
331 pages, pba, lba, page); in sddr55_write_data()
343 pba = (lba / 1000) * 1024; in sddr55_write_data()
345 US_DEBUGP("No PBA for LBA %04X\n",lba); in sddr55_write_data()
375 US_DEBUGP("Allocating PBA %04X for LBA %04X\n", pba, lba); in sddr55_write_data()
388 command[0] = LSB_of(lba % 1000); in sddr55_write_data()
389 command[6] = MSB_of(lba % 1000); in sddr55_write_data()
449 lba, pba, new_pba); in sddr55_write_data()
452 info->lba_to_pba[lba] = new_pba; in sddr55_write_data()
466 info->pba_to_lba[new_pba] = lba % 1000; in sddr55_write_data()
469 lba++; in sddr55_write_data()
612 unsigned short lba; in sddr55_read_map() local
680 lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]); in sddr55_read_map()
698 info->pba_to_lba[i] = lba; in sddr55_read_map()
700 if (lba >= max_lba) { in sddr55_read_map()
704 if (info->lba_to_pba[lba + zone * 1000] != NOT_ALLOCATED && in sddr55_read_map()
706 printk("sddr55: map inconsistency at LBA %04X\n", lba + zone * 1000); in sddr55_read_map()
710 if (lba<0x10 || (lba>=0x3E0 && lba<0x3EF)) in sddr55_read_map()
711 US_DEBUGP("LBA %04X <-> PBA %04X\n", lba, i); in sddr55_read_map()
713 info->lba_to_pba[lba + zone * 1000] = i; in sddr55_read_map()
749 unsigned int lba; in sddr55_transport() local
886 lba = page >> info->blockshift; in sddr55_transport()
891 if (lba >= info->max_log_blks) { in sddr55_transport()
894 "block %04X\n", lba, info->max_log_blks-1); in sddr55_transport()
901 pba = info->lba_to_pba[lba]; in sddr55_transport()
906 pba, lba, page, pages); in sddr55_transport()
908 return sddr55_write_data(us, lba, page, pages); in sddr55_transport()
912 pba, lba, page, pages); in sddr55_transport()
914 return sddr55_read_data(us, lba, page, pages); in sddr55_transport()