Lines Matching refs:rc

347 	int rc;  in efx_init_eventq()  local
354 rc = efx_nic_init_eventq(channel); in efx_init_eventq()
355 if (rc == 0) { in efx_init_eventq()
360 return rc; in efx_init_eventq()
489 int rc; in efx_probe_channel() local
494 rc = channel->type->pre_probe(channel); in efx_probe_channel()
495 if (rc) in efx_probe_channel()
498 rc = efx_probe_eventq(channel); in efx_probe_channel()
499 if (rc) in efx_probe_channel()
503 rc = efx_probe_tx_queue(tx_queue); in efx_probe_channel()
504 if (rc) in efx_probe_channel()
509 rc = efx_probe_rx_queue(rx_queue); in efx_probe_channel()
510 if (rc) in efx_probe_channel()
518 return rc; in efx_probe_channel()
553 int rc; in efx_probe_channels() local
564 rc = efx_probe_channel(channel); in efx_probe_channels()
565 if (rc) { in efx_probe_channels()
578 return rc; in efx_probe_channels()
674 int rc; in efx_stop_datapath() local
700 rc = efx->type->fini_dmaq(efx); in efx_stop_datapath()
701 if (rc && EFX_WORKAROUND_7803(efx)) { in efx_stop_datapath()
710 } else if (rc) { in efx_stop_datapath()
755 int rc, rc2; in efx_realloc_channels() local
757 rc = efx_check_disabled(efx); in efx_realloc_channels()
758 if (rc) in efx_realloc_channels()
759 return rc; in efx_realloc_channels()
794 rc = -ENOMEM; in efx_realloc_channels()
818 rc = efx_probe_channel(channel); in efx_realloc_channels()
819 if (rc) in efx_realloc_channels()
837 rc = rc ? rc : rc2; in efx_realloc_channels()
845 return rc; in efx_realloc_channels()
961 int rc; in __efx_reconfigure_port() local
972 rc = efx->type->reconfigure_port(efx); in __efx_reconfigure_port()
974 if (rc) in __efx_reconfigure_port()
977 return rc; in __efx_reconfigure_port()
984 int rc; in efx_reconfigure_port() local
989 rc = __efx_reconfigure_port(efx); in efx_reconfigure_port()
992 return rc; in efx_reconfigure_port()
1010 int rc; in efx_probe_port() local
1018 rc = efx->type->probe_port(efx); in efx_probe_port()
1019 if (rc) in efx_probe_port()
1020 return rc; in efx_probe_port()
1030 int rc; in efx_init_port() local
1036 rc = efx->phy_op->init(efx); in efx_init_port()
1037 if (rc) in efx_init_port()
1047 rc = efx->phy_op->reconfigure(efx); in efx_init_port()
1048 if (rc) in efx_init_port()
1058 return rc; in efx_init_port()
1203 int rc; in efx_init_io() local
1207 rc = pci_enable_device(pci_dev); in efx_init_io()
1208 if (rc) { in efx_init_io()
1223 rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); in efx_init_io()
1224 if (rc == 0) in efx_init_io()
1229 if (rc) { in efx_init_io()
1238 rc = pci_request_region(pci_dev, EFX_MEM_BAR, "sfc"); in efx_init_io()
1239 if (rc) { in efx_init_io()
1242 rc = -EIO; in efx_init_io()
1250 rc = -ENOMEM; in efx_init_io()
1267 return rc; in efx_init_io()
1337 int rc; in efx_probe_interrupts() local
1355 rc = pci_enable_msix_range(efx->pci_dev, in efx_probe_interrupts()
1357 if (rc < 0) { in efx_probe_interrupts()
1362 } else if (rc < n_channels) { in efx_probe_interrupts()
1365 " available (%d < %u).\n", rc, n_channels); in efx_probe_interrupts()
1368 n_channels = rc; in efx_probe_interrupts()
1371 if (rc > 0) { in efx_probe_interrupts()
1395 rc = pci_enable_msi(efx->pci_dev); in efx_probe_interrupts()
1396 if (rc == 0) { in efx_probe_interrupts()
1440 int rc; in efx_soft_enable_interrupts() local
1449 rc = efx_init_eventq(channel); in efx_soft_enable_interrupts()
1450 if (rc) in efx_soft_enable_interrupts()
1469 return rc; in efx_soft_enable_interrupts()
1503 int rc; in efx_enable_interrupts() local
1516 rc = efx_init_eventq(channel); in efx_enable_interrupts()
1517 if (rc) in efx_enable_interrupts()
1522 rc = efx_soft_enable_interrupts(efx); in efx_enable_interrupts()
1523 if (rc) in efx_enable_interrupts()
1539 return rc; in efx_enable_interrupts()
1597 int rc; in efx_probe_nic() local
1602 rc = efx->type->probe(efx); in efx_probe_nic()
1603 if (rc) in efx_probe_nic()
1604 return rc; in efx_probe_nic()
1608 rc = efx_probe_interrupts(efx); in efx_probe_nic()
1609 if (rc) in efx_probe_nic()
1614 rc = efx->type->dimension_resources(efx); in efx_probe_nic()
1615 if (rc) in efx_probe_nic()
1637 return rc; in efx_probe_nic()
1650 int rc; in efx_probe_filters() local
1654 rc = efx->type->filter_table_probe(efx); in efx_probe_filters()
1655 if (rc) in efx_probe_filters()
1656 return rc; in efx_probe_filters()
1694 int rc; in efx_probe_all() local
1696 rc = efx_probe_nic(efx); in efx_probe_all()
1697 if (rc) { in efx_probe_all()
1702 rc = efx_probe_port(efx); in efx_probe_all()
1703 if (rc) { in efx_probe_all()
1710 rc = -EINVAL; in efx_probe_all()
1715 rc = efx_probe_filters(efx); in efx_probe_all()
1716 if (rc) { in efx_probe_all()
1722 rc = efx_probe_channels(efx); in efx_probe_all()
1723 if (rc) in efx_probe_all()
1735 return rc; in efx_probe_all()
2065 int rc; in efx_net_open() local
2070 rc = efx_check_disabled(efx); in efx_net_open()
2071 if (rc) in efx_net_open()
2072 return rc; in efx_net_open()
2134 int rc; in efx_change_mtu() local
2136 rc = efx_check_disabled(efx); in efx_change_mtu()
2137 if (rc) in efx_change_mtu()
2138 return rc; in efx_change_mtu()
2291 int rc; in efx_register_netdev() local
2315 rc = -EIO; in efx_register_netdev()
2319 rc = dev_alloc_name(net_dev, net_dev->name); in efx_register_netdev()
2320 if (rc < 0) in efx_register_netdev()
2327 rc = register_netdevice(net_dev); in efx_register_netdev()
2328 if (rc) in efx_register_netdev()
2341 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type); in efx_register_netdev()
2342 if (rc) { in efx_register_netdev()
2358 return rc; in efx_register_netdev()
2408 int rc; in efx_reset_up() local
2416 rc = efx->type->init(efx); in efx_reset_up()
2417 if (rc) { in efx_reset_up()
2426 rc = efx->phy_op->init(efx); in efx_reset_up()
2427 if (rc) in efx_reset_up()
2434 rc = efx_enable_interrupts(efx); in efx_reset_up()
2435 if (rc) in efx_reset_up()
2451 return rc; in efx_reset_up()
2461 int rc, rc2; in efx_reset() local
2470 rc = efx->type->reset(efx, method); in efx_reset()
2471 if (rc) { in efx_reset()
2492 disabled = rc || in efx_reset()
2498 if (!rc) in efx_reset()
2499 rc = rc2; in efx_reset()
2510 return rc; in efx_reset()
2923 int rc; in efx_pci_probe_main() local
2926 rc = efx_probe_all(efx); in efx_pci_probe_main()
2927 if (rc) in efx_pci_probe_main()
2932 rc = efx->type->init(efx); in efx_pci_probe_main()
2933 if (rc) { in efx_pci_probe_main()
2939 rc = efx_init_port(efx); in efx_pci_probe_main()
2940 if (rc) { in efx_pci_probe_main()
2946 rc = efx_nic_init_interrupt(efx); in efx_pci_probe_main()
2947 if (rc) in efx_pci_probe_main()
2949 rc = efx_enable_interrupts(efx); in efx_pci_probe_main()
2950 if (rc) in efx_pci_probe_main()
2965 return rc; in efx_pci_probe_main()
2982 int rc; in efx_pci_probe() local
3004 rc = efx_init_struct(efx, pci_dev, net_dev); in efx_pci_probe()
3005 if (rc) in efx_pci_probe()
3014 rc = efx_init_io(efx); in efx_pci_probe()
3015 if (rc) in efx_pci_probe()
3018 rc = efx_pci_probe_main(efx); in efx_pci_probe()
3019 if (rc) in efx_pci_probe()
3022 rc = efx_register_netdev(efx); in efx_pci_probe()
3023 if (rc) in efx_pci_probe()
3026 rc = efx->type->sriov_init(efx); in efx_pci_probe()
3027 if (rc) in efx_pci_probe()
3029 "SR-IOV can't be enabled rc %d\n", rc); in efx_pci_probe()
3035 rc = efx_mtd_probe(efx); in efx_pci_probe()
3037 if (rc) in efx_pci_probe()
3039 "failed to create MTDs (%d)\n", rc); in efx_pci_probe()
3041 rc = pci_enable_pcie_error_reporting(pci_dev); in efx_pci_probe()
3042 if (rc && rc != -EINVAL) in efx_pci_probe()
3044 "pci_enable_pcie_error_reporting failed (%d)\n", rc); in efx_pci_probe()
3055 WARN_ON(rc > 0); in efx_pci_probe()
3056 netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc); in efx_pci_probe()
3058 return rc; in efx_pci_probe()
3083 int rc; in efx_pm_thaw() local
3089 rc = efx_enable_interrupts(efx); in efx_pm_thaw()
3090 if (rc) in efx_pm_thaw()
3116 return rc; in efx_pm_thaw()
3137 int rc; in efx_pm_resume() local
3139 rc = pci_set_power_state(pci_dev, PCI_D0); in efx_pm_resume()
3140 if (rc) in efx_pm_resume()
3141 return rc; in efx_pm_resume()
3143 rc = pci_enable_device(pci_dev); in efx_pm_resume()
3144 if (rc) in efx_pm_resume()
3145 return rc; in efx_pm_resume()
3147 rc = efx->type->reset(efx, RESET_TYPE_ALL); in efx_pm_resume()
3148 if (rc) in efx_pm_resume()
3149 return rc; in efx_pm_resume()
3150 rc = efx->type->init(efx); in efx_pm_resume()
3151 if (rc) in efx_pm_resume()
3152 return rc; in efx_pm_resume()
3153 rc = efx_pm_thaw(dev); in efx_pm_resume()
3154 return rc; in efx_pm_resume()
3159 int rc; in efx_pm_suspend() local
3162 rc = efx_pm_poweroff(dev); in efx_pm_suspend()
3163 if (rc) in efx_pm_suspend()
3165 return rc; in efx_pm_suspend()
3221 int rc; in efx_io_slot_reset() local
3229 rc = pci_cleanup_aer_uncorrect_error_status(pdev); in efx_io_slot_reset()
3230 if (rc) { in efx_io_slot_reset()
3232 "pci_cleanup_aer_uncorrect_error_status failed (%d)\n", rc); in efx_io_slot_reset()
3243 int rc; in efx_io_resume() local
3250 rc = efx_reset(efx, RESET_TYPE_ALL); in efx_io_resume()
3251 if (rc) { in efx_io_resume()
3253 "efx_reset failed after PCI error (%d)\n", rc); in efx_io_resume()
3297 int rc; in efx_init_module() local
3301 rc = register_netdevice_notifier(&efx_netdev_notifier); in efx_init_module()
3302 if (rc) in efx_init_module()
3305 rc = efx_init_sriov(); in efx_init_module()
3306 if (rc) in efx_init_module()
3311 rc = -ENOMEM; in efx_init_module()
3315 rc = pci_register_driver(&efx_pci_driver); in efx_init_module()
3316 if (rc < 0) in efx_init_module()
3328 return rc; in efx_init_module()