Commit 28f71c6d authored by Hariprasad Shenai's avatar Hariprasad Shenai Committed by David S. Miller

cxgb4vf: Add a couple more checks for invalid provisioning configurations

Signed-off-by: default avatarHariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 495c22bb
...@@ -2361,6 +2361,11 @@ static int adap_init0(struct adapter *adapter) ...@@ -2361,6 +2361,11 @@ static int adap_init0(struct adapter *adapter)
} }
/* Check for various parameter sanity issues */ /* Check for various parameter sanity issues */
if (adapter->params.vfres.pmask == 0) {
dev_err(adapter->pdev_dev, "no port access configured\n"
"usable!\n");
return -EINVAL;
}
if (adapter->params.vfres.nvi == 0) { if (adapter->params.vfres.nvi == 0) {
dev_err(adapter->pdev_dev, "no virtual interfaces configured/" dev_err(adapter->pdev_dev, "no virtual interfaces configured/"
"usable!\n"); "usable!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment