* 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
| 2413 | * subsystem_vendor_id, and revision_id |
| 2414 | **/ |
| 2415 | s32 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 |
no test coverage detected