lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1357133785-9569-1-git-send-email-ariele@broadcom.com>
Date:	Wed, 2 Jan 2013 15:36:25 +0200
From:	"Ariel Elior" <ariele@...adcom.com>
To:	"David Miller" <davem@...emloft.net>
cc:	netdev <netdev@...r.kernel.org>, eilong@...adcom.com,
	"Ariel Elior" <ariele@...adcom.com>
Subject: [PATCH net-next] bnx2x: Fix compilation when CONFIG_PCI_IOV is
 not defined

This patch ifdefs out the use of PCI_IOV_RESOURCES which exists in the
kernel only when CONFIG_PCI_IOV is defined. There is no point in doing
the same for the invocation of SRIOV functionality in the driver as it
will be immediately failed by a kernel which was thus compiled.

Signed-off-by: Ariel Elior <ariele@...adcom.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 71fcef0..2142839 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1792,6 +1792,7 @@ static int bnx2x_vf_devfn(struct bnx2x *bp, int vfid)
 
 static void bnx2x_vf_set_bars(struct bnx2x *bp, struct bnx2x_virtf *vf)
 {
+#ifdef CONFIG_PCI_IOV
 	int i, n;
 	struct pci_dev *dev = bp->pdev;
 	struct bnx2x_sriov *iov = &bp->vfdb->sriov;
@@ -1804,6 +1805,7 @@ static void bnx2x_vf_set_bars(struct bnx2x *bp, struct bnx2x_virtf *vf)
 		vf->bars[n].bar = start + size * vf->abs_vfid;
 		vf->bars[n].size = size;
 	}
+#endif /* CONFIG_PCI_IOV */
 }
 
 static int bnx2x_ari_enabled(struct pci_dev *dev)
-- 
1.7.9.GIT


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ