H A D | ms.c | 1671 static int ms_set_bad_block(struct rtsx_chip *chip, u16 phy_blk) ms_set_bad_block() argument 1677 retval = ms_read_extra_data(chip, phy_blk, 0, extra, MS_EXTRA_SIZE); ms_set_bad_block() 1698 data[2] = (u8)(phy_blk >> 8); ms_set_bad_block() 1699 data[3] = (u8)phy_blk; ms_set_bad_block() 1742 static int ms_erase_block(struct rtsx_chip *chip, u16 phy_blk) ms_erase_block() argument 1763 data[2] = (u8)(phy_blk >> 8); ms_erase_block() 1764 data[3] = (u8)phy_blk; ms_erase_block() 1795 ms_set_bad_block(chip, phy_blk); ms_erase_block() 1831 static int ms_init_page(struct rtsx_chip *chip, u16 phy_blk, u16 log_blk, ms_init_page() argument 1851 retval = ms_write_extra_data(chip, phy_blk, i, ms_init_page() 2485 int seg_no, u16 log_off, u16 phy_blk) ms_set_l2p_tbl() 2495 segment->l2p_table[log_off] = phy_blk; ms_set_l2p_tbl() 2498 static void ms_set_unused_block(struct rtsx_chip *chip, u16 phy_blk) ms_set_unused_block() argument 2504 seg_no = (int)phy_blk >> 9; ms_set_unused_block() 2507 segment->free_table[segment->set_index++] = phy_blk; ms_set_unused_block() 2518 u16 phy_blk; ms_get_unused_block() local 2525 phy_blk = segment->free_table[segment->get_index]; ms_get_unused_block() 2532 return phy_blk; ms_get_unused_block() 2540 static int ms_arbitrate_l2p(struct rtsx_chip *chip, u16 phy_blk, ms_arbitrate_l2p() argument 2548 seg_no = (int)phy_blk >> 9; ms_arbitrate_l2p() 2558 segment->l2p_table[log_off] = phy_blk; ms_arbitrate_l2p() 2561 ms_erase_block(chip, phy_blk); ms_arbitrate_l2p() 2563 ms_set_unused_block(chip, phy_blk); ms_arbitrate_l2p() 2566 if (phy_blk < tmp_blk) { ms_arbitrate_l2p() 2568 ms_erase_block(chip, phy_blk); ms_arbitrate_l2p() 2570 ms_set_unused_block(chip, phy_blk); ms_arbitrate_l2p() 2576 segment->l2p_table[log_off] = phy_blk; ms_arbitrate_l2p() 2589 u16 start, end, phy_blk, log_blk, tmp_blk, idx; ms_build_l2p_tbl() local 2641 for (phy_blk = start; phy_blk < end; phy_blk++) { ms_build_l2p_tbl() 2645 if (phy_blk == segment->defect_list[i]) { ms_build_l2p_tbl() 2656 retval = ms_read_extra_data(chip, phy_blk, 0, ms_build_l2p_tbl() 2660 ms_set_bad_block(chip, phy_blk); ms_build_l2p_tbl() 2667 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2687 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2691 ms_set_unused_block(chip, phy_blk); ms_build_l2p_tbl() 2698 retval = ms_erase_block(chip, phy_blk); ms_build_l2p_tbl() 2702 ms_set_unused_block(chip, phy_blk); ms_build_l2p_tbl() 2709 segment->l2p_table[idx] = phy_blk; ms_build_l2p_tbl() 2721 (void)ms_arbitrate_l2p(chip, phy_blk, ms_build_l2p_tbl() 2747 phy_blk = ms_get_unused_block(chip, seg_no); ms_build_l2p_tbl() 2748 if (phy_blk == 0xFFFF) { ms_build_l2p_tbl() 2752 retval = ms_init_page(chip, phy_blk, log_blk, 0, 1); ms_build_l2p_tbl() 2758 segment->l2p_table[idx] = phy_blk; ms_build_l2p_tbl() 2783 phy_blk = ms_get_unused_block(chip, 0); ms_build_l2p_tbl() 2784 retval = ms_copy_page(chip, tmp_blk, phy_blk, ms_build_l2p_tbl() 2791 segment->l2p_table[log_blk] = phy_blk; ms_build_l2p_tbl() 3322 static int ms_read_multiple_pages(struct rtsx_chip *chip, u16 phy_blk, ms_read_multiple_pages() argument 3332 retval = ms_read_extra_data(chip, phy_blk, start_page, ms_read_multiple_pages() 3355 data[2] = (u8)(phy_blk >> 8); ms_read_multiple_pages() 3356 data[3] = (u8)phy_blk; ms_read_multiple_pages() 3408 ms_write_extra_data(chip, phy_blk, ms_read_multiple_pages() 2484 ms_set_l2p_tbl(struct rtsx_chip *chip, int seg_no, u16 log_off, u16 phy_blk) ms_set_l2p_tbl() argument
|