Skip to content

Commit

Permalink
cxgb4: do not fail vf instatiation in slave mode
Browse files Browse the repository at this point in the history
We no longer require a check for cxgb4 to be MASTER
when configuring SRIOV, It was required when we had
module parameter to instantiate vf.

Signed-off-by: Arjun Vynipadath <[email protected]>
Signed-off-by: Casey Leedom <[email protected]>
Signed-off-by: Ganesh Goudar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
arjunvynipadath authored and davem330 committed May 14, 2018
1 parent 55c0211 commit 7cfac88
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5276,13 +5276,9 @@ static int cxgb4_iov_configure(struct pci_dev *pdev, int num_vfs)
u32 pcie_fw;

pcie_fw = readl(adap->regs + PCIE_FW_A);
/* Check if cxgb4 is the MASTER and fw is initialized */
if (num_vfs &&
(!(pcie_fw & PCIE_FW_INIT_F) ||
!(pcie_fw & PCIE_FW_MASTER_VLD_F) ||
PCIE_FW_MASTER_G(pcie_fw) != CXGB4_UNIFIED_PF)) {
dev_warn(&pdev->dev,
"cxgb4 driver needs to be MASTER to support SRIOV\n");
/* Check if fw is initialized */
if (!(pcie_fw & PCIE_FW_INIT_F)) {
dev_warn(&pdev->dev, "Device not initialized\n");
return -EOPNOTSUPP;
}

Expand Down

0 comments on commit 7cfac88

Please sign in to comment.