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

/linux-4.4.14/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()
1394 xd_mark_bad_block(chip, phy_blk); xd_erase_block()
1403 xd_mark_bad_block(chip, phy_blk); xd_erase_block()
1624 static int xd_read_multiple_pages(struct rtsx_chip *chip, u32 phy_blk, xd_read_multiple_pages() argument
1644 if ((phy_blk & 0x3FF) == 0x3FF) { xd_read_multiple_pages()
1660 page_addr = (phy_blk << xd_card->block_shift) + start_page; xd_read_multiple_pages()
1737 retval = xd_copy_page(chip, phy_blk, new_blk, 0, xd_read_multiple_pages()
1752 xd_erase_block(chip, phy_blk); xd_read_multiple_pages()
1753 xd_mark_bad_block(chip, phy_blk); xd_read_multiple_pages()
H A Dms.c1671 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
/linux-4.4.14/drivers/net/ethernet/broadcom/bnx2x/
H A Dbnx2x_link.c13071 struct bnx2x_phy *phy_blk[PORT_MAX]; bnx2x_8073_common_init_phy() local
13127 phy_blk[PORT_0] = &(phy[PORT_1]); bnx2x_8073_common_init_phy()
13128 phy_blk[PORT_1] = &(phy[PORT_0]); bnx2x_8073_common_init_phy()
13130 phy_blk[PORT_0] = &(phy[PORT_0]); bnx2x_8073_common_init_phy()
13131 phy_blk[PORT_1] = &(phy[PORT_1]); bnx2x_8073_common_init_phy()
13142 phy_blk[port]->addr); bnx2x_8073_common_init_phy()
13143 if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13148 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13153 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13168 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13172 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13178 bnx2x_cl45_read(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13181 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8073_common_init_phy()
13294 struct bnx2x_phy *phy_blk[PORT_MAX]; bnx2x_8727_common_init_phy() local
13359 phy_blk[PORT_0] = &(phy[PORT_1]); bnx2x_8727_common_init_phy()
13360 phy_blk[PORT_1] = &(phy[PORT_0]); bnx2x_8727_common_init_phy()
13362 phy_blk[PORT_0] = &(phy[PORT_0]); bnx2x_8727_common_init_phy()
13363 phy_blk[PORT_1] = &(phy[PORT_1]); bnx2x_8727_common_init_phy()
13372 phy_blk[port]->addr); bnx2x_8727_common_init_phy()
13373 if (bnx2x_8073_8727_external_rom_boot(bp, phy_blk[port], bnx2x_8727_common_init_phy()
13377 bnx2x_cl45_write(bp, phy_blk[port], bnx2x_8727_common_init_phy()

Completed in 143 milliseconds