netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ariel Elior" <ariele@broadcom.com>
To: "David Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	eilong@broadcom.com, "Ariel Elior" <ariele@broadcom.com>
Subject: [PATCH net-next] bnx2x: Fix compilation when CONFIG_PCI_IOV is not defined
Date: Wed, 2 Jan 2013 15:36:25 +0200	[thread overview]
Message-ID: <1357133785-9569-1-git-send-email-ariele@broadcom.com> (raw)

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@broadcom.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

             reply	other threads:[~2013-01-02 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 13:36 Ariel Elior [this message]
2013-01-03  2:47 ` [PATCH net-next] bnx2x: Fix compilation when CONFIG_PCI_IOV is not defined David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357133785-9569-1-git-send-email-ariele@broadcom.com \
    --to=ariele@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=eilong@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).