diff options
author | Yuval Mintz <Yuval.Mintz@qlogic.com> | 2016-05-15 13:48:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-16 19:59:19 +0200 |
commit | 83f34bd436fefc70376efe6f6dd7ddcb5265d88b (patch) | |
tree | 6f85663d26b3f977fd8eb6d1c3c5b72f78adbe64 /drivers | |
parent | qed: Reset link on IOV disable (diff) | |
download | linux-83f34bd436fefc70376efe6f6dd7ddcb5265d88b.tar.xz linux-83f34bd436fefc70376efe6f6dd7ddcb5265d88b.zip |
qed: Allow more than 16 VFs
In multi-function modes, PFs are currently limited to using 16 VFs -
But that limitation would also currently apply in case there's a single
PCI function exposed, where no such restriction should have existed.
This lifts the restriction for the default mode; User should be able
to start the maximum number of VFs as appear in the PCI config space.
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_sriov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c index a977f39f534c..c325ee857ecd 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c +++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c @@ -3099,6 +3099,9 @@ static int qed_sriov_enable(struct qed_dev *cdev, int num) goto err; } + if (IS_MF_DEFAULT(hwfn)) + limit = MAX_NUM_VFS_BB / hwfn->num_funcs_on_engine; + memset(&sb_cnt_info, 0, sizeof(sb_cnt_info)); qed_int_get_num_sbs(hwfn, &sb_cnt_info); num_sbs = min_t(int, sb_cnt_info.sb_free_blk, limit); |