Lines Matching +full:mac +full:- +full:address

2   SPDX-License-Identifier: BSD-3-Clause
4 Copyright (c) 2001-2020, Intel Corporation
56 * e1000_init_phy_params_vf - Inits PHY params
59 * Doesn't do much - there's no PHY available to the VF.
64 hw->phy.type = e1000_phy_vf; in e1000_init_phy_params_vf()
65 hw->phy.ops.acquire = e1000_acquire_vf; in e1000_init_phy_params_vf()
66 hw->phy.ops.release = e1000_release_vf; in e1000_init_phy_params_vf()
72 * e1000_init_nvm_params_vf - Inits NVM params
75 * Doesn't do much - there's no NVM available to the VF.
80 hw->nvm.type = e1000_nvm_none; in e1000_init_nvm_params_vf()
81 hw->nvm.ops.acquire = e1000_acquire_vf; in e1000_init_nvm_params_vf()
82 hw->nvm.ops.release = e1000_release_vf; in e1000_init_nvm_params_vf()
88 * e1000_init_mac_params_vf - Inits MAC params
93 struct e1000_mac_info *mac = &hw->mac; in e1000_init_mac_params_vf() local
103 hw->phy.media_type = e1000_media_type_unknown; in e1000_init_mac_params_vf()
106 mac->asf_firmware_present = false; in e1000_init_mac_params_vf()
108 mac->arc_subsystem_valid = false; in e1000_init_mac_params_vf()
110 mac->adaptive_ifs = false; in e1000_init_mac_params_vf()
111 /* VF's have no MTA Registers - PF feature only */ in e1000_init_mac_params_vf()
112 mac->mta_reg_count = 128; in e1000_init_mac_params_vf()
114 mac->rar_entry_count = 1; in e1000_init_mac_params_vf()
118 mac->ops.setup_link = e1000_setup_link_vf; in e1000_init_mac_params_vf()
120 mac->ops.get_bus_info = e1000_get_bus_info_pcie_vf; in e1000_init_mac_params_vf()
122 mac->ops.reset_hw = e1000_reset_hw_vf; in e1000_init_mac_params_vf()
124 mac->ops.init_hw = e1000_init_hw_vf; in e1000_init_mac_params_vf()
126 mac->ops.check_for_link = e1000_check_for_link_vf; in e1000_init_mac_params_vf()
128 mac->ops.get_link_up_info = e1000_get_link_up_info_vf; in e1000_init_mac_params_vf()
129 /* multicast address update */ in e1000_init_mac_params_vf()
130 mac->ops.update_mc_addr_list = e1000_update_mc_addr_list_vf; in e1000_init_mac_params_vf()
131 /* set mac address */ in e1000_init_mac_params_vf()
132 mac->ops.rar_set = e1000_rar_set_vf; in e1000_init_mac_params_vf()
133 /* read mac address */ in e1000_init_mac_params_vf()
134 mac->ops.read_mac_addr = e1000_read_mac_addr_vf; in e1000_init_mac_params_vf()
141 * e1000_init_function_pointers_vf - Inits function pointers
148 hw->mac.ops.init_params = e1000_init_mac_params_vf; in e1000_init_function_pointers_vf()
149 hw->nvm.ops.init_params = e1000_init_nvm_params_vf; in e1000_init_function_pointers_vf()
150 hw->phy.ops.init_params = e1000_init_phy_params_vf; in e1000_init_function_pointers_vf()
151 hw->mbx.ops.init_params = e1000_init_mbx_params_vf; in e1000_init_function_pointers_vf()
155 * e1000_acquire_vf - Acquire rights to access PHY or NVM.
159 * In addition, the MAC registers to access PHY/NVM don't exist so we don't
164 return -E1000_ERR_PHY; in e1000_acquire_vf()
168 * e1000_release_vf - Release PHY or NVM
172 * In addition, the MAC registers to access PHY/NVM don't exist so we don't
181 * e1000_setup_link_vf - Sets up link.
194 * e1000_get_bus_info_pcie_vf - Gets the bus info.
201 struct e1000_bus_info *bus = &hw->bus; in e1000_get_bus_info_pcie_vf()
205 /* Do not set type PCI-E because we don't want disable master to run */ in e1000_get_bus_info_pcie_vf()
206 bus->type = e1000_bus_type_reserved; in e1000_get_bus_info_pcie_vf()
207 bus->speed = e1000_bus_speed_2500; in e1000_get_bus_info_pcie_vf()
213 * e1000_get_link_up_info_vf - Gets link info.
252 * e1000_reset_hw_vf - Resets the HW
260 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_reset_hw_vf()
262 s32 ret_val = -E1000_ERR_MAC_INIT; in e1000_reset_hw_vf()
268 DEBUGOUT("Issuing a function level reset to MAC\n"); in e1000_reset_hw_vf()
273 while (!mbx->ops.check_for_rst(hw, 0) && timeout) { in e1000_reset_hw_vf()
274 timeout--; in e1000_reset_hw_vf()
280 mbx->timeout = E1000_VF_MBX_INIT_TIMEOUT; in e1000_reset_hw_vf()
283 mbx->ops.write_posted(hw, msgbuf, 1, 0); in e1000_reset_hw_vf()
288 ret_val = mbx->ops.read_posted(hw, msgbuf, 3, 0); in e1000_reset_hw_vf()
292 memcpy(hw->mac.perm_addr, addr, 6); in e1000_reset_hw_vf()
294 ret_val = -E1000_ERR_MAC_INIT; in e1000_reset_hw_vf()
302 * e1000_init_hw_vf - Inits the HW
311 /* attempt to set and restore our mac address */ in e1000_init_hw_vf()
312 e1000_rar_set_vf(hw, hw->mac.addr, 0); in e1000_init_hw_vf()
318 * e1000_rar_set_vf - set device MAC address
320 * @addr: pointer to the receive address
321 * @index receive address array register
326 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_rar_set_vf()
334 ret_val = mbx->ops.write_posted(hw, msgbuf, 3, 0); in e1000_rar_set_vf()
337 ret_val = mbx->ops.read_posted(hw, msgbuf, 3, 0); in e1000_rar_set_vf()
341 /* if nacked the address was rejected, use "perm_addr" */ in e1000_rar_set_vf()
350 * e1000_hash_mc_addr_vf - Generate a multicast hash value
352 * @mc_addr: pointer to a multicast address
354 * Generates a multicast address hash value which is used to determine
355 * the multicast filter table array address and new table value.
365 hash_mask = (hw->mac.mta_reg_count * 32) - 1; in e1000_hash_mc_addr_vf()
368 * The bit_shift is the number of left-shifts in e1000_hash_mc_addr_vf()
374 hash_value = hash_mask & (((mc_addr[4] >> (8 - bit_shift)) | in e1000_hash_mc_addr_vf()
383 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_write_msg_read_ack()
385 s32 retval = mbx->ops.write_posted(hw, msg, size, 0); in e1000_write_msg_read_ack()
388 mbx->ops.read_posted(hw, retmsg, E1000_VFMAILBOX_SIZE, 0); in e1000_write_msg_read_ack()
392 * e1000_update_mc_addr_list_vf - Update Multicast addresses
415 * It would be unusual for a server to request that many multi-cast in e1000_update_mc_addr_list_vf()
441 * e1000_vfta_set_vf - Set/Unset vlan filter table address
459 /** e1000_rlpml_set_vf - Set the maximum receive packet length
474 * e1000_promisc_set_vf - Set flags for Unicast or Multicast promisc
481 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_promisc_set_vf()
498 return -E1000_ERR_MAC_INIT; in e1000_promisc_set_vf()
501 ret_val = mbx->ops.write_posted(hw, &msgbuf, 1, 0); in e1000_promisc_set_vf()
504 ret_val = mbx->ops.read_posted(hw, &msgbuf, 1, 0); in e1000_promisc_set_vf()
507 ret_val = -E1000_ERR_MAC_INIT; in e1000_promisc_set_vf()
513 * e1000_read_mac_addr_vf - Read device MAC address
521 hw->mac.addr[i] = hw->mac.perm_addr[i]; in e1000_read_mac_addr_vf()
527 * e1000_check_for_link_vf - Check for link for a virtual interface
536 struct e1000_mbx_info *mbx = &hw->mbx; in e1000_check_for_link_vf()
537 struct e1000_mac_info *mac = &hw->mac; in e1000_check_for_link_vf() local
550 if (!mbx->ops.check_for_rst(hw, 0) || !mbx->timeout) in e1000_check_for_link_vf()
551 mac->get_link_status = true; in e1000_check_for_link_vf()
553 if (!mac->get_link_status) in e1000_check_for_link_vf()
562 if (mbx->ops.read(hw, &in_msg, 1, 0)) in e1000_check_for_link_vf()
569 ret_val = -E1000_ERR_MAC_INIT; in e1000_check_for_link_vf()
576 if (!mbx->timeout) { in e1000_check_for_link_vf()
577 ret_val = -E1000_ERR_MAC_INIT; in e1000_check_for_link_vf()
583 mac->get_link_status = false; in e1000_check_for_link_vf()