From: Alexander Beregalov <a.beregalov@gmail.com>
To: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
andrew.patterson@hp.com, jbarnes@virtuousgeek.org,
linux-pci@vger.kernel.org
Subject: [PATCH next] pci: fix build error with !PCIE_ECRC
Date: Tue, 7 Apr 2009 16:37:08 +0400 [thread overview]
Message-ID: <20090407123707.GA18687@orion> (raw)
Fix this build error:
drivers/built-in.o: In function `pci_init_capabilities':
drivers/pci/probe.c:989: undefined reference to `pcie_set_ecrc_checking'
drivers/built-in.o: In function `pci_setup':
drivers/pci/pci.c:2547: undefined reference to `pcie_ecrc_get_policy'
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
drivers/pci/pci.c | 2 ++
drivers/pci/pcie/Kconfig | 2 +-
drivers/pci/probe.c | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index f61b2cf..f1c393e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2543,8 +2543,10 @@ static int __init pci_setup(char *str)
} else if (!strncmp(str, "resource_alignment=", 19)) {
pci_set_resource_alignment_param(str + 19,
strlen(str + 19));
+#ifdef CONFIG_PCIE_ECRC
} else if (!strncmp(str, "ecrc=", 5)) {
pcie_ecrc_get_policy(str + 5);
+#endif
} else {
printk(KERN_ERR "PCI: Unknown option `%s'\n",
str);
diff --git a/drivers/pci/pcie/Kconfig b/drivers/pci/pcie/Kconfig
index a79e52b..9d0e727 100644
--- a/drivers/pci/pcie/Kconfig
+++ b/drivers/pci/pcie/Kconfig
@@ -52,7 +52,7 @@ config PCIEASPM_DEBUG
#
config PCIE_ECRC
bool "PCI Express ECRC support"
- depends on PCI
+ depends on PCI && PCIEPORTBUS
help
Enables PCI Express ECRC (transaction layer end-to-end CRC
checking)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index d5125a1..8d402a8 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -985,8 +985,10 @@ static void pci_init_capabilities(struct pci_dev *dev)
/* Single Root I/O Virtualization */
pci_iov_init(dev);
+#ifdef CONFIG_PCIE_ECRC
/* PCIe end-to-end CRC checking */
pcie_set_ecrc_checking(dev);
+#endif
}
void pci_device_add(struct pci_dev *dev, struct pci_bus *bus)
next reply other threads:[~2009-04-07 12:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 12:37 Alexander Beregalov [this message]
2009-04-07 14:32 ` [PATCH next] pci: fix build error with !PCIE_ECRC Matthew Wilcox
2009-04-07 14:41 ` Alexander Beregalov
2009-04-07 17:33 ` Andrew Patterson
2009-04-07 21:52 ` Jesse Barnes
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=20090407123707.GA18687@orion \
--to=a.beregalov@gmail.com \
--cc=andrew.patterson@hp.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-pci@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).