Lines Matching +full:mac +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2013 - 2019 Intel Corporation. */
8 * fm10k_stop_hw_vf - Stop Tx/Rx units
14 u8 *perm_addr = hw->mac.perm_addr; in fm10k_stop_hw_vf()
36 tdlen = hw->mac.itr_scale << FM10K_TDLEN_ITR_SCALE_SHIFT; in fm10k_stop_hw_vf()
41 for (i = 0; i < hw->mac.max_queues; i++) { in fm10k_stop_hw_vf()
46 /* Restore ITR scale in software-defined mechanism in TDLEN in fm10k_stop_hw_vf()
58 * fm10k_reset_hw_vf - VF hardware reset
71 hw->mac.reset_while_pending++; in fm10k_reset_hw_vf()
91 * fm10k_init_hw_vf - VF hardware initialization
127 hw->mac.max_queues = i; in fm10k_init_hw_vf()
130 hw->mac.default_vid = FIELD_GET(FM10K_TXQCTL_VID_MASK, in fm10k_init_hw_vf()
136 hw->mac.itr_scale = FIELD_GET(FM10K_TDLEN_ITR_SCALE_MASK, in fm10k_init_hw_vf()
142 hw->mac.max_queues = 0; in fm10k_init_hw_vf()
158 * fm10k_update_vlan_vf - Update status of VLAN ID in VLAN filter table
169 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_vlan_vf()
189 return mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_vlan_vf()
193 * fm10k_msg_mac_vlan_vf - Read device MAC address from mailbox message
198 * This function should determine the MAC address for the VF
207 /* record MAC address requested */ in fm10k_msg_mac_vlan_vf()
214 ether_addr_copy(hw->mac.perm_addr, perm_addr); in fm10k_msg_mac_vlan_vf()
215 hw->mac.default_vid = vid & (FM10K_VLAN_TABLE_VID_MAX - 1); in fm10k_msg_mac_vlan_vf()
216 hw->mac.vlan_override = !!(vid & FM10K_VLAN_OVERRIDE); in fm10k_msg_mac_vlan_vf()
222 * fm10k_read_mac_addr_vf - Read device MAC address
225 * This function should determine the MAC address for the VF
252 ether_addr_copy(hw->mac.perm_addr, perm_addr); in fm10k_read_mac_addr_vf()
253 ether_addr_copy(hw->mac.addr, perm_addr); in fm10k_read_mac_addr_vf()
259 * fm10k_update_uc_addr_vf - Update device unicast addresses
262 * @mac: MAC address to add/remove from table
265 * @flags: flags field to indicate add and secure - unused
267 * This function is used to add or remove unicast MAC addresses for
272 const u8 *mac, u16 vid, bool add, in fm10k_update_uc_addr_vf() argument
275 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_uc_addr_vf()
282 /* verify MAC address is valid */ in fm10k_update_uc_addr_vf()
283 if (!is_valid_ether_addr(mac)) in fm10k_update_uc_addr_vf()
286 /* verify we are not locked down on the MAC address */ in fm10k_update_uc_addr_vf()
287 if (is_valid_ether_addr(hw->mac.perm_addr) && in fm10k_update_uc_addr_vf()
288 !ether_addr_equal(hw->mac.perm_addr, mac)) in fm10k_update_uc_addr_vf()
297 fm10k_tlv_attr_put_mac_vlan(msg, FM10K_MAC_VLAN_MSG_MAC, mac, vid); in fm10k_update_uc_addr_vf()
300 return mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_uc_addr_vf()
304 * fm10k_update_mc_addr_vf - Update device multicast addresses
307 * @mac: MAC address to add/remove from table
311 * This function is used to add or remove multicast MAC addresses for
316 const u8 *mac, u16 vid, bool add) in fm10k_update_mc_addr_vf() argument
318 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_mc_addr_vf()
326 if (!is_multicast_ether_addr(mac)) in fm10k_update_mc_addr_vf()
336 mac, vid); in fm10k_update_mc_addr_vf()
339 return mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_mc_addr_vf()
343 * fm10k_update_int_moderator_vf - Request update of interrupt moderator list
346 * This function will issue a request to the PF to rescan our MSI-X table
351 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_int_moderator_vf()
354 /* generate MSI-X request */ in fm10k_update_int_moderator_vf()
358 mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_int_moderator_vf()
370 * fm10k_msg_lport_state_vf - Message handler for lport_state message from PF
381 hw->mac.dglort_map = !results[FM10K_LPORT_STATE_MSG_READY] ? in fm10k_msg_lport_state_vf()
388 * fm10k_update_lport_state_vf - Update device state in lower device
391 * @count: number of logical ports to enable - unused (always 1)
402 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_lport_state_vf()
406 hw->mac.dglort_map = FM10K_DGLORTMAP_NONE; in fm10k_update_lport_state_vf()
414 return mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_lport_state_vf()
418 * fm10k_update_xcast_mode_vf - Request update of multicast mode
421 * @mode: integer value indicating mode being requested
423 * This function will attempt to request a higher mode for the port
425 * promiscuous mode of operation.
428 u16 __always_unused glort, u8 mode) in fm10k_update_xcast_mode_vf() argument
430 struct fm10k_mbx_info *mbx = &hw->mbx; in fm10k_update_xcast_mode_vf()
433 if (mode > FM10K_XCAST_MODE_NONE) in fm10k_update_xcast_mode_vf()
436 /* generate message requesting to change xcast mode */ in fm10k_update_xcast_mode_vf()
438 fm10k_tlv_attr_put_u8(msg, FM10K_LPORT_STATE_MSG_XCAST_MODE, mode); in fm10k_update_xcast_mode_vf()
441 return mbx->ops.enqueue_tx(hw, mbx, msg); in fm10k_update_xcast_mode_vf()
445 * fm10k_update_hw_stats_vf - Updates hardware related statistics of VF
454 fm10k_update_hw_stats_q(hw, stats->q, 0, hw->mac.max_queues); in fm10k_update_hw_stats_vf()
458 * fm10k_rebind_hw_stats_vf - Resets base for hardware statistics of VF
468 fm10k_unbind_hw_stats_q(stats->q, 0, hw->mac.max_queues); in fm10k_rebind_hw_stats_vf()
475 * fm10k_configure_dglort_map_vf - Configures GLORT entry and queues
525 return fm10k_pfvf_mbx_init(hw, &hw->mbx, fm10k_msg_data_vf, 0); in fm10k_get_invariants_vf()
529 .mac = fm10k_mac_vf,