H A D | ms.c | 1672 static int ms_set_bad_block(struct rtsx_chip *chip, u16 phy_blk) ms_set_bad_block() argument 1678 retval = ms_read_extra_data(chip, phy_blk, 0, extra, MS_EXTRA_SIZE); ms_set_bad_block() 1699 data[2] = (u8)(phy_blk >> 8); ms_set_bad_block() 1700 data[3] = (u8)phy_blk; ms_set_bad_block() 1743 static int ms_erase_block(struct rtsx_chip *chip, u16 phy_blk) ms_erase_block() argument 1764 data[2] = (u8)(phy_blk >> 8); ms_erase_block() 1765 data[3] = (u8)phy_blk; ms_erase_block() 1796 ms_set_bad_block(chip, phy_blk); ms_erase_block() 1832 static int ms_init_page(struct rtsx_chip *chip, u16 phy_blk, u16 log_blk, ms_init_page() argument 1852 retval = ms_write_extra_data(chip, phy_blk, i, ms_init_page() 2486 int seg_no, u16 log_off, u16 phy_blk) ms_set_l2p_tbl() 2496 segment->l2p_table[log_off] = phy_blk; ms_set_l2p_tbl() 2499 static void ms_set_unused_block(struct rtsx_chip *chip, u16 phy_blk) ms_set_unused_block() argument 2505 seg_no = (int)phy_blk >> 9; ms_set_unused_block() 2508 segment->free_table[segment->set_index++] = phy_blk; ms_set_unused_block() 2519 u16 phy_blk; ms_get_unused_block() local 2526 phy_blk = segment->free_table[segment->get_index]; ms_get_unused_block() 2533 return phy_blk; ms_get_unused_block() 2541 static int ms_arbitrate_l2p(struct rtsx_chip *chip, u16 phy_blk, ms_arbitrate_l2p() argument 2549 seg_no = (int)phy_blk >> 9; ms_arbitrate_l2p() 2559 segment->l2p_table[log_off] = phy_blk; ms_arbitrate_l2p() 2562 ms_erase_block(chip, phy_blk); ms_arbitrate_l2p() 2564 ms_set_unused_block(chip, phy_blk); ms_arbitrate_l2p() 2567 if (phy_blk < tmp_blk) { ms_arbitrate_l2p() 2569 ms_erase_block(chip, phy_blk); ms_arbitrate_l2p() 2571 ms_set_unused_block(chip, phy_blk); ms_arbitrate_l2p() 2577 segment->l2p_table[log_off] = phy_blk; ms_arbitrate_l2p() 2590 u16 start, end, phy_blk, log_blk, tmp_blk, idx; ms_build_l2p_tbl() local 2642 for (phy_blk = start; phy_blk < end; phy_blk++) { ms_build_l2p_tbl() 2646 if (phy_blk == segment->defect_list[i]) { ms_build_l2p_tbl() 2657 retval = ms_read_extra_data(chip, phy_blk, 0, ms_build_l2p_tbl() 2661 ms_set_bad_block(chip, phy_blk); ms_build_l2p_tbl() 2668 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2688 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2692 ms_set_unused_block(chip, phy_blk); ms_build_l2p_tbl() 2699 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2703 ms_set_unused_block(chip, phy_blk); ms_build_l2p_tbl() 2710 segment->l2p_table[idx] = phy_blk; ms_build_l2p_tbl() 2722 (void)ms_arbitrate_l2p(chip, phy_blk, ms_build_l2p_tbl() 2748 phy_blk = ms_get_unused_block(chip, seg_no); ms_build_l2p_tbl() 2749 if (phy_blk == 0xFFFF) { ms_build_l2p_tbl() 2753 retval = ms_init_page(chip, phy_blk, log_blk, 0, 1); ms_build_l2p_tbl() 2759 segment->l2p_table[idx] = phy_blk; ms_build_l2p_tbl() 2784 phy_blk = ms_get_unused_block(chip, 0); ms_build_l2p_tbl() 2785 retval = ms_copy_page(chip, tmp_blk, phy_blk, ms_build_l2p_tbl() 2792 segment->l2p_table[log_blk] = phy_blk; ms_build_l2p_tbl() 3323 static int ms_read_multiple_pages(struct rtsx_chip *chip, u16 phy_blk, ms_read_multiple_pages() argument 3333 retval = ms_read_extra_data(chip, phy_blk, start_page, ms_read_multiple_pages() 3356 data[2] = (u8)(phy_blk >> 8); ms_read_multiple_pages() 3357 data[3] = (u8)phy_blk; ms_read_multiple_pages() 3409 ms_write_extra_data(chip, phy_blk, ms_read_multiple_pages() 2485 ms_set_l2p_tbl(struct rtsx_chip *chip, int seg_no, u16 log_off, u16 phy_blk) ms_set_l2p_tbl() argument
|