Searched refs:phy_blk (Results 1 - 3 of 3) sorted by relevance

/linux-4.1.27/drivers/staging/rts5208/
H A Dxd.c35 static int xd_init_page(struct rtsx_chip *chip, u32 phy_blk, u16 logoff,
916 static void xd_set_unused_block(struct rtsx_chip *chip, u32 phy_blk) xd_set_unused_block() argument
922 zone_no = (int)phy_blk >> 10; xd_set_unused_block()
945 zone->free_table[zone->set_index++] = (u16) (phy_blk & 0x3ff); xd_set_unused_block()
955 u32 phy_blk; xd_get_unused_block() local
979 phy_blk = zone->free_table[zone->get_index]; xd_get_unused_block()
985 phy_blk += ((u32)(zone_no) << 10); xd_get_unused_block()
986 return phy_blk; xd_get_unused_block()
1007 u32 phy_blk = 0; xd_get_l2p_tbl() local
1024 phy_blk = xd_get_unused_block(chip, zone_no); xd_get_l2p_tbl()
1025 if (phy_blk == BLK_NOT_FOUND) { xd_get_l2p_tbl()
1030 retval = xd_init_page(chip, phy_blk, log_off, xd_get_l2p_tbl()
1040 xd_set_l2p_tbl(chip, zone_no, log_off, (u16)(phy_blk & 0x3FF)); xd_get_l2p_tbl()
1041 return phy_blk; xd_get_l2p_tbl()
1083 static int xd_mark_bad_block(struct rtsx_chip *chip, u32 phy_blk) xd_mark_bad_block() argument
1090 dev_dbg(rtsx_dev(chip), "mark block 0x%x as bad block\n", phy_blk); xd_mark_bad_block() local
1092 if (phy_blk == BLK_NOT_FOUND) { xd_mark_bad_block()
1110 page_addr = phy_blk << xd_card->block_shift; xd_mark_bad_block()
1137 static int xd_init_page(struct rtsx_chip *chip, u32 phy_blk, xd_init_page() argument
1145 dev_dbg(rtsx_dev(chip), "Init block 0x%x\n", phy_blk); xd_init_page() local
1151 if (phy_blk == BLK_NOT_FOUND) { xd_init_page()
1164 page_addr = (phy_blk << xd_card->block_shift) + start_page; xd_init_page()
1184 xd_mark_bad_block(chip, phy_blk); xd_init_page()
1348 static int xd_erase_block(struct rtsx_chip *chip, u32 phy_blk) xd_erase_block() argument
1355 if (phy_blk == BLK_NOT_FOUND) { xd_erase_block()
1360 page_addr = phy_blk << xd_card->block_shift; xd_erase_block()
1378 xd_mark_bad_block(chip, phy_blk); xd_erase_block()
1395 xd_mark_bad_block(chip, phy_blk); xd_erase_block()
1404 xd_mark_bad_block(chip, phy_blk); xd_erase_block()
1625 static int xd_read_multiple_pages(struct rtsx_chip *chip, u32 phy_blk, xd_read_multiple_pages() argument
1645 if ((phy_blk & 0x3FF) == 0x3FF) { xd_read_multiple_pages()
1661 page_addr = (phy_blk << xd_card->block_shift) + start_page; xd_read_multiple_pages()
1738 retval = xd_copy_page(chip, phy_blk, new_blk, 0, xd_read_multiple_pages()
1753 xd_erase_block(chip, phy_blk); xd_read_multiple_pages()
1754 xd_mark_bad_block(chip, phy_blk); xd_read_multiple_pages()
H A Dms.c1672 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
/linux-4.1.27/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_link.c12903 struct bnx2x_phy *phy_blk[PORT_MAX]; bnx2x_8073_common_init_phy() local
12959 phy_blk[PORT_0] = &(phy[PORT_1]); bnx2x_8073_common_init_phy()
12960 phy_blk[PORT_1] = &(phy[PORT_0]); bnx2x_8073_common_init_phy()
12962 phy_blk[PORT_0] = &(phy[PORT_0]); bnx2x_8073_common_init_phy()
12963 phy_blk[PORT_1] = &(phy[PORT_1]); bnx2x_8073_common_init_phy()
12974 phy_blk[port]->addr); bnx2x_8073_common_init_phy()
12975 if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bnx2x_8073_common_init_phy()
12980 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
12985 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13000 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13004 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13010 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13013 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13126 struct bnx2x_phy *phy_blk[PORT_MAX]; bnx2x_8727_common_init_phy() local
13191 phy_blk[PORT_0] = &(phy[PORT_1]); bnx2x_8727_common_init_phy()
13192 phy_blk[PORT_1] = &(phy[PORT_0]); bnx2x_8727_common_init_phy()
13194 phy_blk[PORT_0] = &(phy[PORT_0]); bnx2x_8727_common_init_phy()
13195 phy_blk[PORT_1] = &(phy[PORT_1]); bnx2x_8727_common_init_phy()
13204 phy_blk[port]->addr); bnx2x_8727_common_init_phy()
13205 if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bnx2x_8727_common_init_phy()
13209 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8727_common_init_phy()

Completed in 270 milliseconds