Re: [PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-13 Thread Andi Kleen
Yu Zhao yu.z...@intel.com writes: + + +static int sriov_init(struct pci_dev *dev, int pos) +{ + int i; + int rc; + int nres; + u32 pgsz; + u16 ctrl, total, offset, stride; + struct pci_sriov *iov; + struct resource *res; + struct pci_dev *pdev; + +

Re: [PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-13 Thread Matthew Wilcox
On Fri, Feb 13, 2009 at 05:56:44PM +0100, Andi Kleen wrote: + pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, ctrl); + if (ctrl PCI_SRIOV_CTRL_VFE) { + pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0); + msleep(100); That's really long. Hopefully that's

Re: [PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-13 Thread Yu Zhao
On Sat, Feb 14, 2009 at 12:56:44AM +0800, Andi Kleen wrote: Yu Zhao yu.z...@intel.com writes: + + +static int sriov_init(struct pci_dev *dev, int pos) +{ + int i; + int rc; + int nres; + u32 pgsz; + u16 ctrl, total, offset, stride; + struct pci_sriov *iov; +

Re: [PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-13 Thread Yu Zhao
On Sat, Feb 14, 2009 at 01:49:59AM +0800, Matthew Wilcox wrote: On Fri, Feb 13, 2009 at 05:56:44PM +0100, Andi Kleen wrote: + pci_read_config_word(dev, pos + PCI_SRIOV_CTRL, ctrl); + if (ctrl PCI_SRIOV_CTRL_VFE) { + pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, 0); +

[PATCH v8 1/7] PCI: initialize and release SR-IOV capability

2009-02-10 Thread Yu Zhao
Signed-off-by: Yu Zhao yu.z...@intel.com --- drivers/pci/Kconfig | 13 drivers/pci/Makefile |3 + drivers/pci/iov.c| 178 ++ drivers/pci/pci.c|7 ++ drivers/pci/pci.h| 37 ++ drivers/pci/probe.c