Lines Matching +full:hw +full:- +full:device +full:- +full:address

1 /* SPDX-License-Identifier: BSD-3-Clause */
43 static void iavf_init_hw(struct iavf_hw *hw, device_t dev);
47 * iavf_msec_pause - Pause for at least the specified number of milliseconds
61 * iavf_get_default_rss_key - Get the default RSS key for this driver
84 * iavf_allocate_pci_resources_common - Allocate PCI resources
85 * @sc: the private device softc pointer
87 * @pre sc->dev is set
96 struct iavf_hw *hw = &sc->hw; in iavf_allocate_pci_resources_common() local
97 device_t dev = sc->dev; in iavf_allocate_pci_resources_common()
102 sc->pci_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in iavf_allocate_pci_resources_common()
105 if (!(sc->pci_mem)) { in iavf_allocate_pci_resources_common()
110 iavf_init_hw(hw, dev); in iavf_allocate_pci_resources_common()
113 sc->osdep.mem_bus_space_tag = in iavf_allocate_pci_resources_common()
114 rman_get_bustag(sc->pci_mem); in iavf_allocate_pci_resources_common()
115 sc->osdep.mem_bus_space_handle = in iavf_allocate_pci_resources_common()
116 rman_get_bushandle(sc->pci_mem); in iavf_allocate_pci_resources_common()
117 sc->osdep.mem_bus_space_size = rman_get_size(sc->pci_mem); in iavf_allocate_pci_resources_common()
118 sc->osdep.flush_reg = IAVF_VFGEN_RSTAT; in iavf_allocate_pci_resources_common()
119 sc->osdep.dev = dev; in iavf_allocate_pci_resources_common()
121 sc->hw.hw_addr = (u8 *)&sc->osdep.mem_bus_space_handle; in iavf_allocate_pci_resources_common()
122 sc->hw.back = &sc->osdep; in iavf_allocate_pci_resources_common()
128 * iavf_init_hw - Initialize the device HW
129 * @hw: device hardware structure
136 iavf_init_hw(struct iavf_hw *hw, device_t dev) in iavf_init_hw() argument
139 hw->vendor_id = pci_get_vendor(dev); in iavf_init_hw()
140 hw->device_id = pci_get_device(dev); in iavf_init_hw()
141 hw->revision_id = pci_read_config(dev, PCIR_REVID, 1); in iavf_init_hw()
142 hw->subsystem_vendor_id = in iavf_init_hw()
144 hw->subsystem_device_id = in iavf_init_hw()
147 hw->bus.device = pci_get_slot(dev); in iavf_init_hw()
148 hw->bus.func = pci_get_function(dev); in iavf_init_hw()
152 * iavf_sysctl_current_speed - Sysctl to display the current device speed
154 * @arg1: pointer to the device softc typecasted to void *
158 * Reads the current speed reported from the physical device into a string for
176 __DECONST(char *, iavf_ext_speed_to_str(iavf_adv_speed_to_ext_speed(sc->link_speed_adv))), in iavf_sysctl_current_speed()
180 __DECONST(char *, iavf_vc_speed_to_string(sc->link_speed)), in iavf_sysctl_current_speed()
187 * iavf_reset_complete - Wait for a device reset to complete
188 * @hw: pointer to the hardware structure
190 * Reads the reset registers and waits until they indicate that a device reset
199 iavf_reset_complete(struct iavf_hw *hw) in iavf_reset_complete() argument
205 reg = rd32(hw, IAVF_VFGEN_RSTAT) & in iavf_reset_complete()
218 * iavf_setup_vc - Setup virtchnl communication
219 * @sc: device private softc
230 struct iavf_hw *hw = &sc->hw; in iavf_setup_vc() local
231 device_t dev = sc->dev; in iavf_setup_vc()
236 hw->aq.num_arq_entries = IAVF_AQ_LEN; in iavf_setup_vc()
237 hw->aq.num_asq_entries = IAVF_AQ_LEN; in iavf_setup_vc()
238 hw->aq.arq_buf_size = IAVF_AQ_BUF_SZ; in iavf_setup_vc()
239 hw->aq.asq_buf_size = IAVF_AQ_BUF_SZ; in iavf_setup_vc()
243 error = iavf_init_adminq(hw); in iavf_setup_vc()
258 iavf_shutdown_adminq(hw); in iavf_setup_vc()
266 while (!iavf_asq_done(hw)) { in iavf_setup_vc()
268 iavf_shutdown_adminq(hw); in iavf_setup_vc()
271 IAVF_AQ_MAX_ERR - (i + 1)); in iavf_setup_vc()
310 iavf_shutdown_adminq(hw); in iavf_setup_vc()
315 * iavf_reset - Requests a VF reset from the PF.
316 * @sc: device private softc
324 struct iavf_hw *hw = &sc->hw; in iavf_reset() local
325 device_t dev = sc->dev; in iavf_reset()
329 if (!iavf_test_state(&sc->state, IAVF_STATE_RESET_PENDING)) in iavf_reset()
333 error = iavf_reset_complete(hw); in iavf_reset()
341 error = iavf_shutdown_adminq(hw); in iavf_reset()
348 error = iavf_init_adminq(hw); in iavf_reset()
356 iavf_enable_adminq_irq(hw); in iavf_reset()
361 * iavf_enable_admin_irq - Enable the administrative interrupt
362 * @hw: pointer to the hardware structure
365 * to handle non-queue related interrupt events.
368 iavf_enable_adminq_irq(struct iavf_hw *hw) in iavf_enable_adminq_irq() argument
370 wr32(hw, IAVF_VFINT_DYN_CTL01, in iavf_enable_adminq_irq()
374 wr32(hw, IAVF_VFINT_ICR0_ENA1, IAVF_VFINT_ICR0_ENA1_ADMINQ_MASK); in iavf_enable_adminq_irq()
376 rd32(hw, IAVF_VFGEN_RSTAT); in iavf_enable_adminq_irq()
380 * iavf_disable_admin_irq - Disable the administrative interrupt cause
381 * @hw: pointer to the hardware structure
386 iavf_disable_adminq_irq(struct iavf_hw *hw) in iavf_disable_adminq_irq() argument
388 wr32(hw, IAVF_VFINT_DYN_CTL01, 0); in iavf_disable_adminq_irq()
389 wr32(hw, IAVF_VFINT_ICR0_ENA1, 0); in iavf_disable_adminq_irq()
390 iavf_flush(hw); in iavf_disable_adminq_irq()
394 * iavf_vf_config - Configure this VF over the virtchnl
395 * @sc: device private softc
405 struct iavf_hw *hw = &sc->hw; in iavf_vf_config() local
406 device_t dev = sc->dev; in iavf_vf_config()
420 while (!iavf_asq_done(hw)) { in iavf_vf_config()
434 if (!sc->vf_res) { in iavf_vf_config()
437 sc->vf_res = (struct virtchnl_vf_resource *)malloc(bufsz, M_IAVF, M_NOWAIT); in iavf_vf_config()
438 if (!sc->vf_res) { in iavf_vf_config()
468 free(sc->vf_res, M_IAVF); in iavf_vf_config()
474 * iavf_print_device_info - Print some device parameters at attach
475 * @sc: device private softc
477 * Log a message about this virtual device's capabilities at attach time.
482 device_t dev = sc->dev; in iavf_print_device_info()
485 "VSIs %d, QPs %d, MSI-X %d, RSS sizes: key %d lut %d\n", in iavf_print_device_info()
486 sc->vf_res->num_vsis, in iavf_print_device_info()
487 sc->vf_res->num_queue_pairs, in iavf_print_device_info()
488 sc->vf_res->max_vectors, in iavf_print_device_info()
489 sc->vf_res->rss_key_size, in iavf_print_device_info()
490 sc->vf_res->rss_lut_size); in iavf_print_device_info()
492 sc->vf_res->vf_cap_flags, IAVF_PRINTF_VF_OFFLOAD_FLAGS); in iavf_print_device_info()
496 * iavf_get_vsi_res_from_vf_res - Get VSI parameters and info for this VF
497 * @sc: device private softc
500 * received by the physical device.
507 struct iavf_vsi *vsi = &sc->vsi; in iavf_get_vsi_res_from_vf_res()
508 device_t dev = sc->dev; in iavf_get_vsi_res_from_vf_res()
510 sc->vsi_res = NULL; in iavf_get_vsi_res_from_vf_res()
512 for (int i = 0; i < sc->vf_res->num_vsis; i++) { in iavf_get_vsi_res_from_vf_res()
514 if (sc->vf_res->vsi_res[i].vsi_type == VIRTCHNL_VSI_SRIOV) in iavf_get_vsi_res_from_vf_res()
515 sc->vsi_res = &sc->vf_res->vsi_res[i]; in iavf_get_vsi_res_from_vf_res()
517 if (!sc->vsi_res) { in iavf_get_vsi_res_from_vf_res()
522 vsi->id = sc->vsi_res->vsi_id; in iavf_get_vsi_res_from_vf_res()
527 * iavf_set_mac_addresses - Set the MAC address for this interface
528 * @sc: device private softc
530 * Set the permanent MAC address field in the HW structure. If a MAC address
531 * has not yet been set for this device by the physical function, generate one
537 struct iavf_hw *hw = &sc->hw; in iavf_set_mac_addresses() local
538 device_t dev = sc->dev; in iavf_set_mac_addresses()
541 /* If no mac address was assigned just make a random one */ in iavf_set_mac_addresses()
542 if (ETHER_IS_ZERO(hw->mac.addr)) { in iavf_set_mac_addresses()
546 memcpy(hw->mac.addr, addr, sizeof(addr)); in iavf_set_mac_addresses()
547 device_printf(dev, "Generated random MAC address\n"); in iavf_set_mac_addresses()
549 memcpy(hw->mac.perm_addr, hw->mac.addr, ETHER_ADDR_LEN); in iavf_set_mac_addresses()
553 * iavf_init_filters - Initialize filter structures
554 * @sc: device private softc
558 * @remark this is intended to be called only once during the device attach
567 sc->mac_filters = (struct mac_list *)malloc(sizeof(struct iavf_mac_filter), in iavf_init_filters()
569 SLIST_INIT(sc->mac_filters); in iavf_init_filters()
570 sc->vlan_filters = (struct vlan_list *)malloc(sizeof(struct iavf_vlan_filter), in iavf_init_filters()
572 SLIST_INIT(sc->vlan_filters); in iavf_init_filters()
576 * iavf_free_filters - Release filter lists
577 * @sc: device private softc
581 * @remark this is intended to be called only once during the device detach
590 while (!SLIST_EMPTY(sc->mac_filters)) { in iavf_free_filters()
591 f = SLIST_FIRST(sc->mac_filters); in iavf_free_filters()
592 SLIST_REMOVE_HEAD(sc->mac_filters, next); in iavf_free_filters()
595 free(sc->mac_filters, M_IAVF); in iavf_free_filters()
596 while (!SLIST_EMPTY(sc->vlan_filters)) { in iavf_free_filters()
597 v = SLIST_FIRST(sc->vlan_filters); in iavf_free_filters()
598 SLIST_REMOVE_HEAD(sc->vlan_filters, next); in iavf_free_filters()
601 free(sc->vlan_filters, M_IAVF); in iavf_free_filters()
605 * iavf_add_device_sysctls_common - Initialize common device sysctls
606 * @sc: device private softc
613 device_t dev = sc->dev; in iavf_add_device_sysctls_common()
634 &sc->admin_irq, "Admin Queue IRQ Handled"); in iavf_add_device_sysctls_common()
638 * iavf_add_debug_sysctls_common - Initialize common debug sysctls
639 * @sc: device private softc
642 * Setup sysctls used for debugging the device driver into the debug sysctl
648 device_t dev = sc->dev; in iavf_add_debug_sysctls_common()
653 &sc->hw.debug_mask, 0, "Shared code debug message level"); in iavf_add_debug_sysctls_common()
657 (unsigned int *)&sc->dbg_mask, 0, "Non-shared code debug message level"); in iavf_add_debug_sysctls_common()
665 * iavf_sysctl_tx_itr - Sysctl to set the Tx ITR value
667 * @arg1: pointer to the device softc
680 device_t dev = sc->dev; in iavf_sysctl_tx_itr()
689 requested_tx_itr = sc->tx_itr; in iavf_sysctl_tx_itr()
691 if ((error) || (req->newptr == NULL)) in iavf_sysctl_tx_itr()
700 sc->tx_itr = requested_tx_itr; in iavf_sysctl_tx_itr()
707 * iavf_sysctl_rx_itr - Sysctl to set the Rx ITR value
709 * @arg1: pointer to the device softc
722 device_t dev = sc->dev; in iavf_sysctl_rx_itr()
731 requested_rx_itr = sc->rx_itr; in iavf_sysctl_rx_itr()
733 if ((error) || (req->newptr == NULL)) in iavf_sysctl_rx_itr()
742 sc->rx_itr = requested_rx_itr; in iavf_sysctl_rx_itr()
749 * iavf_configure_tx_itr - Configure the Tx ITR
750 * @sc: device private softc
757 struct iavf_hw *hw = &sc->hw; in iavf_configure_tx_itr() local
758 struct iavf_vsi *vsi = &sc->vsi; in iavf_configure_tx_itr()
759 struct iavf_tx_queue *que = vsi->tx_queues; in iavf_configure_tx_itr()
761 vsi->tx_itr_setting = sc->tx_itr; in iavf_configure_tx_itr()
764 struct tx_ring *txr = &que->txr; in iavf_configure_tx_itr()
766 wr32(hw, IAVF_VFINT_ITRN1(IAVF_TX_ITR, i), in iavf_configure_tx_itr()
767 vsi->tx_itr_setting); in iavf_configure_tx_itr()
768 txr->itr = vsi->tx_itr_setting; in iavf_configure_tx_itr()
769 txr->latency = IAVF_AVE_LATENCY; in iavf_configure_tx_itr()
774 * iavf_configure_rx_itr - Configure the Rx ITR
775 * @sc: device private softc
782 struct iavf_hw *hw = &sc->hw; in iavf_configure_rx_itr() local
783 struct iavf_vsi *vsi = &sc->vsi; in iavf_configure_rx_itr()
784 struct iavf_rx_queue *que = vsi->rx_queues; in iavf_configure_rx_itr()
786 vsi->rx_itr_setting = sc->rx_itr; in iavf_configure_rx_itr()
789 struct rx_ring *rxr = &que->rxr; in iavf_configure_rx_itr()
791 wr32(hw, IAVF_VFINT_ITRN1(IAVF_RX_ITR, i), in iavf_configure_rx_itr()
792 vsi->rx_itr_setting); in iavf_configure_rx_itr()
793 rxr->itr = vsi->rx_itr_setting; in iavf_configure_rx_itr()
794 rxr->latency = IAVF_AVE_LATENCY; in iavf_configure_rx_itr()
799 * iavf_create_debug_sysctl_tree - Create a debug sysctl node
800 * @sc: device private softc
804 * "sysctl -a" output.
811 device_t dev = sc->dev; in iavf_create_debug_sysctl_tree()
824 * iavf_add_vsi_sysctls - Add sysctls for a given VSI
825 * @dev: device pointer
842 vsi->vsi_node = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, sysctl_name, in iavf_add_vsi_sysctls()
844 vsi_list = SYSCTL_CHILDREN(vsi->vsi_node); in iavf_add_vsi_sysctls()
846 iavf_add_sysctls_eth_stats(ctx, vsi_list, &vsi->eth_stats); in iavf_add_vsi_sysctls()
850 * iavf_sysctl_sw_filter_list - Dump software filters
852 * @arg1: pointer to the device softc
857 * this virtual device. Useful for debugging to see whether or not the
868 device_t dev = sc->dev; in iavf_sysctl_sw_filter_list()
888 SLIST_FOREACH(f, sc->mac_filters, next) in iavf_sysctl_sw_filter_list()
893 SLIST_FOREACH(f, sc->mac_filters, next) { in iavf_sysctl_sw_filter_list()
896 MAC_FORMAT_ARGS(f->macaddr), f->flags); in iavf_sysctl_sw_filter_list()
903 SLIST_FOREACH(v, sc->vlan_filters, next) in iavf_sysctl_sw_filter_list()
908 SLIST_FOREACH(v, sc->vlan_filters, next) { in iavf_sysctl_sw_filter_list()
911 v->vlan, v->flags); in iavf_sysctl_sw_filter_list()
927 * iavf_media_status_common - Get media status for this device
928 * @sc: device softc pointer
931 * Report the media status for this device into the given ifmr structure.
940 ifmr->ifm_status = IFM_AVALID; in iavf_media_status_common()
941 ifmr->ifm_active = IFM_ETHER; in iavf_media_status_common()
943 if (!sc->link_up) in iavf_media_status_common()
946 ifmr->ifm_status |= IFM_ACTIVE; in iavf_media_status_common()
947 /* Hardware is always full-duplex */ in iavf_media_status_common()
948 ifmr->ifm_active |= IFM_FDX; in iavf_media_status_common()
956 ext_speed = iavf_adv_speed_to_ext_speed(sc->link_speed_adv); in iavf_media_status_common()
958 ext_speed = iavf_vc_speed_to_ext_speed(sc->link_speed); in iavf_media_status_common()
960 ifmr->ifm_active |= iavf_ext_speed_to_ifmedia(ext_speed); in iavf_media_status_common()
964 * iavf_media_change_common - Change the media type for this device
978 * iavf_set_initial_baudrate - Set the initial device baudrate
992 * iavf_add_sysctls_eth_stats - Add ethernet statistics sysctls
1007 {&eth_stats->rx_bytes, "good_octets_rcvd", "Good Octets Received"}, in iavf_add_sysctls_eth_stats()
1008 {&eth_stats->rx_unicast, "ucast_pkts_rcvd", in iavf_add_sysctls_eth_stats()
1010 {&eth_stats->rx_multicast, "mcast_pkts_rcvd", in iavf_add_sysctls_eth_stats()
1012 {&eth_stats->rx_broadcast, "bcast_pkts_rcvd", in iavf_add_sysctls_eth_stats()
1014 {&eth_stats->rx_discards, "rx_discards", "Discarded RX packets"}, in iavf_add_sysctls_eth_stats()
1015 {&eth_stats->rx_unknown_protocol, "rx_unknown_proto", in iavf_add_sysctls_eth_stats()
1017 {&eth_stats->tx_bytes, "good_octets_txd", "Good Octets Transmitted"}, in iavf_add_sysctls_eth_stats()
1018 {&eth_stats->tx_unicast, "ucast_pkts_txd", "Unicast Packets Transmitted"}, in iavf_add_sysctls_eth_stats()
1019 {&eth_stats->tx_multicast, "mcast_pkts_txd", in iavf_add_sysctls_eth_stats()
1021 {&eth_stats->tx_broadcast, "bcast_pkts_txd", in iavf_add_sysctls_eth_stats()
1023 {&eth_stats->tx_errors, "tx_errors", "TX packet errors"}, in iavf_add_sysctls_eth_stats()
1030 while (entry->stat != 0) in iavf_add_sysctls_eth_stats()
1032 SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, entry->name, in iavf_add_sysctls_eth_stats()
1033 CTLFLAG_RD, entry->stat, in iavf_add_sysctls_eth_stats()
1034 entry->description); in iavf_add_sysctls_eth_stats()
1040 * iavf_max_vc_speed_to_value - Convert link speed to IF speed value
1067 * iavf_config_rss_reg - Configure RSS using registers
1068 * @sc: device private softc
1070 * Configures RSS for this function using the device registers. Called if the
1076 struct iavf_hw *hw = &sc->hw; in iavf_config_rss_reg() local
1077 struct iavf_vsi *vsi = &sc->vsi; in iavf_config_rss_reg()
1088 wr32(hw, IAVF_VFQF_HENA(0), 0); in iavf_config_rss_reg()
1089 wr32(hw, IAVF_VFQF_HENA(1), 0); in iavf_config_rss_reg()
1090 iavf_flush(hw); in iavf_config_rss_reg()
1103 wr32(hw, IAVF_VFQF_HKEY(i), rss_seed[i]); in iavf_config_rss_reg()
1125 hena = (u64)rd32(hw, IAVF_VFQF_HENA(0)) | in iavf_config_rss_reg()
1126 ((u64)rd32(hw, IAVF_VFQF_HENA(1)) << 32); in iavf_config_rss_reg()
1128 wr32(hw, IAVF_VFQF_HENA(0), (u32)hena); in iavf_config_rss_reg()
1129 wr32(hw, IAVF_VFQF_HENA(1), (u32)(hena >> 32)); in iavf_config_rss_reg()
1146 /* lut = 4-byte sliding window of 4 lut entries */ in iavf_config_rss_reg()
1150 wr32(hw, IAVF_VFQF_HLUT(i >> 2), lut); in iavf_config_rss_reg()
1155 iavf_flush(hw); in iavf_config_rss_reg()
1159 * iavf_config_rss_pf - Configure RSS using PF virtchnl messages
1160 * @sc: device private softc
1175 * iavf_config_rss - setup RSS
1176 * @sc: device private softc
1186 if (sc->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_REG) { in iavf_config_rss()
1189 } else if (sc->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RSS_PF) { in iavf_config_rss()
1193 device_printf(sc->dev, "VF does not support RSS capability sent by PF.\n"); in iavf_config_rss()
1197 * iavf_config_promisc - setup promiscuous mode
1198 * @sc: device private softc
1208 if_t ifp = sc->vsi.ifp; in iavf_config_promisc()
1210 sc->promisc_flags = 0; in iavf_config_promisc()
1214 sc->promisc_flags |= FLAG_VF_MULTICAST_PROMISC; in iavf_config_promisc()
1216 sc->promisc_flags |= FLAG_VF_UNICAST_PROMISC; in iavf_config_promisc()
1224 * iavf_mc_filter_apply - Program a MAC filter for this VF
1225 * @arg: pointer to the device softc
1226 * @sdl: MAC multicast address
1229 * Program a MAC address multicast filter for this device. Intended
1230 * to be used with the map-like function if_foreach_llmaddr().
1246 * iavf_init_multi - Initialize multicast address filters
1247 * @sc: device private softc
1249 * Called during initialization to reset multicast address filters to a known
1259 SLIST_FOREACH(f, sc->mac_filters, next) { in iavf_init_multi()
1260 if ((f->flags & IAVF_FILTER_USED) in iavf_init_multi()
1261 && (f->flags & IAVF_FILTER_MC)) { in iavf_init_multi()
1262 f->flags |= IAVF_FILTER_DEL; in iavf_init_multi()
1271 * iavf_multi_set - Set multicast filters
1272 * @sc: device private softc
1274 * Set multicast MAC filters for this device. If there are too many filters,
1275 * this will request the device to go into multicast promiscuous mode instead.
1280 if_t ifp = sc->vsi.ifp; in iavf_multi_set()
1289 sc->promisc_flags |= FLAG_VF_MULTICAST_PROMISC; in iavf_multi_set()
1297 /* And (re-)install filters for all mcast addresses */ in iavf_multi_set()
1305 * iavf_add_mac_filter - Add a MAC filter to the sc MAC list
1306 * @sc: device private softc
1307 * @macaddr: MAC address to add
1333 device_printf(sc->dev, "%s: no filters available!!\n", in iavf_add_mac_filter()
1341 bcopy(macaddr, f->macaddr, ETHER_ADDR_LEN); in iavf_add_mac_filter()
1342 f->flags |= (IAVF_FILTER_ADD | IAVF_FILTER_USED); in iavf_add_mac_filter()
1343 f->flags |= flags; in iavf_add_mac_filter()
1348 * iavf_find_mac_filter - Find a MAC filter with the given address
1349 * @sc: device private softc
1350 * @macaddr: the MAC address to find
1353 * MAC address.
1364 SLIST_FOREACH(f, sc->mac_filters, next) { in iavf_find_mac_filter()
1365 if (cmp_etheraddr(f->macaddr, macaddr)) { in iavf_find_mac_filter()
1377 * iavf_get_mac_filter - Get a new MAC address filter
1378 * @sc: device private softc
1396 SLIST_INSERT_HEAD(sc->mac_filters, f, next); in iavf_get_mac_filter()
1402 * iavf_baudrate_from_link_speed - Convert link speed to baudrate
1403 * @sc: device private softc
1413 if (sc->vf_res->vf_cap_flags & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) in iavf_baudrate_from_link_speed()
1414 return (sc->link_speed_adv * IAVF_ADV_LINK_SPEED_SCALE); in iavf_baudrate_from_link_speed()
1416 return iavf_max_vc_speed_to_value(sc->link_speed); in iavf_baudrate_from_link_speed()
1420 * iavf_add_vlan_filter - Add a VLAN filter to the softc VLAN list
1421 * @sc: device private softc
1433 SLIST_INSERT_HEAD(sc->vlan_filters, v, next); in iavf_add_vlan_filter()
1434 v->vlan = vtag; in iavf_add_vlan_filter()
1435 v->flags = IAVF_FILTER_ADD; in iavf_add_vlan_filter()
1439 * iavf_mark_del_vlan_filter - Mark a given VLAN id for deletion
1440 * @sc: device private softc
1456 SLIST_FOREACH(v, sc->vlan_filters, next) { in iavf_mark_del_vlan_filter()
1457 if (v->vlan == vtag) { in iavf_mark_del_vlan_filter()
1458 v->flags = IAVF_FILTER_DEL; in iavf_mark_del_vlan_filter()
1467 * iavf_disable_queues_with_retries - Send PF multiple DISABLE_QUEUES messages
1468 * @sc: device softc
1489 atomic_load_acq_32(&sc->queues_enabled)) { in iavf_disable_queues_with_retries()
1500 device_printf(sc->dev, "%s: DISABLE_QUEUES may have failed\n", in iavf_disable_queues_with_retries()