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

Function ixgbe_init_shared_code

dpdk/drivers/net/ixgbe/base/ixgbe_api.c:55–99  ·  view source on GitHub ↗

* ixgbe_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 ixgbe_hw structure should be * memset to 0 prior to calling this function. The following fields in * hw struct

Source from the content-addressed store, hash-verified

53 * subsystem_vendor_id, and revision_id
54 **/
55s32 ixgbe_init_shared_code(struct ixgbe_hw *hw)
56{
57 s32 status;
58
59 DEBUGFUNC("ixgbe_init_shared_code");
60
61 /*
62 * Set the mac type
63 */
64 ixgbe_set_mac_type(hw);
65
66 switch (hw->mac.type) {
67 case ixgbe_mac_82598EB:
68 status = ixgbe_init_ops_82598(hw);
69 break;
70 case ixgbe_mac_82599EB:
71 status = ixgbe_init_ops_82599(hw);
72 break;
73 case ixgbe_mac_X540:
74 status = ixgbe_init_ops_X540(hw);
75 break;
76 case ixgbe_mac_X550:
77 status = ixgbe_init_ops_X550(hw);
78 break;
79 case ixgbe_mac_X550EM_x:
80 status = ixgbe_init_ops_X550EM_x(hw);
81 break;
82 case ixgbe_mac_X550EM_a:
83 status = ixgbe_init_ops_X550EM_a(hw);
84 break;
85 case ixgbe_mac_82599_vf:
86 case ixgbe_mac_X540_vf:
87 case ixgbe_mac_X550_vf:
88 case ixgbe_mac_X550EM_x_vf:
89 case ixgbe_mac_X550EM_a_vf:
90 status = ixgbe_init_ops_vf(hw);
91 break;
92 default:
93 status = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
94 break;
95 }
96 hw->mac.max_link_up_time = IXGBE_LINK_UP_TIME;
97
98 return status;
99}
100
101/**
102 * ixgbe_set_mac_type - Sets MAC type

Callers 3

eth_ixgbe_dev_initFunction · 0.85
eth_ixgbevf_dev_initFunction · 0.85

Calls 8

ixgbe_set_mac_typeFunction · 0.85
ixgbe_init_ops_82598Function · 0.85
ixgbe_init_ops_82599Function · 0.85
ixgbe_init_ops_X540Function · 0.85
ixgbe_init_ops_X550Function · 0.85
ixgbe_init_ops_X550EM_xFunction · 0.85
ixgbe_init_ops_X550EM_aFunction · 0.85
ixgbe_init_ops_vfFunction · 0.85

Tested by

no test coverage detected