Lines Matching +full:speed +full:- +full:set

2   SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
42 * ixgbe_init_ops_vf - Initialize the pointers for vf
45 * This will assign function pointers, adapter-specific functions can
47 * their own adapter-specific function pointers.
55 hw->mac.ops.init_hw = ixgbe_init_hw_vf; in ixgbe_init_ops_vf()
56 hw->mac.ops.reset_hw = ixgbe_reset_hw_vf; in ixgbe_init_ops_vf()
57 hw->mac.ops.start_hw = ixgbe_start_hw_vf; in ixgbe_init_ops_vf()
59 hw->mac.ops.clear_hw_cntrs = NULL; in ixgbe_init_ops_vf()
60 hw->mac.ops.get_media_type = NULL; in ixgbe_init_ops_vf()
61 hw->mac.ops.get_mac_addr = ixgbe_get_mac_addr_vf; in ixgbe_init_ops_vf()
62 hw->mac.ops.stop_adapter = ixgbe_stop_adapter_vf; in ixgbe_init_ops_vf()
63 hw->mac.ops.get_bus_info = NULL; in ixgbe_init_ops_vf()
64 hw->mac.ops.negotiate_api_version = ixgbevf_negotiate_api_version; in ixgbe_init_ops_vf()
67 hw->mac.ops.setup_link = ixgbe_setup_mac_link_vf; in ixgbe_init_ops_vf()
68 hw->mac.ops.check_link = ixgbe_check_mac_link_vf; in ixgbe_init_ops_vf()
69 hw->mac.ops.get_link_capabilities = NULL; in ixgbe_init_ops_vf()
72 hw->mac.ops.set_rar = ixgbe_set_rar_vf; in ixgbe_init_ops_vf()
73 hw->mac.ops.set_uc_addr = ixgbevf_set_uc_addr_vf; in ixgbe_init_ops_vf()
74 hw->mac.ops.init_rx_addrs = NULL; in ixgbe_init_ops_vf()
75 hw->mac.ops.update_mc_addr_list = ixgbe_update_mc_addr_list_vf; in ixgbe_init_ops_vf()
76 hw->mac.ops.update_xcast_mode = ixgbevf_update_xcast_mode; in ixgbe_init_ops_vf()
77 hw->mac.ops.get_link_state = ixgbe_get_link_state_vf; in ixgbe_init_ops_vf()
78 hw->mac.ops.enable_mc = NULL; in ixgbe_init_ops_vf()
79 hw->mac.ops.disable_mc = NULL; in ixgbe_init_ops_vf()
80 hw->mac.ops.clear_vfta = NULL; in ixgbe_init_ops_vf()
81 hw->mac.ops.set_vfta = ixgbe_set_vfta_vf; in ixgbe_init_ops_vf()
82 hw->mac.ops.set_rlpml = ixgbevf_rlpml_set_vf; in ixgbe_init_ops_vf()
84 hw->mac.max_tx_queues = 1; in ixgbe_init_ops_vf()
85 hw->mac.max_rx_queues = 1; in ixgbe_init_ops_vf()
88 hw->mbx.ops[i].init_params = ixgbe_init_mbx_params_vf; in ixgbe_init_ops_vf()
93 /* ixgbe_virt_clr_reg - Set register to default (power on) state.
137 * ixgbe_start_hw_vf - Prepare hardware for Tx/Rx
142 * table, VLAN filter table, calls routine to set up link and flow control
148 hw->adapter_stopped = false; in ixgbe_start_hw_vf()
154 * ixgbe_init_hw_vf - virtual function hardware initialization
162 s32 status = hw->mac.ops.start_hw(hw); in ixgbe_init_hw_vf()
164 hw->mac.ops.get_mac_addr(hw, hw->mac.addr); in ixgbe_init_hw_vf()
170 * ixgbe_reset_hw_vf - Performs hardware reset
178 struct ixgbe_mbx_info *mbx = &hw->mbx; in ixgbe_reset_hw_vf()
187 hw->mac.ops.stop_adapter(hw); in ixgbe_reset_hw_vf()
190 hw->api_version = ixgbe_mbox_api_10; in ixgbe_reset_hw_vf()
201 while (!mbx->ops[0].check_for_rst(hw, 0) && timeout) { in ixgbe_reset_hw_vf()
202 timeout--; in ixgbe_reset_hw_vf()
213 mbx->timeout = IXGBE_VF_MBX_INIT_TIMEOUT; in ixgbe_reset_hw_vf()
221 * set our "perm_addr" based on info provided by PF in ixgbe_reset_hw_vf()
222 * also set up the mc_filter_type which is piggy backed in ixgbe_reset_hw_vf()
235 memcpy(hw->mac.perm_addr, addr, IXGBE_ETH_LENGTH_OF_ADDRESS); in ixgbe_reset_hw_vf()
237 hw->mac.mc_filter_type = msgbuf[IXGBE_VF_MC_TYPE_WORD]; in ixgbe_reset_hw_vf()
243 * ixgbe_stop_adapter_vf - Generic stop Tx/Rx units
257 * Set the adapter_stopped flag so other driver functions stop touching in ixgbe_stop_adapter_vf()
260 hw->adapter_stopped = true; in ixgbe_stop_adapter_vf()
269 for (i = 0; i < hw->mac.max_tx_queues; i++) in ixgbe_stop_adapter_vf()
273 for (i = 0; i < hw->mac.max_rx_queues; i++) { in ixgbe_stop_adapter_vf()
289 * ixgbe_mta_vector - Determines bit-vector in multicast table to set
294 * bit-vector to set in the multicast table. The hardware uses 12 bits, from
295 * incoming rx multicast addresses, to determine the bit-vector to check in
296 * the MTA. Which of the 4 combination, of 12-bits, the hardware uses is set
297 * by the MO field of the MCSTCTRL. The MO field is set during initialization
304 switch (hw->mac.mc_filter_type) { in ixgbe_mta_vector()
318 DEBUGOUT("MC filter type param set incorrectly\n"); in ixgbe_mta_vector()
323 /* vector can only be 12-bits or boundary will be exceeded */ in ixgbe_mta_vector()
340 * ixgbe_set_rar_vf - set device MAC address
344 * @vmdq: VMDq "set" or "pool" index
345 * @enable_addr: set flag that address is active
365 ixgbe_get_mac_addr_vf(hw, hw->mac.addr); in ixgbe_set_rar_vf()
373 * ixgbe_update_mc_addr_list_vf - Update Multicast addresses
401 * It would be unusual for a server to request that many multi-cast in ixgbe_update_mc_addr_list_vf()
421 * ixgbevf_update_xcast_mode - Update Multicast mode
432 switch (hw->api_version) { in ixgbevf_update_xcast_mode()
459 * ixgbe_get_link_state_vf - Get VF link state from PF
487 * ixgbe_set_vfta_vf - Set/Unset vlan filter table address
491 * @vlan_on: if true then set bit, else clear bit
516 * ixgbe_get_num_of_tx_queues_vf - Get number of TX queues
528 * ixgbe_get_num_of_rx_queues_vf - Get number of RX queues
540 * ixgbe_get_mac_addr_vf - Read device MAC address
549 mac_addr[i] = hw->mac.perm_addr[i]; in ixgbe_get_mac_addr_vf()
585 * ixgbe_setup_mac_link_vf - Setup MAC link settings
587 * @speed: new link speed
590 * Set the link speed in the AUTOC register and restarts link.
592 s32 ixgbe_setup_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed speed, in ixgbe_setup_mac_link_vf() argument
595 UNREFERENCED_3PARAMETER(hw, speed, autoneg_wait_to_complete); in ixgbe_setup_mac_link_vf()
600 * ixgbe_check_mac_link_vf - Get link/speed status
602 * @speed: pointer to link speed
606 * Reads the links register to determine if link is up and the current speed
608 s32 ixgbe_check_mac_link_vf(struct ixgbe_hw *hw, ixgbe_link_speed *speed, in ixgbe_check_mac_link_vf() argument
611 struct ixgbe_mbx_info *mbx = &hw->mbx; in ixgbe_check_mac_link_vf()
612 struct ixgbe_mac_info *mac = &hw->mac; in ixgbe_check_mac_link_vf()
620 if (!mbx->ops[0].check_for_rst(hw, 0) || !mbx->timeout) in ixgbe_check_mac_link_vf()
621 mac->get_link_status = true; in ixgbe_check_mac_link_vf()
623 if (!mac->get_link_status) in ixgbe_check_mac_link_vf()
634 if (mac->type == ixgbe_mac_82599_vf) { in ixgbe_check_mac_link_vf()
648 *speed = IXGBE_LINK_SPEED_10GB_FULL; in ixgbe_check_mac_link_vf()
649 if (hw->mac.type >= ixgbe_mac_X550_vf) { in ixgbe_check_mac_link_vf()
651 *speed = IXGBE_LINK_SPEED_2_5GB_FULL; in ixgbe_check_mac_link_vf()
655 *speed = IXGBE_LINK_SPEED_1GB_FULL; in ixgbe_check_mac_link_vf()
658 *speed = IXGBE_LINK_SPEED_100_FULL; in ixgbe_check_mac_link_vf()
659 if (hw->mac.type == ixgbe_mac_X550_vf || in ixgbe_check_mac_link_vf()
660 hw->mac.type == ixgbe_mac_E610_vf) { in ixgbe_check_mac_link_vf()
662 *speed = IXGBE_LINK_SPEED_5GB_FULL; in ixgbe_check_mac_link_vf()
666 *speed = IXGBE_LINK_SPEED_UNKNOWN; in ixgbe_check_mac_link_vf()
668 if (hw->mac.type >= ixgbe_mac_X550_vf) in ixgbe_check_mac_link_vf()
669 *speed = IXGBE_LINK_SPEED_10_FULL; in ixgbe_check_mac_link_vf()
672 *speed = IXGBE_LINK_SPEED_UNKNOWN; in ixgbe_check_mac_link_vf()
679 if (hw->api_version >= ixgbe_mbox_api_15) in ixgbe_check_mac_link_vf()
680 mac->get_link_status = false; in ixgbe_check_mac_link_vf()
692 if (!mbx->timeout) { in ixgbe_check_mac_link_vf()
700 mac->get_link_status = false; in ixgbe_check_mac_link_vf()
703 *link_up = !mac->get_link_status; in ixgbe_check_mac_link_vf()
708 * ixgbevf_rlpml_set_vf - Set the maximum receive packet length
731 * ixgbevf_negotiate_api_version - Negotiate supported API version
751 hw->api_version = api; in ixgbevf_negotiate_api_version()
768 switch (hw->api_version) { in ixgbevf_get_queues()
795 hw->mac.max_tx_queues = msg[IXGBE_VF_TX_QUEUES]; in ixgbevf_get_queues()
796 if (hw->mac.max_tx_queues == 0 || in ixgbevf_get_queues()
797 hw->mac.max_tx_queues > IXGBE_VF_MAX_TX_QUEUES) in ixgbevf_get_queues()
798 hw->mac.max_tx_queues = IXGBE_VF_MAX_TX_QUEUES; in ixgbevf_get_queues()
800 hw->mac.max_rx_queues = msg[IXGBE_VF_RX_QUEUES]; in ixgbevf_get_queues()
801 if (hw->mac.max_rx_queues == 0 || in ixgbevf_get_queues()
802 hw->mac.max_rx_queues > IXGBE_VF_MAX_RX_QUEUES) in ixgbevf_get_queues()
803 hw->mac.max_rx_queues = IXGBE_VF_MAX_RX_QUEUES; in ixgbevf_get_queues()
807 if (*num_tcs > hw->mac.max_rx_queues) in ixgbevf_get_queues()
811 /* default to queue 0 on out-of-bounds queue number */ in ixgbevf_get_queues()
812 if (*default_tc >= hw->mac.max_tx_queues) in ixgbevf_get_queues()