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: <1346800307-11041-1-git-send-email-Jiang.Wang@riverbed.com>
Date:	Tue,  4 Sep 2012 16:11:47 -0700
From:	Jiang Wang <Jiang.Wang@...erbed.com>
To:	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc:	clala@...erbed.com, Francis.St.Amant@...erbed.com,
	Jiang Wang <Jiang.Wang@...erbed.com>,
	Jiang Wang <jwang@...erbed.com>
Subject: [PATCH 1/1] pci-iov: Fix warnings when CONFIG_PCI_IOV is enabled

When CONFIG_PCI_IOV is enabled, the kernel will call sriov_init().
This function tries to allocate virtual resources even if the
virtual function of a PCI devive is not enabled by the BIOS.

This sometimes causes following warning messages during boot up:
pci 0000:02:00.0: BAR 9: can't allocate mem resource [0x000000-0x3fffff]
pci 0000:02:00.0: BAR 7: can't allocate mem resource [0x000000-0x03ffff]

Tested on three Mitac motherboards.

Signed-off-by: Jiang Wang <jwang@...erbed.com>
---
 drivers/pci/iov.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 6554e1a..0ca8cb2 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -441,7 +441,8 @@ static int sriov_init(struct pci_dev *dev, int pos)
 	if (ctrl & PCI_SRIOV_CTRL_VFE) {
 		pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0);
 		ssleep(1);
-	}
+	} else
+		return 0;
 
 	pci_read_config_word(dev, pos + PCI_SRIOV_TOTAL_VF, &total);
 	if (!total)
-- 
1.7.1

--
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