search for: pci_resource_alignment

Displaying 20 results from an estimated 23 matches for "pci_resource_alignment".

2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...ate_resource(dev, &dev->resource[i], i); + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) + pci_update_resource(dev, i); } static struct pci_platform_pm_ops *pci_platform_pm; @@ -1864,6 +1849,53 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) return bars; } +/** + * pci_resource_alignment - get a PCI BAR resource alignment + * @dev: the PCI device + * @resno: the resource number + * + * Returns alignment size on success, or 0 on error. + */ +int pci_resource_alignment(struct pci_dev *dev, int resno) +{ + resource_size_t align; + struct resource *res = dev->resource + resno; + + a...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...ate_resource(dev, &dev->resource[i], i); + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) + pci_update_resource(dev, i); } static struct pci_platform_pm_ops *pci_platform_pm; @@ -1864,6 +1849,53 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) return bars; } +/** + * pci_resource_alignment - get a PCI BAR resource alignment + * @dev: the PCI device + * @resno: the resource number + * + * Returns alignment size on success, or 0 on error. + */ +int pci_resource_alignment(struct pci_dev *dev, int resno) +{ + resource_size_t align; + struct resource *res = dev->resource + resno; + + a...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...ate_resource(dev, &dev->resource[i], i); + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) + pci_update_resource(dev, i); } static struct pci_platform_pm_ops *pci_platform_pm; @@ -1864,6 +1849,53 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) return bars; } +/** + * pci_resource_alignment - get a PCI BAR resource alignment + * @dev: the PCI device + * @resno: the resource number + * + * Returns alignment size on success, or 0 on error. + */ +int pci_resource_alignment(struct pci_dev *dev, int resno) +{ + resource_size_t align; + struct resource *res = dev->resource + resno; + + a...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...dev->resource[i], i); + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) + pci_update_resource(dev, i); } static struct pci_platform_pm_ops *pci_platform_pm; @@ -1864,6 +1849,53 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) return bars; } +/** + * pci_resource_alignment - get a PCI BAR resource alignment + * @dev: the PCI device + * @resno: the resource number + * + * Returns alignment size on success, or 0 on error. + */ +int pci_resource_alignment(struct pci_dev *dev, int resno) +{ + resource_size_t align; + struct resource *res = dev->resource +...
2008 Sep 27
1
[PATCH 2/6 v3] PCI: add new general functions
...dev->resource[i], i); + for (i = 0; i < PCI_BRIDGE_RESOURCES; i++) + pci_update_resource(dev, i); } static struct pci_platform_pm_ops *pci_platform_pm; @@ -1864,6 +1849,53 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) return bars; } +/** + * pci_resource_alignment - get a PCI BAR resource alignment + * @dev: the PCI device + * @resno: the resource number + * + * Returns alignment size on success, or 0 on error. + */ +int pci_resource_alignment(struct pci_dev *dev, int resno) +{ + resource_size_t align; + struct resource *res = dev->resource +...
2008 Oct 14
8
[PATCH 0/8 v4] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. [PATCH 1/8 v4] PCI: define PCI resource names in a 'enum' [PATCH 2/8 v4] PCI: export __pci_read_base
2008 Oct 14
8
[PATCH 0/8 v4] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. [PATCH 1/8 v4] PCI: define PCI resource names in a 'enum' [PATCH 2/8 v4] PCI: export __pci_read_base
2008 Oct 21
16
[PATCH 0/15 v5] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Major changes between v4 -> v5: 1, remove interfaces for PF driver to create sysfs entries (Matthew
2008 Oct 21
16
[PATCH 0/15 v5] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Major changes between v4 -> v5: 1, remove interfaces for PF driver to create sysfs entries (Matthew
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Oct 22
20
[PATCH 0/16 v6] PCI: Linux kernel SR-IOV support
Greetings, Following patches are intended to support SR-IOV capability in the Linux kernel. With these patches, people can turn a PCI device with the capability into multiple ones from software perspective, which will benefit KVM and achieve other purposes such as QoS, security, and etc. Changes from v5 to v6: 1, update ABI document to include SR-IOV sysfs entries (Greg KH) 2, fix two coding
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...d(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(struct pci_dev *dev, int resno); extern int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); + +#ifdef CONFIG_PCI_ARI +extern void pci_ari_enable_fwd(struct pci_dev *dev); +#else +static inline void pci_ari_enable_fwd(struct pci_dev *dev) +{ +} +#endif /* CONFIG_P...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...d(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(struct pci_dev *dev, int resno); extern int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); + +#ifdef CONFIG_PCI_ARI +extern void pci_ari_enable_fwd(struct pci_dev *dev); +#else +static inline void pci_ari_enable_fwd(struct pci_dev *dev) +{ +} +#endif /* CONFIG_P...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...d(dev, pos + PCI_ARI_CAP, &cap); + + return PCI_ARI_CAP_NFN(cap); +} +EXPORT_SYMBOL_GPL(pci_ari_next_fn); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 5abd69c..720a607 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -147,3 +147,11 @@ struct pci_slot_attribute { extern int pci_resource_alignment(struct pci_dev *dev, int resno); extern int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); + +#ifdef CONFIG_PCI_ARI +extern void pci_ari_enable_fwd(struct pci_dev *dev); +#else +static inline void pci_ari_enable_fwd(struct pci_dev *dev) +{ +} +#endif /* CONFIG_P...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
...pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge) { diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9f0fa0e..593b415 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -165,5 +165,17 @@ extern struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, extern int pci_resource_alignment(struct pci_dev *dev, int resno); extern int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); +extern void pci_ari_init(struct pci_dev *dev); +/** + * pci_ari_fwd_enabled - query ARI forwarding status + * @dev: the PCI device + * + * Returns 1 i...
2008 Sep 27
2
[PATCH 3/6 v3] PCI: support ARI capability
...pci_get_interrupt_pin(struct pci_dev *dev, struct pci_dev **bridge) { diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9f0fa0e..593b415 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -165,5 +165,17 @@ extern struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent, extern int pci_resource_alignment(struct pci_dev *dev, int resno); extern int pci_resource_bar(struct pci_dev *dev, int resno, enum pci_bar_type *type); +extern void pci_ari_init(struct pci_dev *dev); +/** + * pci_ari_fwd_enabled - query ARI forwarding status + * @dev: the PCI device + * + * Returns 1 i...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI_IOV_CTRL_MSE); + pci_write_config_word(dev, dev->iov->cap + PCI_IOV_CTRL, ctrl); + ssleep(1); +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bc4b6d0..cd651e0 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1867,7 +1867,12 @@ int pci_resource_alignment(struct pci_dev *dev, int resno) if (resno <= PCI_ROM_RESOURCE) return resource_size(res); - else if (resno <= PCI_BRIDGE_RES_END) + else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + align = pci_iov_resource_align(dev, resno); + if (align) + retu...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI_IOV_CTRL_MSE); + pci_write_config_word(dev, dev->iov->cap + PCI_IOV_CTRL, ctrl); + ssleep(1); +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bc4b6d0..cd651e0 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1867,7 +1867,12 @@ int pci_resource_alignment(struct pci_dev *dev, int resno) if (resno <= PCI_ROM_RESOURCE) return resource_size(res); - else if (resno <= PCI_BRIDGE_RES_END) + else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + align = pci_iov_resource_align(dev, resno); + if (align) + retu...
2008 Sep 01
2
[PATCH 3/4 v2] PCI: support SR-IOV capability
...PCI_IOV_CTRL_MSE); + pci_write_config_word(dev, dev->iov->cap + PCI_IOV_CTRL, ctrl); + ssleep(1); +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index bc4b6d0..cd651e0 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1867,7 +1867,12 @@ int pci_resource_alignment(struct pci_dev *dev, int resno) if (resno <= PCI_ROM_RESOURCE) return resource_size(res); - else if (resno <= PCI_BRIDGE_RES_END) + else if (resno < PCI_BRIDGE_RESOURCES) { + /* may be device specific resource */ + align = pci_iov_resource_align(dev, resno); + if (align) + retu...