Lines Matching refs:adapter

21 static int iavf_send_pf_msg(struct iavf_adapter *adapter,  in iavf_send_pf_msg()  argument
24 struct iavf_hw *hw = &adapter->hw; in iavf_send_pf_msg()
27 if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED) in iavf_send_pf_msg()
32 dev_dbg(&adapter->pdev->dev, "Unable to send opcode %d to PF, err %s, aq_err %s\n", in iavf_send_pf_msg()
46 int iavf_send_api_ver(struct iavf_adapter *adapter) in iavf_send_api_ver() argument
53 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_VERSION, (u8 *)&vvi, in iavf_send_api_ver()
66 int iavf_verify_api_ver(struct iavf_adapter *adapter) in iavf_verify_api_ver() argument
69 struct iavf_hw *hw = &adapter->hw; in iavf_verify_api_ver()
100 dev_info(&adapter->pdev->dev, "Invalid reply type %d from PF\n", in iavf_verify_api_ver()
107 adapter->pf_version = *pf_vvi; in iavf_verify_api_ver()
128 int iavf_send_vf_config_msg(struct iavf_adapter *adapter) in iavf_send_vf_config_msg() argument
148 adapter->current_op = VIRTCHNL_OP_GET_VF_RESOURCES; in iavf_send_vf_config_msg()
149 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_CONFIG; in iavf_send_vf_config_msg()
150 if (PF_IS_V11(adapter)) in iavf_send_vf_config_msg()
151 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_VF_RESOURCES, in iavf_send_vf_config_msg()
154 return iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_VF_RESOURCES, in iavf_send_vf_config_msg()
165 static void iavf_validate_num_queues(struct iavf_adapter *adapter) in iavf_validate_num_queues() argument
167 if (adapter->vf_res->num_queue_pairs > IAVF_MAX_REQ_QUEUES) { in iavf_validate_num_queues()
171 dev_info(&adapter->pdev->dev, "Received %d queues, but can only have a max of %d\n", in iavf_validate_num_queues()
172 adapter->vf_res->num_queue_pairs, in iavf_validate_num_queues()
174 dev_info(&adapter->pdev->dev, "Fixing by reducing queues to %d\n", in iavf_validate_num_queues()
176 adapter->vf_res->num_queue_pairs = IAVF_MAX_REQ_QUEUES; in iavf_validate_num_queues()
177 for (i = 0; i < adapter->vf_res->num_vsis; i++) { in iavf_validate_num_queues()
178 vsi_res = &adapter->vf_res->vsi_res[i]; in iavf_validate_num_queues()
193 int iavf_get_vf_config(struct iavf_adapter *adapter) in iavf_get_vf_config() argument
195 struct iavf_hw *hw = &adapter->hw; in iavf_get_vf_config()
224 memcpy(adapter->vf_res, event.msg_buf, min(event.msg_len, len)); in iavf_get_vf_config()
230 iavf_validate_num_queues(adapter); in iavf_get_vf_config()
231 iavf_vf_parse_hw_config(hw, adapter->vf_res); in iavf_get_vf_config()
244 void iavf_configure_queues(struct iavf_adapter *adapter) in iavf_configure_queues() argument
248 int pairs = adapter->num_active_queues; in iavf_configure_queues()
252 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_configure_queues()
254 dev_err(&adapter->pdev->dev, "Cannot configure queues, command %d pending\n", in iavf_configure_queues()
255 adapter->current_op); in iavf_configure_queues()
258 adapter->current_op = VIRTCHNL_OP_CONFIG_VSI_QUEUES; in iavf_configure_queues()
265 if (!(adapter->flags & IAVF_FLAG_LEGACY_RX) && in iavf_configure_queues()
266 (adapter->netdev->mtu <= ETH_DATA_LEN)) in iavf_configure_queues()
269 vqci->vsi_id = adapter->vsi_res->vsi_id; in iavf_configure_queues()
278 vqpi->txq.ring_len = adapter->tx_rings[i].count; in iavf_configure_queues()
279 vqpi->txq.dma_ring_addr = adapter->tx_rings[i].dma; in iavf_configure_queues()
282 vqpi->rxq.ring_len = adapter->rx_rings[i].count; in iavf_configure_queues()
283 vqpi->rxq.dma_ring_addr = adapter->rx_rings[i].dma; in iavf_configure_queues()
286 ALIGN(adapter->rx_rings[i].rx_buf_len, in iavf_configure_queues()
291 adapter->aq_required &= ~IAVF_FLAG_AQ_CONFIGURE_QUEUES; in iavf_configure_queues()
292 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_VSI_QUEUES, in iavf_configure_queues()
303 void iavf_enable_queues(struct iavf_adapter *adapter) in iavf_enable_queues() argument
307 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_queues()
309 dev_err(&adapter->pdev->dev, "Cannot enable queues, command %d pending\n", in iavf_enable_queues()
310 adapter->current_op); in iavf_enable_queues()
313 adapter->current_op = VIRTCHNL_OP_ENABLE_QUEUES; in iavf_enable_queues()
314 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_enable_queues()
315 vqs.tx_queues = BIT(adapter->num_active_queues) - 1; in iavf_enable_queues()
317 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_QUEUES; in iavf_enable_queues()
318 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_QUEUES, in iavf_enable_queues()
328 void iavf_disable_queues(struct iavf_adapter *adapter) in iavf_disable_queues() argument
332 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_queues()
334 dev_err(&adapter->pdev->dev, "Cannot disable queues, command %d pending\n", in iavf_disable_queues()
335 adapter->current_op); in iavf_disable_queues()
338 adapter->current_op = VIRTCHNL_OP_DISABLE_QUEUES; in iavf_disable_queues()
339 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_disable_queues()
340 vqs.tx_queues = BIT(adapter->num_active_queues) - 1; in iavf_disable_queues()
342 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_QUEUES; in iavf_disable_queues()
343 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_QUEUES, in iavf_disable_queues()
354 void iavf_map_queues(struct iavf_adapter *adapter) in iavf_map_queues() argument
362 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_map_queues()
364 dev_err(&adapter->pdev->dev, "Cannot map queues to vectors, command %d pending\n", in iavf_map_queues()
365 adapter->current_op); in iavf_map_queues()
368 adapter->current_op = VIRTCHNL_OP_CONFIG_IRQ_MAP; in iavf_map_queues()
370 q_vectors = adapter->num_msix_vectors - NONQ_VECS; in iavf_map_queues()
372 len = struct_size(vimi, vecmap, adapter->num_msix_vectors); in iavf_map_queues()
377 vimi->num_vectors = adapter->num_msix_vectors; in iavf_map_queues()
380 q_vector = &adapter->q_vectors[v_idx]; in iavf_map_queues()
383 vecmap->vsi_id = adapter->vsi_res->vsi_id; in iavf_map_queues()
392 vecmap->vsi_id = adapter->vsi_res->vsi_id; in iavf_map_queues()
397 adapter->aq_required &= ~IAVF_FLAG_AQ_MAP_VECTORS; in iavf_map_queues()
398 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_IRQ_MAP, in iavf_map_queues()
409 void iavf_add_ether_addrs(struct iavf_adapter *adapter) in iavf_add_ether_addrs() argument
417 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_ether_addrs()
419 dev_err(&adapter->pdev->dev, "Cannot add filters, command %d pending\n", in iavf_add_ether_addrs()
420 adapter->current_op); in iavf_add_ether_addrs()
424 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
426 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_add_ether_addrs()
431 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_MAC_FILTER; in iavf_add_ether_addrs()
432 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
435 adapter->current_op = VIRTCHNL_OP_ADD_ETH_ADDR; in iavf_add_ether_addrs()
439 dev_warn(&adapter->pdev->dev, "Too many add MAC changes in one request\n"); in iavf_add_ether_addrs()
449 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
453 veal->vsi_id = adapter->vsi_res->vsi_id; in iavf_add_ether_addrs()
455 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_add_ether_addrs()
465 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_MAC_FILTER; in iavf_add_ether_addrs()
467 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_ether_addrs()
469 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_ETH_ADDR, (u8 *)veal, len); in iavf_add_ether_addrs()
479 void iavf_del_ether_addrs(struct iavf_adapter *adapter) in iavf_del_ether_addrs() argument
487 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_ether_addrs()
489 dev_err(&adapter->pdev->dev, "Cannot remove filters, command %d pending\n", in iavf_del_ether_addrs()
490 adapter->current_op); in iavf_del_ether_addrs()
494 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
496 list_for_each_entry(f, &adapter->mac_filter_list, list) { in iavf_del_ether_addrs()
501 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_MAC_FILTER; in iavf_del_ether_addrs()
502 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
505 adapter->current_op = VIRTCHNL_OP_DEL_ETH_ADDR; in iavf_del_ether_addrs()
509 dev_warn(&adapter->pdev->dev, "Too many delete MAC changes in one request\n"); in iavf_del_ether_addrs()
518 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
522 veal->vsi_id = adapter->vsi_res->vsi_id; in iavf_del_ether_addrs()
524 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_del_ether_addrs()
535 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_MAC_FILTER; in iavf_del_ether_addrs()
537 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_ether_addrs()
539 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_ETH_ADDR, (u8 *)veal, len); in iavf_del_ether_addrs()
549 static void iavf_mac_add_ok(struct iavf_adapter *adapter) in iavf_mac_add_ok() argument
553 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_ok()
554 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_mac_add_ok()
557 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_ok()
566 static void iavf_mac_add_reject(struct iavf_adapter *adapter) in iavf_mac_add_reject() argument
568 struct net_device *netdev = adapter->netdev; in iavf_mac_add_reject()
571 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_reject()
572 list_for_each_entry_safe(f, ftmp, &adapter->mac_filter_list, list) { in iavf_mac_add_reject()
581 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_mac_add_reject()
590 void iavf_add_vlans(struct iavf_adapter *adapter) in iavf_add_vlans() argument
597 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_vlans()
599 dev_err(&adapter->pdev->dev, "Cannot add VLANs, command %d pending\n", in iavf_add_vlans()
600 adapter->current_op); in iavf_add_vlans()
604 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
606 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_add_vlans()
610 if (!count || !VLAN_ALLOWED(adapter)) { in iavf_add_vlans()
611 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_VLAN_FILTER; in iavf_add_vlans()
612 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
615 adapter->current_op = VIRTCHNL_OP_ADD_VLAN; in iavf_add_vlans()
620 dev_warn(&adapter->pdev->dev, "Too many add VLAN changes in one request\n"); in iavf_add_vlans()
630 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
634 vvfl->vsi_id = adapter->vsi_res->vsi_id; in iavf_add_vlans()
636 list_for_each_entry(f, &adapter->vlan_filter_list, list) { in iavf_add_vlans()
646 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_VLAN_FILTER; in iavf_add_vlans()
648 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_add_vlans()
650 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_VLAN, (u8 *)vvfl, len); in iavf_add_vlans()
660 void iavf_del_vlans(struct iavf_adapter *adapter) in iavf_del_vlans() argument
667 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_vlans()
669 dev_err(&adapter->pdev->dev, "Cannot remove VLANs, command %d pending\n", in iavf_del_vlans()
670 adapter->current_op); in iavf_del_vlans()
674 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
676 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_del_vlans()
683 if (f->remove && !VLAN_ALLOWED(adapter)) { in iavf_del_vlans()
691 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_VLAN_FILTER; in iavf_del_vlans()
692 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
695 adapter->current_op = VIRTCHNL_OP_DEL_VLAN; in iavf_del_vlans()
700 dev_warn(&adapter->pdev->dev, "Too many delete VLAN changes in one request\n"); in iavf_del_vlans()
710 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
714 vvfl->vsi_id = adapter->vsi_res->vsi_id; in iavf_del_vlans()
716 list_for_each_entry_safe(f, ftmp, &adapter->vlan_filter_list, list) { in iavf_del_vlans()
727 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_VLAN_FILTER; in iavf_del_vlans()
729 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_del_vlans()
731 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_VLAN, (u8 *)vvfl, len); in iavf_del_vlans()
742 void iavf_set_promiscuous(struct iavf_adapter *adapter, int flags) in iavf_set_promiscuous() argument
747 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_promiscuous()
749 dev_err(&adapter->pdev->dev, "Cannot set promiscuous mode, command %d pending\n", in iavf_set_promiscuous()
750 adapter->current_op); in iavf_set_promiscuous()
757 adapter->flags |= IAVF_FLAG_PROMISC_ON; in iavf_set_promiscuous()
758 adapter->aq_required &= ~IAVF_FLAG_AQ_REQUEST_PROMISC; in iavf_set_promiscuous()
759 dev_info(&adapter->pdev->dev, "Entering promiscuous mode\n"); in iavf_set_promiscuous()
763 adapter->flags |= IAVF_FLAG_ALLMULTI_ON; in iavf_set_promiscuous()
764 adapter->aq_required &= ~IAVF_FLAG_AQ_REQUEST_ALLMULTI; in iavf_set_promiscuous()
765 dev_info(&adapter->pdev->dev, "Entering multicast promiscuous mode\n"); in iavf_set_promiscuous()
769 adapter->flags &= ~(IAVF_FLAG_PROMISC_ON | in iavf_set_promiscuous()
771 adapter->aq_required &= ~(IAVF_FLAG_AQ_RELEASE_PROMISC | in iavf_set_promiscuous()
773 dev_info(&adapter->pdev->dev, "Leaving promiscuous mode\n"); in iavf_set_promiscuous()
776 adapter->current_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE; in iavf_set_promiscuous()
777 vpi.vsi_id = adapter->vsi_res->vsi_id; in iavf_set_promiscuous()
779 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE, in iavf_set_promiscuous()
789 void iavf_request_stats(struct iavf_adapter *adapter) in iavf_request_stats() argument
793 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_request_stats()
798 adapter->aq_required &= ~IAVF_FLAG_AQ_REQUEST_STATS; in iavf_request_stats()
799 adapter->current_op = VIRTCHNL_OP_GET_STATS; in iavf_request_stats()
800 vqs.vsi_id = adapter->vsi_res->vsi_id; in iavf_request_stats()
802 if (iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_STATS, (u8 *)&vqs, in iavf_request_stats()
805 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_request_stats()
814 void iavf_get_hena(struct iavf_adapter *adapter) in iavf_get_hena() argument
816 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_get_hena()
818 dev_err(&adapter->pdev->dev, "Cannot get RSS hash capabilities, command %d pending\n", in iavf_get_hena()
819 adapter->current_op); in iavf_get_hena()
822 adapter->current_op = VIRTCHNL_OP_GET_RSS_HENA_CAPS; in iavf_get_hena()
823 adapter->aq_required &= ~IAVF_FLAG_AQ_GET_HENA; in iavf_get_hena()
824 iavf_send_pf_msg(adapter, VIRTCHNL_OP_GET_RSS_HENA_CAPS, NULL, 0); in iavf_get_hena()
833 void iavf_set_hena(struct iavf_adapter *adapter) in iavf_set_hena() argument
837 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_hena()
839 dev_err(&adapter->pdev->dev, "Cannot set RSS hash enable, command %d pending\n", in iavf_set_hena()
840 adapter->current_op); in iavf_set_hena()
843 vrh.hena = adapter->hena; in iavf_set_hena()
844 adapter->current_op = VIRTCHNL_OP_SET_RSS_HENA; in iavf_set_hena()
845 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_HENA; in iavf_set_hena()
846 iavf_send_pf_msg(adapter, VIRTCHNL_OP_SET_RSS_HENA, (u8 *)&vrh, in iavf_set_hena()
856 void iavf_set_rss_key(struct iavf_adapter *adapter) in iavf_set_rss_key() argument
861 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_rss_key()
863 dev_err(&adapter->pdev->dev, "Cannot set RSS key, command %d pending\n", in iavf_set_rss_key()
864 adapter->current_op); in iavf_set_rss_key()
868 (adapter->rss_key_size * sizeof(u8)) - 1; in iavf_set_rss_key()
872 vrk->vsi_id = adapter->vsi.id; in iavf_set_rss_key()
873 vrk->key_len = adapter->rss_key_size; in iavf_set_rss_key()
874 memcpy(vrk->key, adapter->rss_key, adapter->rss_key_size); in iavf_set_rss_key()
876 adapter->current_op = VIRTCHNL_OP_CONFIG_RSS_KEY; in iavf_set_rss_key()
877 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_KEY; in iavf_set_rss_key()
878 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_RSS_KEY, (u8 *)vrk, len); in iavf_set_rss_key()
888 void iavf_set_rss_lut(struct iavf_adapter *adapter) in iavf_set_rss_lut() argument
893 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_set_rss_lut()
895 dev_err(&adapter->pdev->dev, "Cannot set RSS LUT, command %d pending\n", in iavf_set_rss_lut()
896 adapter->current_op); in iavf_set_rss_lut()
900 (adapter->rss_lut_size * sizeof(u8)) - 1; in iavf_set_rss_lut()
904 vrl->vsi_id = adapter->vsi.id; in iavf_set_rss_lut()
905 vrl->lut_entries = adapter->rss_lut_size; in iavf_set_rss_lut()
906 memcpy(vrl->lut, adapter->rss_lut, adapter->rss_lut_size); in iavf_set_rss_lut()
907 adapter->current_op = VIRTCHNL_OP_CONFIG_RSS_LUT; in iavf_set_rss_lut()
908 adapter->aq_required &= ~IAVF_FLAG_AQ_SET_RSS_LUT; in iavf_set_rss_lut()
909 iavf_send_pf_msg(adapter, VIRTCHNL_OP_CONFIG_RSS_LUT, (u8 *)vrl, len); in iavf_set_rss_lut()
919 void iavf_enable_vlan_stripping(struct iavf_adapter *adapter) in iavf_enable_vlan_stripping() argument
921 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_vlan_stripping()
923 dev_err(&adapter->pdev->dev, "Cannot enable stripping, command %d pending\n", in iavf_enable_vlan_stripping()
924 adapter->current_op); in iavf_enable_vlan_stripping()
927 adapter->current_op = VIRTCHNL_OP_ENABLE_VLAN_STRIPPING; in iavf_enable_vlan_stripping()
928 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_VLAN_STRIPPING; in iavf_enable_vlan_stripping()
929 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_VLAN_STRIPPING, NULL, 0); in iavf_enable_vlan_stripping()
938 void iavf_disable_vlan_stripping(struct iavf_adapter *adapter) in iavf_disable_vlan_stripping() argument
940 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_vlan_stripping()
942 dev_err(&adapter->pdev->dev, "Cannot disable stripping, command %d pending\n", in iavf_disable_vlan_stripping()
943 adapter->current_op); in iavf_disable_vlan_stripping()
946 adapter->current_op = VIRTCHNL_OP_DISABLE_VLAN_STRIPPING; in iavf_disable_vlan_stripping()
947 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_VLAN_STRIPPING; in iavf_disable_vlan_stripping()
948 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_VLAN_STRIPPING, NULL, 0); in iavf_disable_vlan_stripping()
959 static void iavf_print_link_message(struct iavf_adapter *adapter) in iavf_print_link_message() argument
961 struct net_device *netdev = adapter->netdev; in iavf_print_link_message()
965 if (!adapter->link_up) { in iavf_print_link_message()
974 if (ADV_LINK_SUPPORT(adapter)) { in iavf_print_link_message()
975 link_speed_mbps = adapter->link_speed_mbps; in iavf_print_link_message()
979 switch (adapter->link_speed) { in iavf_print_link_message()
1036 iavf_get_vpe_link_status(struct iavf_adapter *adapter, in iavf_get_vpe_link_status() argument
1039 if (ADV_LINK_SUPPORT(adapter)) in iavf_get_vpe_link_status()
1053 iavf_set_adapter_link_speed_from_vpe(struct iavf_adapter *adapter, in iavf_set_adapter_link_speed_from_vpe() argument
1056 if (ADV_LINK_SUPPORT(adapter)) in iavf_set_adapter_link_speed_from_vpe()
1057 adapter->link_speed_mbps = in iavf_set_adapter_link_speed_from_vpe()
1060 adapter->link_speed = vpe->event_data.link_event.link_speed; in iavf_set_adapter_link_speed_from_vpe()
1070 void iavf_enable_channels(struct iavf_adapter *adapter) in iavf_enable_channels() argument
1076 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_enable_channels()
1078 dev_err(&adapter->pdev->dev, "Cannot configure mqprio, command %d pending\n", in iavf_enable_channels()
1079 adapter->current_op); in iavf_enable_channels()
1083 len = struct_size(vti, list, adapter->num_tc - 1); in iavf_enable_channels()
1087 vti->num_tc = adapter->num_tc; in iavf_enable_channels()
1089 vti->list[i].count = adapter->ch_config.ch_info[i].count; in iavf_enable_channels()
1090 vti->list[i].offset = adapter->ch_config.ch_info[i].offset; in iavf_enable_channels()
1093 adapter->ch_config.ch_info[i].max_tx_rate; in iavf_enable_channels()
1096 adapter->ch_config.state = __IAVF_TC_RUNNING; in iavf_enable_channels()
1097 adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_enable_channels()
1098 adapter->current_op = VIRTCHNL_OP_ENABLE_CHANNELS; in iavf_enable_channels()
1099 adapter->aq_required &= ~IAVF_FLAG_AQ_ENABLE_CHANNELS; in iavf_enable_channels()
1100 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ENABLE_CHANNELS, (u8 *)vti, len); in iavf_enable_channels()
1110 void iavf_disable_channels(struct iavf_adapter *adapter) in iavf_disable_channels() argument
1112 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_disable_channels()
1114 dev_err(&adapter->pdev->dev, "Cannot configure mqprio, command %d pending\n", in iavf_disable_channels()
1115 adapter->current_op); in iavf_disable_channels()
1119 adapter->ch_config.state = __IAVF_TC_INVALID; in iavf_disable_channels()
1120 adapter->flags |= IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_disable_channels()
1121 adapter->current_op = VIRTCHNL_OP_DISABLE_CHANNELS; in iavf_disable_channels()
1122 adapter->aq_required &= ~IAVF_FLAG_AQ_DISABLE_CHANNELS; in iavf_disable_channels()
1123 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DISABLE_CHANNELS, NULL, 0); in iavf_disable_channels()
1133 static void iavf_print_cloud_filter(struct iavf_adapter *adapter, in iavf_print_cloud_filter() argument
1138 …dev_info(&adapter->pdev->dev, "dst_mac: %pM src_mac: %pM vlan_id: %hu dst_ip: %pI4 src_ip %pI4 dst… in iavf_print_cloud_filter()
1148 …dev_info(&adapter->pdev->dev, "dst_mac: %pM src_mac: %pM vlan_id: %hu dst_ip: %pI6 src_ip %pI6 dst… in iavf_print_cloud_filter()
1167 void iavf_add_cloud_filter(struct iavf_adapter *adapter) in iavf_add_cloud_filter() argument
1173 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_cloud_filter()
1175 dev_err(&adapter->pdev->dev, "Cannot add cloud filter, command %d pending\n", in iavf_add_cloud_filter()
1176 adapter->current_op); in iavf_add_cloud_filter()
1179 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_add_cloud_filter()
1186 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_CLOUD_FILTER; in iavf_add_cloud_filter()
1189 adapter->current_op = VIRTCHNL_OP_ADD_CLOUD_FILTER; in iavf_add_cloud_filter()
1196 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_add_cloud_filter()
1201 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_CLOUD_FILTER, in iavf_add_cloud_filter()
1215 void iavf_del_cloud_filter(struct iavf_adapter *adapter) in iavf_del_cloud_filter() argument
1221 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_cloud_filter()
1223 dev_err(&adapter->pdev->dev, "Cannot remove cloud filter, command %d pending\n", in iavf_del_cloud_filter()
1224 adapter->current_op); in iavf_del_cloud_filter()
1227 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_del_cloud_filter()
1234 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_CLOUD_FILTER; in iavf_del_cloud_filter()
1237 adapter->current_op = VIRTCHNL_OP_DEL_CLOUD_FILTER; in iavf_del_cloud_filter()
1244 list_for_each_entry_safe(cf, cftmp, &adapter->cloud_filter_list, list) { in iavf_del_cloud_filter()
1249 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_CLOUD_FILTER, in iavf_del_cloud_filter()
1263 void iavf_add_fdir_filter(struct iavf_adapter *adapter) in iavf_add_fdir_filter() argument
1270 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_fdir_filter()
1272 dev_err(&adapter->pdev->dev, "Cannot add Flow Director filter, command %d pending\n", in iavf_add_fdir_filter()
1273 adapter->current_op); in iavf_add_fdir_filter()
1282 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_add_fdir_filter()
1283 list_for_each_entry(fdir, &adapter->fdir_list_head, list) { in iavf_add_fdir_filter()
1291 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_add_fdir_filter()
1297 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_FDIR_FILTER; in iavf_add_fdir_filter()
1301 adapter->current_op = VIRTCHNL_OP_ADD_FDIR_FILTER; in iavf_add_fdir_filter()
1302 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_FDIR_FILTER, (u8 *)f, len); in iavf_add_fdir_filter()
1313 void iavf_del_fdir_filter(struct iavf_adapter *adapter) in iavf_del_fdir_filter() argument
1320 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_fdir_filter()
1322 dev_err(&adapter->pdev->dev, "Cannot remove Flow Director filter, command %d pending\n", in iavf_del_fdir_filter()
1323 adapter->current_op); in iavf_del_fdir_filter()
1329 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_del_fdir_filter()
1330 list_for_each_entry(fdir, &adapter->fdir_list_head, list) { in iavf_del_fdir_filter()
1340 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_del_fdir_filter()
1343 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_FDIR_FILTER; in iavf_del_fdir_filter()
1347 adapter->current_op = VIRTCHNL_OP_DEL_FDIR_FILTER; in iavf_del_fdir_filter()
1348 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_FDIR_FILTER, (u8 *)&f, len); in iavf_del_fdir_filter()
1358 void iavf_add_adv_rss_cfg(struct iavf_adapter *adapter) in iavf_add_adv_rss_cfg() argument
1365 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_add_adv_rss_cfg()
1367 dev_err(&adapter->pdev->dev, "Cannot add RSS configuration, command %d pending\n", in iavf_add_adv_rss_cfg()
1368 adapter->current_op); in iavf_add_adv_rss_cfg()
1377 spin_lock_bh(&adapter->adv_rss_lock); in iavf_add_adv_rss_cfg()
1378 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_add_adv_rss_cfg()
1383 iavf_print_adv_rss_cfg(adapter, rss, in iavf_add_adv_rss_cfg()
1389 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_add_adv_rss_cfg()
1392 adapter->current_op = VIRTCHNL_OP_ADD_RSS_CFG; in iavf_add_adv_rss_cfg()
1393 iavf_send_pf_msg(adapter, VIRTCHNL_OP_ADD_RSS_CFG, in iavf_add_adv_rss_cfg()
1396 adapter->aq_required &= ~IAVF_FLAG_AQ_ADD_ADV_RSS_CFG; in iavf_add_adv_rss_cfg()
1409 void iavf_del_adv_rss_cfg(struct iavf_adapter *adapter) in iavf_del_adv_rss_cfg() argument
1416 if (adapter->current_op != VIRTCHNL_OP_UNKNOWN) { in iavf_del_adv_rss_cfg()
1418 dev_err(&adapter->pdev->dev, "Cannot remove RSS configuration, command %d pending\n", in iavf_del_adv_rss_cfg()
1419 adapter->current_op); in iavf_del_adv_rss_cfg()
1428 spin_lock_bh(&adapter->adv_rss_lock); in iavf_del_adv_rss_cfg()
1429 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_del_adv_rss_cfg()
1437 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_del_adv_rss_cfg()
1440 adapter->current_op = VIRTCHNL_OP_DEL_RSS_CFG; in iavf_del_adv_rss_cfg()
1441 iavf_send_pf_msg(adapter, VIRTCHNL_OP_DEL_RSS_CFG, in iavf_del_adv_rss_cfg()
1444 adapter->aq_required &= ~IAVF_FLAG_AQ_DEL_ADV_RSS_CFG; in iavf_del_adv_rss_cfg()
1456 void iavf_request_reset(struct iavf_adapter *adapter) in iavf_request_reset() argument
1459 iavf_send_pf_msg(adapter, VIRTCHNL_OP_RESET_VF, NULL, 0); in iavf_request_reset()
1460 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_request_reset()
1475 void iavf_virtchnl_completion(struct iavf_adapter *adapter, in iavf_virtchnl_completion() argument
1479 struct net_device *netdev = adapter->netdev; in iavf_virtchnl_completion()
1484 bool link_up = iavf_get_vpe_link_status(adapter, vpe); in iavf_virtchnl_completion()
1488 iavf_set_adapter_link_speed_from_vpe(adapter, vpe); in iavf_virtchnl_completion()
1491 if (adapter->link_up == link_up) in iavf_virtchnl_completion()
1502 if (adapter->state != __IAVF_RUNNING) in iavf_virtchnl_completion()
1509 if (adapter->flags & in iavf_virtchnl_completion()
1514 adapter->link_up = link_up; in iavf_virtchnl_completion()
1522 iavf_print_link_message(adapter); in iavf_virtchnl_completion()
1525 dev_info(&adapter->pdev->dev, "Reset warning received from the PF\n"); in iavf_virtchnl_completion()
1526 if (!(adapter->flags & IAVF_FLAG_RESET_PENDING)) { in iavf_virtchnl_completion()
1527 adapter->flags |= IAVF_FLAG_RESET_PENDING; in iavf_virtchnl_completion()
1528 dev_info(&adapter->pdev->dev, "Scheduling reset task\n"); in iavf_virtchnl_completion()
1529 queue_work(iavf_wq, &adapter->reset_task); in iavf_virtchnl_completion()
1533 dev_err(&adapter->pdev->dev, "Unknown event %d from PF\n", in iavf_virtchnl_completion()
1542 dev_err(&adapter->pdev->dev, "Failed to add VLAN filter, error %s\n", in iavf_virtchnl_completion()
1543 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1546 dev_err(&adapter->pdev->dev, "Failed to add MAC filter, error %s\n", in iavf_virtchnl_completion()
1547 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1548 iavf_mac_add_reject(adapter); in iavf_virtchnl_completion()
1550 ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr); in iavf_virtchnl_completion()
1553 dev_err(&adapter->pdev->dev, "Failed to delete VLAN filter, error %s\n", in iavf_virtchnl_completion()
1554 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1557 dev_err(&adapter->pdev->dev, "Failed to delete MAC filter, error %s\n", in iavf_virtchnl_completion()
1558 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1561 dev_err(&adapter->pdev->dev, "Failed to configure queue channels, error %s\n", in iavf_virtchnl_completion()
1562 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1563 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
1564 adapter->ch_config.state = __IAVF_TC_INVALID; in iavf_virtchnl_completion()
1569 dev_err(&adapter->pdev->dev, "Failed to disable queue channels, error %s\n", in iavf_virtchnl_completion()
1570 iavf_stat_str(&adapter->hw, v_retval)); in iavf_virtchnl_completion()
1571 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
1572 adapter->ch_config.state = __IAVF_TC_RUNNING; in iavf_virtchnl_completion()
1579 &adapter->cloud_filter_list, in iavf_virtchnl_completion()
1583 dev_info(&adapter->pdev->dev, "Failed to add cloud filter, error %s\n", in iavf_virtchnl_completion()
1584 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
1586 iavf_print_cloud_filter(adapter, in iavf_virtchnl_completion()
1590 adapter->num_cloud_filters--; in iavf_virtchnl_completion()
1598 list_for_each_entry(cf, &adapter->cloud_filter_list, in iavf_virtchnl_completion()
1602 dev_info(&adapter->pdev->dev, "Failed to del cloud filter, error %s\n", in iavf_virtchnl_completion()
1603 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
1605 iavf_print_cloud_filter(adapter, in iavf_virtchnl_completion()
1614 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1616 &adapter->fdir_list_head, in iavf_virtchnl_completion()
1619 dev_info(&adapter->pdev->dev, "Failed to add Flow Director filter, error %s\n", in iavf_virtchnl_completion()
1620 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
1622 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
1624 dev_err(&adapter->pdev->dev, in iavf_virtchnl_completion()
1628 adapter->fdir_active_fltr--; in iavf_virtchnl_completion()
1631 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1637 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1638 list_for_each_entry(fdir, &adapter->fdir_list_head, in iavf_virtchnl_completion()
1642 dev_info(&adapter->pdev->dev, "Failed to del Flow Director filter, error %s\n", in iavf_virtchnl_completion()
1643 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
1645 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
1648 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1654 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1656 &adapter->adv_rss_list_head, in iavf_virtchnl_completion()
1659 iavf_print_adv_rss_cfg(adapter, rss, in iavf_virtchnl_completion()
1666 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1672 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1673 list_for_each_entry(rss, &adapter->adv_rss_list_head, in iavf_virtchnl_completion()
1677 dev_err(&adapter->pdev->dev, "Failed to delete RSS configuration, error %s\n", in iavf_virtchnl_completion()
1678 iavf_stat_str(&adapter->hw, in iavf_virtchnl_completion()
1682 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1687 …dev_warn(&adapter->pdev->dev, "Changing VLAN Stripping is not allowed when Port VLAN is configured… in iavf_virtchnl_completion()
1690 dev_err(&adapter->pdev->dev, "PF returned error %d (%s) to our request %d\n", in iavf_virtchnl_completion()
1691 v_retval, iavf_stat_str(&adapter->hw, v_retval), in iavf_virtchnl_completion()
1698 iavf_mac_add_ok(adapter); in iavf_virtchnl_completion()
1699 if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) in iavf_virtchnl_completion()
1700 eth_hw_addr_set(netdev, adapter->hw.mac.addr); in iavf_virtchnl_completion()
1716 adapter->current_stats = *stats; in iavf_virtchnl_completion()
1723 memcpy(adapter->vf_res, msg, min(msglen, len)); in iavf_virtchnl_completion()
1724 iavf_validate_num_queues(adapter); in iavf_virtchnl_completion()
1725 iavf_vf_parse_hw_config(&adapter->hw, adapter->vf_res); in iavf_virtchnl_completion()
1726 if (is_zero_ether_addr(adapter->hw.mac.addr)) { in iavf_virtchnl_completion()
1728 ether_addr_copy(adapter->hw.mac.addr, netdev->dev_addr); in iavf_virtchnl_completion()
1731 eth_hw_addr_set(netdev, adapter->hw.mac.addr); in iavf_virtchnl_completion()
1733 adapter->hw.mac.addr); in iavf_virtchnl_completion()
1735 spin_lock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
1736 iavf_add_filter(adapter, adapter->hw.mac.addr); in iavf_virtchnl_completion()
1738 if (VLAN_ALLOWED(adapter)) { in iavf_virtchnl_completion()
1739 if (!list_empty(&adapter->vlan_filter_list)) { in iavf_virtchnl_completion()
1744 &adapter->vlan_filter_list, in iavf_virtchnl_completion()
1748 adapter->aq_required |= in iavf_virtchnl_completion()
1753 spin_unlock_bh(&adapter->mac_vlan_list_lock); in iavf_virtchnl_completion()
1754 iavf_process_config(adapter); in iavf_virtchnl_completion()
1760 mutex_unlock(&adapter->crit_lock); in iavf_virtchnl_completion()
1762 netdev_update_features(adapter->netdev); in iavf_virtchnl_completion()
1764 if (iavf_lock_timeout(&adapter->crit_lock, 10000)) in iavf_virtchnl_completion()
1765 dev_warn(&adapter->pdev->dev, "failed to acquire crit_lock in %s\n", in iavf_virtchnl_completion()
1772 iavf_irq_enable(adapter, true); in iavf_virtchnl_completion()
1773 adapter->flags &= ~IAVF_FLAG_QUEUES_DISABLED; in iavf_virtchnl_completion()
1776 iavf_free_all_tx_resources(adapter); in iavf_virtchnl_completion()
1777 iavf_free_all_rx_resources(adapter); in iavf_virtchnl_completion()
1778 if (adapter->state == __IAVF_DOWN_PENDING) { in iavf_virtchnl_completion()
1779 iavf_change_state(adapter, __IAVF_DOWN); in iavf_virtchnl_completion()
1780 wake_up(&adapter->down_waitqueue); in iavf_virtchnl_completion()
1789 if (v_opcode != adapter->current_op) in iavf_virtchnl_completion()
1797 if (msglen && CLIENT_ENABLED(adapter)) in iavf_virtchnl_completion()
1798 iavf_notify_client_message(&adapter->vsi, msg, msglen); in iavf_virtchnl_completion()
1802 adapter->client_pending &= in iavf_virtchnl_completion()
1809 adapter->hena = vrh->hena; in iavf_virtchnl_completion()
1811 dev_warn(&adapter->pdev->dev, in iavf_virtchnl_completion()
1819 if (vfres->num_queue_pairs != adapter->num_req_queues) { in iavf_virtchnl_completion()
1820 dev_info(&adapter->pdev->dev, in iavf_virtchnl_completion()
1822 adapter->num_req_queues, in iavf_virtchnl_completion()
1824 adapter->num_req_queues = 0; in iavf_virtchnl_completion()
1825 adapter->flags &= ~IAVF_FLAG_REINIT_ITR_NEEDED; in iavf_virtchnl_completion()
1832 list_for_each_entry(cf, &adapter->cloud_filter_list, list) { in iavf_virtchnl_completion()
1841 list_for_each_entry_safe(cf, cftmp, &adapter->cloud_filter_list, in iavf_virtchnl_completion()
1847 adapter->num_cloud_filters--; in iavf_virtchnl_completion()
1856 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1858 &adapter->fdir_list_head, in iavf_virtchnl_completion()
1862 dev_info(&adapter->pdev->dev, "Flow Director filter with location %u is added\n", in iavf_virtchnl_completion()
1867 dev_info(&adapter->pdev->dev, "Failed to add Flow Director filter with status: %d\n", in iavf_virtchnl_completion()
1869 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
1872 adapter->fdir_active_fltr--; in iavf_virtchnl_completion()
1876 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1883 spin_lock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1884 list_for_each_entry_safe(fdir, fdir_tmp, &adapter->fdir_list_head, in iavf_virtchnl_completion()
1888 dev_info(&adapter->pdev->dev, "Flow Director filter with location %u is deleted\n", in iavf_virtchnl_completion()
1892 adapter->fdir_active_fltr--; in iavf_virtchnl_completion()
1895 dev_info(&adapter->pdev->dev, "Failed to delete Flow Director filter with status: %d\n", in iavf_virtchnl_completion()
1897 iavf_print_fdir_fltr(adapter, fdir); in iavf_virtchnl_completion()
1901 spin_unlock_bh(&adapter->fdir_fltr_lock); in iavf_virtchnl_completion()
1907 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1908 list_for_each_entry(rss, &adapter->adv_rss_list_head, list) { in iavf_virtchnl_completion()
1910 iavf_print_adv_rss_cfg(adapter, rss, in iavf_virtchnl_completion()
1916 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1922 spin_lock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1924 &adapter->adv_rss_list_head, list) { in iavf_virtchnl_completion()
1930 spin_unlock_bh(&adapter->adv_rss_lock); in iavf_virtchnl_completion()
1934 if (adapter->current_op && (v_opcode != adapter->current_op)) in iavf_virtchnl_completion()
1935 dev_warn(&adapter->pdev->dev, "Expected response %d from PF, received %d\n", in iavf_virtchnl_completion()
1936 adapter->current_op, v_opcode); in iavf_virtchnl_completion()
1939 adapter->current_op = VIRTCHNL_OP_UNKNOWN; in iavf_virtchnl_completion()