MCPcopy Create free account
hub / github.com/F-Stack/f-stack / txgbe_init_shared_code

Function txgbe_init_shared_code

dpdk/drivers/net/txgbe/base/txgbe_hw.c:2415–2441  ·  view source on GitHub ↗

* txgbe_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * * This will assign function pointers and assign the MAC type and PHY code. * Does not touch the hardware. This function must be called prior to any * other function in the shared code. The txgbe_hw structure should be * memset to 0 prior to calling this function. The following fields in * hw

Source from the content-addressed store, hash-verified

2413 * subsystem_vendor_id, and revision_id
2414 **/
2415s32 txgbe_init_shared_code(struct txgbe_hw *hw)
2416{
2417 s32 status;
2418
2419 /*
2420 * Set the mac type
2421 */
2422 txgbe_set_mac_type(hw);
2423
2424 txgbe_init_ops_dummy(hw);
2425 switch (hw->mac.type) {
2426 case txgbe_mac_raptor:
2427 status = txgbe_init_ops_pf(hw);
2428 break;
2429 case txgbe_mac_raptor_vf:
2430 status = txgbe_init_ops_vf(hw);
2431 break;
2432 default:
2433 status = TXGBE_ERR_DEVICE_NOT_SUPPORTED;
2434 break;
2435 }
2436 hw->mac.max_link_up_time = TXGBE_LINK_UP_TIME;
2437
2438 hw->bus.set_lan_id(hw);
2439
2440 return status;
2441}
2442
2443/**
2444 * txgbe_set_mac_type - Sets MAC type

Callers 2

eth_txgbevf_dev_initFunction · 0.85
eth_txgbe_dev_initFunction · 0.85

Calls 4

txgbe_set_mac_typeFunction · 0.85
txgbe_init_ops_dummyFunction · 0.85
txgbe_init_ops_pfFunction · 0.85
txgbe_init_ops_vfFunction · 0.85

Tested by

no test coverage detected