Lines Matching full:nsp

186 	struct nfp_nsp *nsp;  in nfp_net_get_nspinfo()  local
191 nsp = nfp_nsp_open(app->cpp); in nfp_net_get_nspinfo()
192 if (IS_ERR(nsp)) in nfp_net_get_nspinfo()
196 nfp_nsp_get_abi_ver_major(nsp), in nfp_net_get_nspinfo()
197 nfp_nsp_get_abi_ver_minor(nsp)); in nfp_net_get_nspinfo()
199 nfp_nsp_close(nsp); in nfp_net_get_nspinfo()
552 struct nfp_nsp *nsp; in nfp_net_set_link_ksettings() local
565 nsp = nfp_eth_config_start(port->app->cpp, eth_port->index); in nfp_net_set_link_ksettings()
566 if (IS_ERR(nsp)) in nfp_net_set_link_ksettings()
567 return PTR_ERR(nsp); in nfp_net_set_link_ksettings()
575 err = __nfp_eth_set_aneg(nsp, req_aneg ? NFP_ANEG_AUTO : NFP_ANEG_DISABLED); in nfp_net_set_link_ksettings()
604 err = __nfp_eth_set_speed(nsp, speed); in nfp_net_set_link_ksettings()
609 err = nfp_eth_config_commit_end(nsp); in nfp_net_set_link_ksettings()
618 nfp_eth_config_cleanup_end(nsp); in nfp_net_set_link_ksettings()
694 struct nfp_nsp *nsp; in nfp_test_nsp() local
697 nsp = nfp_nsp_open(app->cpp); in nfp_test_nsp()
698 if (IS_ERR(nsp)) { in nfp_test_nsp()
699 err = PTR_ERR(nsp); in nfp_test_nsp()
700 netdev_info(netdev, "NSP Test: failed to access the NSP: %d\n", err); in nfp_test_nsp()
704 if (nfp_nsp_get_abi_ver_minor(nsp) < 15) { in nfp_test_nsp()
715 err = nfp_nsp_read_identify(nsp, nspi, sizeof(*nspi)); in nfp_test_nsp()
717 netdev_info(netdev, "NSP Test: reading bsp version failed %d\n", err); in nfp_test_nsp()
721 nfp_nsp_close(nsp); in nfp_test_nsp()
790 {"NSP Test", nsp_test_supported, nfp_test_nsp},
1207 /* NSP only supports a single mode at a time */ in nfp_port_fec_ethtool_to_nsp()
1629 struct nfp_nsp *nsp; in nfp_port_get_module_info() local
1643 nsp = nfp_nsp_open(port->app->cpp); in nfp_port_get_module_info()
1644 if (IS_ERR(nsp)) { in nfp_port_get_module_info()
1645 err = PTR_ERR(nsp); in nfp_port_get_module_info()
1646 netdev_err(netdev, "Failed to access the NSP: %d\n", err); in nfp_port_get_module_info()
1650 if (!nfp_nsp_has_read_module_eeprom(nsp)) { in nfp_port_get_module_info()
1659 err = nfp_nsp_read_module_eeprom(nsp, eth_port->eth_index, in nfp_port_get_module_info()
1674 err = nfp_nsp_read_module_eeprom(nsp, eth_port->eth_index, in nfp_port_get_module_info()
1699 nfp_nsp_close(nsp); in nfp_port_get_module_info()
1709 struct nfp_nsp *nsp; in nfp_port_get_module_eeprom() local
1717 nsp = nfp_nsp_open(port->app->cpp); in nfp_port_get_module_eeprom()
1718 if (IS_ERR(nsp)) { in nfp_port_get_module_eeprom()
1719 err = PTR_ERR(nsp); in nfp_port_get_module_eeprom()
1720 netdev_err(netdev, "Failed to access the NSP: %d\n", err); in nfp_port_get_module_eeprom()
1724 if (!nfp_nsp_has_read_module_eeprom(nsp)) { in nfp_port_get_module_eeprom()
1730 err = nfp_nsp_read_module_eeprom(nsp, eth_port->eth_index, in nfp_port_get_module_eeprom()
1747 nfp_nsp_close(nsp); in nfp_port_get_module_eeprom()
1941 struct nfp_nsp *nsp; in nfp_net_get_nsp_hwindex() local
1949 nsp = nfp_nsp_open(port->app->cpp); in nfp_net_get_nsp_hwindex()
1950 if (IS_ERR(nsp)) { in nfp_net_get_nsp_hwindex()
1951 err = PTR_ERR(nsp); in nfp_net_get_nsp_hwindex()
1952 netdev_err(netdev, "Failed to access the NSP: %d\n", err); in nfp_net_get_nsp_hwindex()
1956 if (!nfp_nsp_has_hwinfo_lookup(nsp)) { in nfp_net_get_nsp_hwindex()
1957 netdev_err(netdev, "NSP doesn't support PF MAC generation\n"); in nfp_net_get_nsp_hwindex()
1958 nfp_nsp_close(nsp); in nfp_net_get_nsp_hwindex()
1962 *nspptr = nsp; in nfp_net_get_nsp_hwindex()
1973 struct nfp_nsp *nsp; in nfp_net_get_port_mac_by_hwinfo() local
1977 err = nfp_net_get_nsp_hwindex(netdev, &nsp, &index); in nfp_net_get_port_mac_by_hwinfo()
1982 err = nfp_nsp_hwinfo_lookup(nsp, hwinfo, sizeof(hwinfo)); in nfp_net_get_port_mac_by_hwinfo()
1983 nfp_nsp_close(nsp); in nfp_net_get_port_mac_by_hwinfo()
2006 struct nfp_nsp *nsp; in nfp_net_set_port_mac_by_hwinfo() local
2010 err = nfp_net_get_nsp_hwindex(netdev, &nsp, &index); in nfp_net_set_port_mac_by_hwinfo()
2019 err = nfp_nsp_hwinfo_set(nsp, hwinfo, sizeof(hwinfo)); in nfp_net_set_port_mac_by_hwinfo()
2020 nfp_nsp_close(nsp); in nfp_net_set_port_mac_by_hwinfo()