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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239125629.19984.196.camel@grinch>
Date:	Tue, 07 Apr 2009 17:33:49 +0000
From:	Andrew Patterson <andrew.patterson@...com>
To:	Alexander Beregalov <a.beregalov@...il.com>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	jbarnes@...tuousgeek.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH next] pci: fix build error with !PCIE_ECRC

On Tue, 2009-04-07 at 16:37 +0400, Alexander Beregalov wrote:
> 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@...il.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

We really only need this.  There are empty functions in
include/linux/pci.h to handle the case where PCIE_ECRC is not defined.
The problem is that the code in drivers/pci/pcie is only compiled if
PCIEPORTBUS is defined.  This feature does not depend on any PCIEPORTBUS
code. So either ecrc.c needs to be moved to drivers/pci or we need to
not assume that drivers/pci/pcie is only for the portbus driver.


>  	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)
> 
-- 
Andrew Patterson
Hewlett-Packard

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ