|
@@ -3127,11 +3127,11 @@ static void BEx_get_resources(struct be_adapter *adapter,
|
|
|
{
|
|
|
struct pci_dev *pdev = adapter->pdev;
|
|
|
bool use_sriov = false;
|
|
|
+ int max_vfs;
|
|
|
|
|
|
- if (BE3_chip(adapter) && sriov_want(adapter)) {
|
|
|
- int max_vfs;
|
|
|
+ max_vfs = pci_sriov_get_totalvfs(pdev);
|
|
|
|
|
|
- max_vfs = pci_sriov_get_totalvfs(pdev);
|
|
|
+ if (BE3_chip(adapter) && sriov_want(adapter)) {
|
|
|
res->max_vfs = max_vfs > 0 ? min(MAX_VFS, max_vfs) : 0;
|
|
|
use_sriov = res->max_vfs;
|
|
|
}
|
|
@@ -3162,7 +3162,11 @@ static void BEx_get_resources(struct be_adapter *adapter,
|
|
|
BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
|
|
|
res->max_rx_qs = res->max_rss_qs + 1;
|
|
|
|
|
|
- res->max_evt_qs = be_physfn(adapter) ? BE3_MAX_EVT_QS : 1;
|
|
|
+ if (be_physfn(adapter))
|
|
|
+ res->max_evt_qs = (max_vfs > 0) ?
|
|
|
+ BE3_SRIOV_MAX_EVT_QS : BE3_MAX_EVT_QS;
|
|
|
+ else
|
|
|
+ res->max_evt_qs = 1;
|
|
|
|
|
|
res->if_cap_flags = BE_IF_CAP_FLAGS_WANT;
|
|
|
if (!(adapter->function_caps & BE_FUNCTION_CAPS_RSS))
|