ena.c (469a84079cb39f6fa8884f711c78fdc1c430d99f) ena.c (2b5b60fe0db0f526fd3ff926593df6fc550174a7)
1/*-
2 * BSD LICENSE
3 *
4 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1851 unchanged lines hidden (view full) ---

1860 device_printf(dev,
1861 "Failed to enable MSIX, vectors %d rc %d\n", msix_vecs, rc);
1862
1863 rc = ENOSPC;
1864 goto err_msix_free;
1865 }
1866
1867 if (msix_vecs != msix_req) {
1/*-
2 * BSD LICENSE
3 *
4 * Copyright (c) 2015-2017 Amazon.com, Inc. or its affiliates.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 1851 unchanged lines hidden (view full) ---

1860 device_printf(dev,
1861 "Failed to enable MSIX, vectors %d rc %d\n", msix_vecs, rc);
1862
1863 rc = ENOSPC;
1864 goto err_msix_free;
1865 }
1866
1867 if (msix_vecs != msix_req) {
1868 if (msix_vecs == ENA_ADMIN_MSIX_VEC) {
1869 device_printf(dev,
1870 "Not enough number of MSI-x allocated: %d\n",
1871 msix_vecs);
1872 pci_release_msi(dev);
1873 rc = ENOSPC;
1874 goto err_msix_free;
1875 }
1868 device_printf(dev, "Enable only %d MSI-x (out of %d), reduce "
1869 "the number of queues\n", msix_vecs, msix_req);
1870 adapter->num_queues = msix_vecs - ENA_ADMIN_MSIX_VEC;
1871 }
1872
1873 adapter->msix_vecs = msix_vecs;
1874 adapter->msix_enabled = true;
1875

--- 2181 unchanged lines hidden ---
1876 device_printf(dev, "Enable only %d MSI-x (out of %d), reduce "
1877 "the number of queues\n", msix_vecs, msix_req);
1878 adapter->num_queues = msix_vecs - ENA_ADMIN_MSIX_VEC;
1879 }
1880
1881 adapter->msix_vecs = msix_vecs;
1882 adapter->msix_enabled = true;
1883

--- 2181 unchanged lines hidden ---