Lines Matching full:pf
21 * @pf: the PF structure to search for the vsi
24 static struct i40e_vsi *i40e_dbg_find_vsi(struct i40e_pf *pf, int seid) in i40e_dbg_find_vsi() argument
29 dev_info(&pf->pdev->dev, "%d: bad seid\n", seid); in i40e_dbg_find_vsi()
31 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_find_vsi()
32 if (pf->vsi[i] && (pf->vsi[i]->seid == seid)) in i40e_dbg_find_vsi()
33 return pf->vsi[i]; in i40e_dbg_find_vsi()
40 * @pf: the PF structure to search for the veb
43 static struct i40e_veb *i40e_dbg_find_veb(struct i40e_pf *pf, int seid) in i40e_dbg_find_veb() argument
48 if (pf->veb[i] && pf->veb[i]->seid == seid) in i40e_dbg_find_veb()
49 return pf->veb[i]; in i40e_dbg_find_veb()
72 struct i40e_pf *pf = filp->private_data; in i40e_dbg_command_read() local
89 pf->vsi[pf->lan_vsi]->netdev->name, in i40e_dbg_command_read()
112 * @pf: the i40e_pf created in command write
115 static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid) in i40e_dbg_dump_vsi_seid() argument
122 vsi = i40e_dbg_find_vsi(pf, seid); in i40e_dbg_dump_vsi_seid()
124 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
128 dev_info(&pf->pdev->dev, "vsi seid %d\n", seid); in i40e_dbg_dump_vsi_seid()
132 dev_info(&pf->pdev->dev, " netdev: name = %s, state = %lu, flags = 0x%08x\n", in i40e_dbg_dump_vsi_seid()
134 dev_info(&pf->pdev->dev, " features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
136 dev_info(&pf->pdev->dev, " hw_features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
138 dev_info(&pf->pdev->dev, " vlan_features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
141 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
145 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
148 if (vsi == pf->vsi[pf->lan_vsi]) in i40e_dbg_dump_vsi_seid()
149 dev_info(&pf->pdev->dev, " MAC address: %pM SAN MAC: %pM Port MAC: %pM\n", in i40e_dbg_dump_vsi_seid()
150 pf->hw.mac.addr, in i40e_dbg_dump_vsi_seid()
151 pf->hw.mac.san_addr, in i40e_dbg_dump_vsi_seid()
152 pf->hw.mac.port_addr); in i40e_dbg_dump_vsi_seid()
154 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
159 dev_info(&pf->pdev->dev, " active_filters %u, promisc_threshold %u, overflow promisc %s\n", in i40e_dbg_dump_vsi_seid()
164 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
170 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
176 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
180 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
185 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
190 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
195 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
199 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
203 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
209 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
215 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
219 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
224 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
229 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
234 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
238 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
242 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
253 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
258 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
261 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
267 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
272 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
277 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
282 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
285 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
296 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
301 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
307 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
312 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
317 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
320 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
323 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
335 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
340 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
346 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
351 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
356 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
359 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
362 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
370 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
373 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
376 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
379 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
382 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
386 dev_info(&pf->pdev->dev, " type = %i\n", vsi->type); in i40e_dbg_dump_vsi_seid()
388 dev_info(&pf->pdev->dev, " VF ID = %i\n", vsi->vf_id); in i40e_dbg_dump_vsi_seid()
389 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
392 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
395 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
398 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
402 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
406 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
409 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
413 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
419 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
425 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
431 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
437 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
440 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
443 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
449 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
455 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
458 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
466 dev_info(&pf->pdev->dev, " idx = %d\n", vsi->idx); in i40e_dbg_dump_vsi_seid()
467 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
471 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
477 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
481 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
491 * @pf: the i40e_pf created in command write
493 static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf) in i40e_dbg_dump_aq_desc() argument
496 struct i40e_hw *hw = &pf->hw; in i40e_dbg_dump_aq_desc()
501 dev_driver_string(&pf->pdev->dev), in i40e_dbg_dump_aq_desc()
502 dev_name(&pf->pdev->dev)); in i40e_dbg_dump_aq_desc()
505 dev_info(&pf->pdev->dev, "AdminQ Tx Ring\n"); in i40e_dbg_dump_aq_desc()
510 dev_info(&pf->pdev->dev, in i40e_dbg_dump_aq_desc()
518 dev_info(&pf->pdev->dev, "AdminQ Rx Ring\n"); in i40e_dbg_dump_aq_desc()
523 dev_info(&pf->pdev->dev, in i40e_dbg_dump_aq_desc()
538 * @pf: the i40e_pf created in command write
542 struct i40e_pf *pf, enum ring_type type) in i40e_dbg_dump_desc() argument
551 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_dump_desc()
553 dev_info(&pf->pdev->dev, "vsi %d not found\n", vsi_seid); in i40e_dbg_dump_desc()
557 dev_info(&pf->pdev->dev, "XDP not enabled on VSI %d\n", vsi_seid); in i40e_dbg_dump_desc()
561 dev_info(&pf->pdev->dev, "ring %d not found\n", ring_id); in i40e_dbg_dump_desc()
565 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
588 dev_info(&pf->pdev->dev, "VSI = %02i Rx ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
591 dev_info(&pf->pdev->dev, "VSI = %02i Tx ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
594 dev_info(&pf->pdev->dev, "VSI = %02i XDP ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
600 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
606 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
614 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
620 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
626 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
632 dev_info(&pf->pdev->dev, "dump desc rx/tx/xdp <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_dump_desc()
641 * @pf: the i40e_pf created in command write
643 static void i40e_dbg_dump_vsi_no_seid(struct i40e_pf *pf) in i40e_dbg_dump_vsi_no_seid() argument
647 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_dump_vsi_no_seid()
648 if (pf->vsi[i]) in i40e_dbg_dump_vsi_no_seid()
649 dev_info(&pf->pdev->dev, "dump vsi[%d]: %d\n", in i40e_dbg_dump_vsi_no_seid()
650 i, pf->vsi[i]->seid); in i40e_dbg_dump_vsi_no_seid()
655 * @pf: the i40e_pf created in command write
658 static void i40e_dbg_dump_eth_stats(struct i40e_pf *pf, in i40e_dbg_dump_eth_stats() argument
661 dev_info(&pf->pdev->dev, " ethstats:\n"); in i40e_dbg_dump_eth_stats()
662 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
665 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
668 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
671 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
674 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
681 * @pf: the i40e_pf created in command write
684 static void i40e_dbg_dump_veb_seid(struct i40e_pf *pf, int seid) in i40e_dbg_dump_veb_seid() argument
688 veb = i40e_dbg_find_veb(pf, seid); in i40e_dbg_dump_veb_seid()
690 dev_info(&pf->pdev->dev, "can't find veb %d\n", seid); in i40e_dbg_dump_veb_seid()
693 dev_info(&pf->pdev->dev, in i40e_dbg_dump_veb_seid()
698 i40e_dbg_dump_eth_stats(pf, &veb->stats); in i40e_dbg_dump_veb_seid()
703 * @pf: the i40e_pf created in command write
705 static void i40e_dbg_dump_veb_all(struct i40e_pf *pf) in i40e_dbg_dump_veb_all() argument
711 veb = pf->veb[i]; in i40e_dbg_dump_veb_all()
713 i40e_dbg_dump_veb_seid(pf, veb->seid); in i40e_dbg_dump_veb_all()
719 * @pf: the i40e_pf created in command write
722 static void i40e_dbg_dump_vf(struct i40e_pf *pf, int vf_id) in i40e_dbg_dump_vf() argument
727 if (!pf->num_alloc_vfs) { in i40e_dbg_dump_vf()
728 dev_info(&pf->pdev->dev, "no VFs allocated\n"); in i40e_dbg_dump_vf()
729 } else if ((vf_id >= 0) && (vf_id < pf->num_alloc_vfs)) { in i40e_dbg_dump_vf()
730 vf = &pf->vf[vf_id]; in i40e_dbg_dump_vf()
731 vsi = pf->vsi[vf->lan_vsi_idx]; in i40e_dbg_dump_vf()
732 dev_info(&pf->pdev->dev, "vf %2d: VSI id=%d, seid=%d, qps=%d\n", in i40e_dbg_dump_vf()
734 dev_info(&pf->pdev->dev, " num MDD=%lld, invalid msg=%lld, valid msg=%lld\n", in i40e_dbg_dump_vf()
739 dev_info(&pf->pdev->dev, "invalid VF id %d\n", vf_id); in i40e_dbg_dump_vf()
745 * @pf: the i40e_pf created in command write
747 static void i40e_dbg_dump_vf_all(struct i40e_pf *pf) in i40e_dbg_dump_vf_all() argument
751 if (!pf->num_alloc_vfs) in i40e_dbg_dump_vf_all()
752 dev_info(&pf->pdev->dev, "no VFs enabled!\n"); in i40e_dbg_dump_vf_all()
754 for (i = 0; i < pf->num_alloc_vfs; i++) in i40e_dbg_dump_vf_all()
755 i40e_dbg_dump_vf(pf, i); in i40e_dbg_dump_vf_all()
769 struct i40e_pf *pf = filp->private_data; in i40e_dbg_command_write() local
802 /* default to PF VSI */ in i40e_dbg_command_write()
803 vsi_seid = pf->vsi[pf->lan_vsi]->seid; in i40e_dbg_command_write()
805 dev_info(&pf->pdev->dev, "add VSI %d: bad vsi seid\n", in i40e_dbg_command_write()
813 if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) { in i40e_dbg_command_write()
814 pf->flags |= I40E_FLAG_VEB_MODE_ENABLED; in i40e_dbg_command_write()
815 i40e_do_reset_safe(pf, I40E_PF_RESET_FLAG); in i40e_dbg_command_write()
818 vsi = i40e_vsi_setup(pf, I40E_VSI_VMDQ2, vsi_seid, 0); in i40e_dbg_command_write()
820 dev_info(&pf->pdev->dev, "added VSI %d to relay %d\n", in i40e_dbg_command_write()
823 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); in i40e_dbg_command_write()
828 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
833 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
835 dev_info(&pf->pdev->dev, "del VSI %d: seid not found\n", in i40e_dbg_command_write()
840 dev_info(&pf->pdev->dev, "deleting VSI %d\n", vsi_seid); in i40e_dbg_command_write()
849 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
854 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
860 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
862 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
868 if (pf->veb[i] && pf->veb[i]->seid == uplink_seid) in i40e_dbg_command_write()
871 uplink_seid != pf->mac_seid) { in i40e_dbg_command_write()
872 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
878 veb = i40e_veb_setup(pf, 0, uplink_seid, vsi_seid, in i40e_dbg_command_write()
881 dev_info(&pf->pdev->dev, "added relay %d\n", veb->seid); in i40e_dbg_command_write()
883 dev_info(&pf->pdev->dev, "add relay failed\n"); in i40e_dbg_command_write()
889 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
894 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
901 if (pf->veb[i] && pf->veb[i]->seid == veb_seid) in i40e_dbg_command_write()
904 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
909 dev_info(&pf->pdev->dev, "deleting relay %d\n", veb_seid); in i40e_dbg_command_write()
910 i40e_veb_release(pf->veb[i]); in i40e_dbg_command_write()
918 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
923 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
925 dev_info(&pf->pdev->dev, "add pvid: VSI %d not found\n", in i40e_dbg_command_write()
933 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
937 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
945 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
951 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
953 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
959 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
964 i40e_fetch_switch_configuration(pf, true); in i40e_dbg_command_write()
968 i40e_dbg_dump_vsi_seid(pf, vsi_seid); in i40e_dbg_command_write()
970 i40e_dbg_dump_vsi_no_seid(pf); in i40e_dbg_command_write()
974 i40e_dbg_dump_veb_seid(pf, vsi_seid); in i40e_dbg_command_write()
976 i40e_dbg_dump_veb_all(pf); in i40e_dbg_command_write()
980 i40e_dbg_dump_vf(pf, vf_id); in i40e_dbg_command_write()
982 i40e_dbg_dump_vf_all(pf); in i40e_dbg_command_write()
989 desc_n, pf, RING_TYPE_RX); in i40e_dbg_command_write()
995 desc_n, pf, RING_TYPE_TX); in i40e_dbg_command_write()
1001 desc_n, pf, RING_TYPE_XDP); in i40e_dbg_command_write()
1003 i40e_dbg_dump_aq_desc(pf); in i40e_dbg_command_write()
1005 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1007 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1009 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1011 dev_info(&pf->pdev->dev, "dump desc aq\n"); in i40e_dbg_command_write()
1014 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1015 "core reset count: %d\n", pf->corer_count); in i40e_dbg_command_write()
1016 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1017 "global reset count: %d\n", pf->globr_count); in i40e_dbg_command_write()
1018 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1019 "emp reset count: %d\n", pf->empr_count); in i40e_dbg_command_write()
1020 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1021 "pf reset count: %d\n", pf->pfr_count); in i40e_dbg_command_write()
1022 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1023 "pf tx sluggish count: %d\n", in i40e_dbg_command_write()
1024 pf->tx_sluggish_count); in i40e_dbg_command_write()
1028 &pf->hw.local_dcbx_config; in i40e_dbg_command_write()
1030 &pf->hw.remote_dcbx_config; in i40e_dbg_command_write()
1042 vsi = pf->vsi[pf->lan_vsi]; in i40e_dbg_command_write()
1047 ret = i40e_aq_query_port_ets_config(&pf->hw, in i40e_dbg_command_write()
1051 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1053 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1058 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1065 dev_info(&pf->pdev->dev, "port bw: tc_bw_share=%d tc_bw_limit=%d\n", in i40e_dbg_command_write()
1073 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1075 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1080 dev_info(&pf->pdev->dev, "port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1086 dev_info(&pf->pdev->dev, "port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1091 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1095 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1098 dev_info(&pf->pdev->dev, "port app_table: %d prio=%d selector=%d protocol=0x%x\n", in i40e_dbg_command_write()
1104 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1109 dev_info(&pf->pdev->dev, "remote port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1115 dev_info(&pf->pdev->dev, "remote port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1120 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1126 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1130 dev_info(&pf->pdev->dev, "remote port app_table: %d prio=%d selector=%d protocol=0x%x\n", in i40e_dbg_command_write()
1147 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1152 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1159 ret = i40e_aq_debug_dump(&pf->hw, cluster_id, table_id, in i40e_dbg_command_write()
1164 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1166 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1171 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1180 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1182 dev_info(&pf->pdev->dev, "dump switch\n"); in i40e_dbg_command_write()
1183 dev_info(&pf->pdev->dev, "dump vsi [seid]\n"); in i40e_dbg_command_write()
1184 dev_info(&pf->pdev->dev, "dump reset stats\n"); in i40e_dbg_command_write()
1185 dev_info(&pf->pdev->dev, "dump port\n"); in i40e_dbg_command_write()
1186 dev_info(&pf->pdev->dev, "dump vf [vf_id]\n"); in i40e_dbg_command_write()
1187 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1191 dev_info(&pf->pdev->dev, "debugfs: forcing PFR\n"); in i40e_dbg_command_write()
1192 i40e_do_reset_safe(pf, BIT(__I40E_PF_RESET_REQUESTED)); in i40e_dbg_command_write()
1195 dev_info(&pf->pdev->dev, "debugfs: forcing CoreR\n"); in i40e_dbg_command_write()
1196 i40e_do_reset_safe(pf, BIT(__I40E_CORE_RESET_REQUESTED)); in i40e_dbg_command_write()
1199 dev_info(&pf->pdev->dev, "debugfs: forcing GlobR\n"); in i40e_dbg_command_write()
1200 i40e_do_reset_safe(pf, BIT(__I40E_GLOBAL_RESET_REQUESTED)); in i40e_dbg_command_write()
1208 dev_info(&pf->pdev->dev, "read <reg>\n"); in i40e_dbg_command_write()
1213 if (address > (pf->ioremap_len - sizeof(u32))) { in i40e_dbg_command_write()
1214 dev_info(&pf->pdev->dev, "read reg address 0x%08x too large, max=0x%08lx\n", in i40e_dbg_command_write()
1215 address, (unsigned long int)(pf->ioremap_len - sizeof(u32))); in i40e_dbg_command_write()
1219 value = rd32(&pf->hw, address); in i40e_dbg_command_write()
1220 dev_info(&pf->pdev->dev, "read: 0x%08x = 0x%08x\n", in i40e_dbg_command_write()
1228 dev_info(&pf->pdev->dev, "write <reg> <value>\n"); in i40e_dbg_command_write()
1233 if (address > (pf->ioremap_len - sizeof(u32))) { in i40e_dbg_command_write()
1234 dev_info(&pf->pdev->dev, "write reg address 0x%08x too large, max=0x%08lx\n", in i40e_dbg_command_write()
1235 address, (unsigned long int)(pf->ioremap_len - sizeof(u32))); in i40e_dbg_command_write()
1238 wr32(&pf->hw, address, value); in i40e_dbg_command_write()
1239 value = rd32(&pf->hw, address); in i40e_dbg_command_write()
1240 dev_info(&pf->pdev->dev, "write: 0x%08x = 0x%08x\n", in i40e_dbg_command_write()
1248 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_command_write()
1249 i40e_vsi_reset_stats(pf->vsi[i]); in i40e_dbg_command_write()
1250 dev_info(&pf->pdev->dev, "vsi clear stats called for all vsi's\n"); in i40e_dbg_command_write()
1252 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
1254 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1260 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1264 dev_info(&pf->pdev->dev, "clear_stats vsi [seid]\n"); in i40e_dbg_command_write()
1267 if (pf->hw.partition_id == 1) { in i40e_dbg_command_write()
1268 i40e_pf_reset_stats(pf); in i40e_dbg_command_write()
1269 dev_info(&pf->pdev->dev, "port stats cleared\n"); in i40e_dbg_command_write()
1271 dev_info(&pf->pdev->dev, "clear port stats not allowed on this port partition\n"); in i40e_dbg_command_write()
1274 dev_info(&pf->pdev->dev, "clear_stats vsi [seid] or clear_stats port\n"); in i40e_dbg_command_write()
1293 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1300 ret = i40e_asq_send_command(&pf->hw, desc, NULL, 0, NULL); in i40e_dbg_command_write()
1302 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); in i40e_dbg_command_write()
1304 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1306 desc->opcode, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1308 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1312 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1342 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1360 ret = i40e_asq_send_command(&pf->hw, desc, buff, in i40e_dbg_command_write()
1363 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); in i40e_dbg_command_write()
1365 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1367 desc->opcode, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1369 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1373 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1389 dev_info(&pf->pdev->dev, "FD current total filter count for this interface: %d\n", in i40e_dbg_command_write()
1390 i40e_get_current_fd_count(pf)); in i40e_dbg_command_write()
1395 ret = i40e_aq_stop_lldp(&pf->hw, false, false, NULL); in i40e_dbg_command_write()
1397 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1399 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1402 ret = i40e_aq_add_rem_control_packet_filter(&pf->hw, in i40e_dbg_command_write()
1403 pf->hw.mac.addr, in i40e_dbg_command_write()
1405 pf->vsi[pf->lan_vsi]->seid, in i40e_dbg_command_write()
1408 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1410 __func__, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1414 pf->dcbx_cap = DCB_CAP_DCBX_HOST | in i40e_dbg_command_write()
1420 ret = i40e_aq_add_rem_control_packet_filter(&pf->hw, in i40e_dbg_command_write()
1421 pf->hw.mac.addr, in i40e_dbg_command_write()
1423 pf->vsi[pf->lan_vsi]->seid, in i40e_dbg_command_write()
1426 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1428 __func__, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1432 ret = i40e_aq_start_lldp(&pf->hw, false, NULL); in i40e_dbg_command_write()
1434 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1436 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1440 pf->dcbx_cap = DCB_CAP_DCBX_LLD_MANAGED | in i40e_dbg_command_write()
1453 ret = i40e_aq_get_lldp_mib(&pf->hw, 0, in i40e_dbg_command_write()
1458 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1460 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1465 dev_info(&pf->pdev->dev, "LLDP MIB (local)\n"); in i40e_dbg_command_write()
1480 ret = i40e_aq_get_lldp_mib(&pf->hw, in i40e_dbg_command_write()
1486 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1488 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1493 dev_info(&pf->pdev->dev, "LLDP MIB (remote)\n"); in i40e_dbg_command_write()
1502 ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw, in i40e_dbg_command_write()
1505 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1507 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1513 ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw, in i40e_dbg_command_write()
1516 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1518 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1541 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1557 ret = i40e_acquire_nvm(&pf->hw, I40E_RESOURCE_READ); in i40e_dbg_command_write()
1559 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1561 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1566 ret = i40e_aq_read_nvm(&pf->hw, module, (2 * offset), in i40e_dbg_command_write()
1568 i40e_release_nvm(&pf->hw); in i40e_dbg_command_write()
1570 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1572 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1574 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1585 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); in i40e_dbg_command_write()
1586 dev_info(&pf->pdev->dev, "available commands\n"); in i40e_dbg_command_write()
1587 dev_info(&pf->pdev->dev, " add vsi [relay_seid]\n"); in i40e_dbg_command_write()
1588 dev_info(&pf->pdev->dev, " del vsi [vsi_seid]\n"); in i40e_dbg_command_write()
1589 dev_info(&pf->pdev->dev, " add relay <uplink_seid> <vsi_seid>\n"); in i40e_dbg_command_write()
1590 dev_info(&pf->pdev->dev, " del relay <relay_seid>\n"); in i40e_dbg_command_write()
1591 dev_info(&pf->pdev->dev, " add pvid <vsi_seid> <vid>\n"); in i40e_dbg_command_write()
1592 dev_info(&pf->pdev->dev, " del pvid <vsi_seid>\n"); in i40e_dbg_command_write()
1593 dev_info(&pf->pdev->dev, " dump switch\n"); in i40e_dbg_command_write()
1594 dev_info(&pf->pdev->dev, " dump vsi [seid]\n"); in i40e_dbg_command_write()
1595 dev_info(&pf->pdev->dev, " dump desc tx <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1596 dev_info(&pf->pdev->dev, " dump desc rx <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1597 dev_info(&pf->pdev->dev, " dump desc xdp <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1598 dev_info(&pf->pdev->dev, " dump desc aq\n"); in i40e_dbg_command_write()
1599 dev_info(&pf->pdev->dev, " dump reset stats\n"); in i40e_dbg_command_write()
1600 dev_info(&pf->pdev->dev, " dump debug fwdata <cluster_id> <table_id> <index>\n"); in i40e_dbg_command_write()
1601 dev_info(&pf->pdev->dev, " read <reg>\n"); in i40e_dbg_command_write()
1602 dev_info(&pf->pdev->dev, " write <reg> <value>\n"); in i40e_dbg_command_write()
1603 dev_info(&pf->pdev->dev, " clear_stats vsi [seid]\n"); in i40e_dbg_command_write()
1604 dev_info(&pf->pdev->dev, " clear_stats port\n"); in i40e_dbg_command_write()
1605 dev_info(&pf->pdev->dev, " pfr\n"); in i40e_dbg_command_write()
1606 dev_info(&pf->pdev->dev, " corer\n"); in i40e_dbg_command_write()
1607 dev_info(&pf->pdev->dev, " globr\n"); in i40e_dbg_command_write()
1608 …dev_info(&pf->pdev->dev, " send aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <cookie_l> … in i40e_dbg_command_write()
1609 …dev_info(&pf->pdev->dev, " send indirect aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <c… in i40e_dbg_command_write()
1610 dev_info(&pf->pdev->dev, " fd current cnt"); in i40e_dbg_command_write()
1611 dev_info(&pf->pdev->dev, " lldp start\n"); in i40e_dbg_command_write()
1612 dev_info(&pf->pdev->dev, " lldp stop\n"); in i40e_dbg_command_write()
1613 dev_info(&pf->pdev->dev, " lldp get local\n"); in i40e_dbg_command_write()
1614 dev_info(&pf->pdev->dev, " lldp get remote\n"); in i40e_dbg_command_write()
1615 dev_info(&pf->pdev->dev, " lldp event on\n"); in i40e_dbg_command_write()
1616 dev_info(&pf->pdev->dev, " lldp event off\n"); in i40e_dbg_command_write()
1617 dev_info(&pf->pdev->dev, " nvm read [module] [word_offset] [word_count]\n"); in i40e_dbg_command_write()
1650 struct i40e_pf *pf = filp->private_data; in i40e_dbg_netdev_ops_read() local
1667 pf->vsi[pf->lan_vsi]->netdev->name, in i40e_dbg_netdev_ops_read()
1691 struct i40e_pf *pf = filp->private_data; in i40e_dbg_netdev_ops_write() local
1723 dev_info(&pf->pdev->dev, "change_mtu <vsi_seid> <mtu>\n"); in i40e_dbg_netdev_ops_write()
1726 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1728 dev_info(&pf->pdev->dev, in i40e_dbg_netdev_ops_write()
1731 dev_info(&pf->pdev->dev, "change_mtu: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1737 dev_info(&pf->pdev->dev, "change_mtu called\n"); in i40e_dbg_netdev_ops_write()
1739 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); in i40e_dbg_netdev_ops_write()
1745 dev_info(&pf->pdev->dev, "set_rx_mode <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1748 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1750 dev_info(&pf->pdev->dev, in i40e_dbg_netdev_ops_write()
1753 dev_info(&pf->pdev->dev, "set_rx_mode: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1758 dev_info(&pf->pdev->dev, "set_rx_mode called\n"); in i40e_dbg_netdev_ops_write()
1760 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); in i40e_dbg_netdev_ops_write()
1766 dev_info(&pf->pdev->dev, "napi <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1769 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1771 dev_info(&pf->pdev->dev, "napi: VSI %d not found\n", in i40e_dbg_netdev_ops_write()
1774 dev_info(&pf->pdev->dev, "napi: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1779 dev_info(&pf->pdev->dev, "napi called\n"); in i40e_dbg_netdev_ops_write()
1782 dev_info(&pf->pdev->dev, "unknown command '%s'\n", in i40e_dbg_netdev_ops_write()
1784 dev_info(&pf->pdev->dev, "available commands\n"); in i40e_dbg_netdev_ops_write()
1785 dev_info(&pf->pdev->dev, " change_mtu <vsi_seid> <mtu>\n"); in i40e_dbg_netdev_ops_write()
1786 dev_info(&pf->pdev->dev, " set_rx_mode <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1787 dev_info(&pf->pdev->dev, " napi <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1801 * i40e_dbg_pf_init - setup the debugfs directory for the PF
1802 * @pf: the PF that is starting up
1804 void i40e_dbg_pf_init(struct i40e_pf *pf) in i40e_dbg_pf_init() argument
1806 const char *name = pci_name(pf->pdev); in i40e_dbg_pf_init()
1808 pf->i40e_dbg_pf = debugfs_create_dir(name, i40e_dbg_root); in i40e_dbg_pf_init()
1810 debugfs_create_file("command", 0600, pf->i40e_dbg_pf, pf, in i40e_dbg_pf_init()
1813 debugfs_create_file("netdev_ops", 0600, pf->i40e_dbg_pf, pf, in i40e_dbg_pf_init()
1818 * i40e_dbg_pf_exit - clear out the PF's debugfs entries
1819 * @pf: the PF that is stopping
1821 void i40e_dbg_pf_exit(struct i40e_pf *pf) in i40e_dbg_pf_exit() argument
1823 debugfs_remove_recursive(pf->i40e_dbg_pf); in i40e_dbg_pf_exit()
1824 pf->i40e_dbg_pf = NULL; in i40e_dbg_pf_exit()