Lines Matching refs:rc

363 	int rc;  in efx_init_eventq()  local
370 rc = efx_nic_init_eventq(channel); in efx_init_eventq()
371 if (rc == 0) { in efx_init_eventq()
376 return rc; in efx_init_eventq()
505 int rc; in efx_probe_channel() local
510 rc = channel->type->pre_probe(channel); in efx_probe_channel()
511 if (rc) in efx_probe_channel()
514 rc = efx_probe_eventq(channel); in efx_probe_channel()
515 if (rc) in efx_probe_channel()
519 rc = efx_probe_tx_queue(tx_queue); in efx_probe_channel()
520 if (rc) in efx_probe_channel()
525 rc = efx_probe_rx_queue(rx_queue); in efx_probe_channel()
526 if (rc) in efx_probe_channel()
534 return rc; in efx_probe_channel()
569 int rc; in efx_probe_channels() local
580 rc = efx_probe_channel(channel); in efx_probe_channels()
581 if (rc) { in efx_probe_channels()
594 return rc; in efx_probe_channels()
690 int rc; in efx_stop_datapath() local
716 rc = efx->type->fini_dmaq(efx); in efx_stop_datapath()
717 if (rc && EFX_WORKAROUND_7803(efx)) { in efx_stop_datapath()
726 } else if (rc) { in efx_stop_datapath()
771 int rc, rc2; in efx_realloc_channels() local
773 rc = efx_check_disabled(efx); in efx_realloc_channels()
774 if (rc) in efx_realloc_channels()
775 return rc; in efx_realloc_channels()
810 rc = -ENOMEM; in efx_realloc_channels()
834 rc = efx_probe_channel(channel); in efx_realloc_channels()
835 if (rc) in efx_realloc_channels()
853 rc = rc ? rc : rc2; in efx_realloc_channels()
861 return rc; in efx_realloc_channels()
987 int rc; in __efx_reconfigure_port() local
998 rc = efx->type->reconfigure_port(efx); in __efx_reconfigure_port()
1000 if (rc) in __efx_reconfigure_port()
1003 return rc; in __efx_reconfigure_port()
1010 int rc; in efx_reconfigure_port() local
1015 rc = __efx_reconfigure_port(efx); in efx_reconfigure_port()
1018 return rc; in efx_reconfigure_port()
1036 int rc; in efx_probe_port() local
1044 rc = efx->type->probe_port(efx); in efx_probe_port()
1045 if (rc) in efx_probe_port()
1046 return rc; in efx_probe_port()
1056 int rc; in efx_init_port() local
1062 rc = efx->phy_op->init(efx); in efx_init_port()
1063 if (rc) in efx_init_port()
1073 rc = efx->phy_op->reconfigure(efx); in efx_init_port()
1074 if (rc && rc != -EPERM) in efx_init_port()
1084 return rc; in efx_init_port()
1229 int rc, bar; in efx_init_io() local
1235 rc = pci_enable_device(pci_dev); in efx_init_io()
1236 if (rc) { in efx_init_io()
1250 rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); in efx_init_io()
1251 if (rc == 0) in efx_init_io()
1255 if (rc) { in efx_init_io()
1264 rc = pci_request_region(pci_dev, bar, "sfc"); in efx_init_io()
1265 if (rc) { in efx_init_io()
1268 rc = -EIO; in efx_init_io()
1276 rc = -ENOMEM; in efx_init_io()
1293 return rc; in efx_init_io()
1381 int rc; in efx_probe_interrupts() local
1399 rc = pci_enable_msix_range(efx->pci_dev, in efx_probe_interrupts()
1401 if (rc < 0) { in efx_probe_interrupts()
1406 } else if (rc < n_channels) { in efx_probe_interrupts()
1409 " available (%d < %u).\n", rc, n_channels); in efx_probe_interrupts()
1412 n_channels = rc; in efx_probe_interrupts()
1415 if (rc > 0) { in efx_probe_interrupts()
1442 rc = pci_enable_msi(efx->pci_dev); in efx_probe_interrupts()
1443 if (rc == 0) { in efx_probe_interrupts()
1492 int rc; in efx_soft_enable_interrupts() local
1501 rc = efx_init_eventq(channel); in efx_soft_enable_interrupts()
1502 if (rc) in efx_soft_enable_interrupts()
1521 return rc; in efx_soft_enable_interrupts()
1555 int rc; in efx_enable_interrupts() local
1568 rc = efx_init_eventq(channel); in efx_enable_interrupts()
1569 if (rc) in efx_enable_interrupts()
1574 rc = efx_soft_enable_interrupts(efx); in efx_enable_interrupts()
1575 if (rc) in efx_enable_interrupts()
1591 return rc; in efx_enable_interrupts()
1649 int rc; in efx_probe_nic() local
1654 rc = efx->type->probe(efx); in efx_probe_nic()
1655 if (rc) in efx_probe_nic()
1656 return rc; in efx_probe_nic()
1663 rc = -ENOSPC; in efx_probe_nic()
1670 rc = efx_probe_interrupts(efx); in efx_probe_nic()
1671 if (rc) in efx_probe_nic()
1677 rc = efx->type->dimension_resources(efx); in efx_probe_nic()
1678 if (rc != 0 && rc != -EAGAIN) in efx_probe_nic()
1681 if (rc == -EAGAIN) in efx_probe_nic()
1685 } while (rc == -EAGAIN); in efx_probe_nic()
1705 return rc; in efx_probe_nic()
1718 int rc; in efx_probe_filters() local
1723 rc = efx->type->filter_table_probe(efx); in efx_probe_filters()
1724 if (rc) in efx_probe_filters()
1734 rc = -ENOMEM; in efx_probe_filters()
1741 return rc; in efx_probe_filters()
1769 int rc; in efx_probe_all() local
1771 rc = efx_probe_nic(efx); in efx_probe_all()
1772 if (rc) { in efx_probe_all()
1777 rc = efx_probe_port(efx); in efx_probe_all()
1778 if (rc) { in efx_probe_all()
1785 rc = -EINVAL; in efx_probe_all()
1791 rc = efx->type->vswitching_probe(efx); in efx_probe_all()
1792 if (rc) /* not fatal; the PF will still work fine */ in efx_probe_all()
1795 " VFs may not function\n", rc); in efx_probe_all()
1798 rc = efx_probe_filters(efx); in efx_probe_all()
1799 if (rc) { in efx_probe_all()
1805 rc = efx_probe_channels(efx); in efx_probe_all()
1806 if (rc) in efx_probe_all()
1822 return rc; in efx_probe_all()
2155 int rc; in efx_net_open() local
2160 rc = efx_check_disabled(efx); in efx_net_open()
2161 if (rc) in efx_net_open()
2162 return rc; in efx_net_open()
2224 int rc; in efx_change_mtu() local
2226 rc = efx_check_disabled(efx); in efx_change_mtu()
2227 if (rc) in efx_change_mtu()
2228 return rc; in efx_change_mtu()
2253 int rc; in efx_set_mac_address() local
2266 rc = efx->type->set_mac_address(efx); in efx_set_mac_address()
2267 if (rc) { in efx_set_mac_address()
2269 return rc; in efx_set_mac_address()
2391 int rc; in efx_register_netdev() local
2412 rc = -EIO; in efx_register_netdev()
2416 rc = dev_alloc_name(net_dev, net_dev->name); in efx_register_netdev()
2417 if (rc < 0) in efx_register_netdev()
2424 rc = register_netdevice(net_dev); in efx_register_netdev()
2425 if (rc) in efx_register_netdev()
2438 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type); in efx_register_netdev()
2439 if (rc) { in efx_register_netdev()
2445 rc = device_create_file(&efx->pci_dev->dev, &dev_attr_mcdi_logging); in efx_register_netdev()
2446 if (rc) { in efx_register_netdev()
2467 return rc; in efx_register_netdev()
2519 int rc; in efx_reset_up() local
2527 rc = efx->type->init(efx); in efx_reset_up()
2528 if (rc) { in efx_reset_up()
2538 rc = efx->phy_op->init(efx); in efx_reset_up()
2539 if (rc) in efx_reset_up()
2541 rc = efx->phy_op->reconfigure(efx); in efx_reset_up()
2542 if (rc && rc != -EPERM) in efx_reset_up()
2547 rc = efx_enable_interrupts(efx); in efx_reset_up()
2548 if (rc) in efx_reset_up()
2552 rc = efx->type->vswitching_restore(efx); in efx_reset_up()
2553 if (rc) /* not fatal; the PF will still work fine */ in efx_reset_up()
2556 " VFs may not function\n", rc); in efx_reset_up()
2576 return rc; in efx_reset_up()
2586 int rc, rc2; in efx_reset() local
2595 rc = efx->type->reset(efx, method); in efx_reset()
2596 if (rc) { in efx_reset()
2617 disabled = rc || in efx_reset()
2623 if (!rc) in efx_reset()
2624 rc = rc2; in efx_reset()
2635 return rc; in efx_reset()
3055 int rc; in efx_pci_probe_main() local
3058 rc = efx_probe_all(efx); in efx_pci_probe_main()
3059 if (rc) in efx_pci_probe_main()
3064 rc = efx->type->init(efx); in efx_pci_probe_main()
3065 if (rc) { in efx_pci_probe_main()
3071 rc = efx_init_port(efx); in efx_pci_probe_main()
3072 if (rc) { in efx_pci_probe_main()
3078 rc = efx_nic_init_interrupt(efx); in efx_pci_probe_main()
3079 if (rc) in efx_pci_probe_main()
3081 rc = efx_enable_interrupts(efx); in efx_pci_probe_main()
3082 if (rc) in efx_pci_probe_main()
3097 return rc; in efx_pci_probe_main()
3114 int rc; in efx_pci_probe() local
3136 rc = efx_init_struct(efx, pci_dev, net_dev); in efx_pci_probe()
3137 if (rc) in efx_pci_probe()
3147 rc = efx_init_io(efx); in efx_pci_probe()
3148 if (rc) in efx_pci_probe()
3151 rc = efx_pci_probe_main(efx); in efx_pci_probe()
3152 if (rc) in efx_pci_probe()
3155 rc = efx_register_netdev(efx); in efx_pci_probe()
3156 if (rc) in efx_pci_probe()
3160 rc = efx->type->sriov_init(efx); in efx_pci_probe()
3161 if (rc) in efx_pci_probe()
3163 "SR-IOV can't be enabled rc %d\n", rc); in efx_pci_probe()
3170 rc = efx_mtd_probe(efx); in efx_pci_probe()
3172 if (rc) in efx_pci_probe()
3174 "failed to create MTDs (%d)\n", rc); in efx_pci_probe()
3176 rc = pci_enable_pcie_error_reporting(pci_dev); in efx_pci_probe()
3177 if (rc && rc != -EINVAL) in efx_pci_probe()
3179 "pci_enable_pcie_error_reporting failed (%d)\n", rc); in efx_pci_probe()
3190 WARN_ON(rc > 0); in efx_pci_probe()
3191 netif_dbg(efx, drv, efx->net_dev, "initialisation failed. rc=%d\n", rc); in efx_pci_probe()
3193 return rc; in efx_pci_probe()
3202 int rc; in efx_pci_sriov_configure() local
3206 rc = efx->type->sriov_configure(efx, num_vfs); in efx_pci_sriov_configure()
3207 if (rc) in efx_pci_sriov_configure()
3208 return rc; in efx_pci_sriov_configure()
3238 int rc; in efx_pm_thaw() local
3244 rc = efx_enable_interrupts(efx); in efx_pm_thaw()
3245 if (rc) in efx_pm_thaw()
3271 return rc; in efx_pm_thaw()
3292 int rc; in efx_pm_resume() local
3294 rc = pci_set_power_state(pci_dev, PCI_D0); in efx_pm_resume()
3295 if (rc) in efx_pm_resume()
3296 return rc; in efx_pm_resume()
3298 rc = pci_enable_device(pci_dev); in efx_pm_resume()
3299 if (rc) in efx_pm_resume()
3300 return rc; in efx_pm_resume()
3302 rc = efx->type->reset(efx, RESET_TYPE_ALL); in efx_pm_resume()
3303 if (rc) in efx_pm_resume()
3304 return rc; in efx_pm_resume()
3305 rc = efx->type->init(efx); in efx_pm_resume()
3306 if (rc) in efx_pm_resume()
3307 return rc; in efx_pm_resume()
3308 rc = efx_pm_thaw(dev); in efx_pm_resume()
3309 return rc; in efx_pm_resume()
3314 int rc; in efx_pm_suspend() local
3317 rc = efx_pm_poweroff(dev); in efx_pm_suspend()
3318 if (rc) in efx_pm_suspend()
3320 return rc; in efx_pm_suspend()
3376 int rc; in efx_io_slot_reset() local
3384 rc = pci_cleanup_aer_uncorrect_error_status(pdev); in efx_io_slot_reset()
3385 if (rc) { in efx_io_slot_reset()
3387 "pci_cleanup_aer_uncorrect_error_status failed (%d)\n", rc); in efx_io_slot_reset()
3398 int rc; in efx_io_resume() local
3405 rc = efx_reset(efx, RESET_TYPE_ALL); in efx_io_resume()
3406 if (rc) { in efx_io_resume()
3408 "efx_reset failed after PCI error (%d)\n", rc); in efx_io_resume()
3455 int rc; in efx_init_module() local
3459 rc = register_netdevice_notifier(&efx_netdev_notifier); in efx_init_module()
3460 if (rc) in efx_init_module()
3464 rc = efx_init_sriov(); in efx_init_module()
3465 if (rc) in efx_init_module()
3471 rc = -ENOMEM; in efx_init_module()
3475 rc = pci_register_driver(&efx_pci_driver); in efx_init_module()
3476 if (rc < 0) in efx_init_module()
3490 return rc; in efx_init_module()