search for: pci_slot_attribute

Displaying 20 results from an estimated 28 matches for "pci_slot_attribute".

2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 7dd62fa9d0bd..396c200b9ddb 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj) } static struct pci_slot_attribute pci_slot_attr_address = - __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); + __ATTR(address, S_IRUGO, address_read_file, NULL); static struct pci_slot_attribute pci_slot_attr_max_speed = - __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL); + __ATTR(max_bus_speed,...
2014 Mar 19
5
[PATCH] virtio-blk: make the queue depth configurable
...Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c index 7dd62fa9d0bd..396c200b9ddb 100644 --- a/drivers/pci/slot.c +++ b/drivers/pci/slot.c @@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj) } static struct pci_slot_attribute pci_slot_attr_address = - __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); + __ATTR(address, S_IRUGO, address_read_file, NULL); static struct pci_slot_attribute pci_slot_attr_max_speed = - __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL); + __ATTR(max_bus_speed,...
2014 Mar 19
0
[PATCH] virtio-blk: make the queue depth configurable
..._IFREG in a similar way. > diff --git a/drivers/pci/slot.c b/drivers/pci/slot.c > index 7dd62fa9d0bd..396c200b9ddb 100644 > --- a/drivers/pci/slot.c > +++ b/drivers/pci/slot.c > @@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj) > } > > static struct pci_slot_attribute pci_slot_attr_address = > - __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL); > + __ATTR(address, S_IRUGO, address_read_file, NULL); > static struct pci_slot_attribute pci_slot_attr_max_speed = > - __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read...
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2014 Mar 19
1
[PATCH] virtio-blk: make the queue depth configurable
Couple more bikesheddy things: Is there ever a reason to use a non __builtin_const_p(perms)? Maybe that should be a BUILD_BUG_ON too BUILD_BUG_ON(!builtin_const_p_perms) My brain of little size gets confused by the BUILD_BUG_ON_ZERO(foo) + vs BUILD_BUG_ON(foo); as it just seems like more text for the same content. Is there any value on the "_ZERO(foo) +" I don't understand?
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: > Erk, our tests are insufficient. Testbuilding an allmodconfig with this > now: Good idea. > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h [] > @@ -188,6 +188,9 @@ struct kparam_array > /* Default value instead of permissions? */ \ > static int __param_perm_check_##name
2014 Mar 17
2
[PATCH] virtio-blk: make the queue depth configurable
On Mon, 2014-03-17 at 14:25 +1030, Rusty Russell wrote: > Erk, our tests are insufficient. Testbuilding an allmodconfig with this > now: Good idea. > diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h [] > @@ -188,6 +188,9 @@ struct kparam_array > /* Default value instead of permissions? */ \ > static int __param_perm_check_##name
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...s/pci/pci.h @@ -1,3 +1,9 @@ +#ifndef DRIVERS_PCI_H +#define DRIVERS_PCI_H + +#define PCI_CFG_SPACE_SIZE 256 +#define PCI_CFG_SPACE_EXP_SIZE 4096 + /* Functions internal to the PCI core code */ extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); @@ -144,3 +150,17 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32, /* A 32-bit memory BAR */ + pci_bar_mem64...
2008 Sep 27
3
[PATCH 1/6 v3] PCI: export some functions and macros
...s/pci/pci.h @@ -1,3 +1,9 @@ +#ifndef DRIVERS_PCI_H +#define DRIVERS_PCI_H + +#define PCI_CFG_SPACE_SIZE 256 +#define PCI_CFG_SPACE_EXP_SIZE 4096 + /* Functions internal to the PCI core code */ extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); @@ -144,3 +150,17 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +enum pci_bar_type { + pci_bar_unknown, /* Standard PCI BAR probe */ + pci_bar_io, /* An io port BAR */ + pci_bar_mem32, /* A 32-bit memory BAR */ + pci_bar_mem64...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...,7 @@ GET_STATUS(latch_status, u8) GET_STATUS(adapter_status, u8) GET_STATUS(max_bus_speed, enum pci_bus_speed) GET_STATUS(cur_bus_speed, enum pci_bus_speed) +GET_STATUS(param, const char *) static ssize_t power_read_file(struct pci_slot *slot, char *buf) { @@ -346,6 +347,41 @@ static struct pci_slot_attribute hotplug_slot_attr_test = { .store = test_write_file }; +static ssize_t param_read_file(struct pci_slot *slot, char *buf) +{ + int retval; + const char *param; + + retval = get_param(slot->hotplug, &param); + if (retval) + return retval; + + return param ? snprintf(buf, PAGE_SIZE, &quot...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...,7 @@ GET_STATUS(latch_status, u8) GET_STATUS(adapter_status, u8) GET_STATUS(max_bus_speed, enum pci_bus_speed) GET_STATUS(cur_bus_speed, enum pci_bus_speed) +GET_STATUS(param, const char *) static ssize_t power_read_file(struct pci_slot *slot, char *buf) { @@ -346,6 +347,41 @@ static struct pci_slot_attribute hotplug_slot_attr_test = { .store = test_write_file }; +static ssize_t param_read_file(struct pci_slot *slot, char *buf) +{ + int retval; + const char *param; + + retval = get_param(slot->hotplug, &param); + if (retval) + return retval; + + return param ? snprintf(buf, PAGE_SIZE, &quot...
2008 Sep 01
1
[PATCH 1/4 v2] PCI: introduce new base functions
...,7 @@ GET_STATUS(latch_status, u8) GET_STATUS(adapter_status, u8) GET_STATUS(max_bus_speed, enum pci_bus_speed) GET_STATUS(cur_bus_speed, enum pci_bus_speed) +GET_STATUS(param, const char *) static ssize_t power_read_file(struct pci_slot *slot, char *buf) { @@ -346,6 +347,41 @@ static struct pci_slot_attribute hotplug_slot_attr_test = { .store = test_write_file }; +static ssize_t param_read_file(struct pci_slot *slot, char *buf) +{ + int retval; + const char *param; + + retval = get_param(slot->hotplug, &param); + if (retval) + return retval; + + return param ? snprintf(buf, PAGE_SIZE, &quot...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ iov_set_vfe(dev, 0); + iov_free_res(dev); + kfree(iov->args); + kfree(iov); + dev->iov = NULL; +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..8a13f8b 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -144,3 +144,16 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +/* Single Root I/O Virtualization */ +struct pci_iov { + int cap; /* Capability position */ + int align; /* Page size used to map memory space */ + int nr_virtfn; /* Number of available VFs */ + u16 max_virtfn;...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ iov_set_vfe(dev, 0); + iov_free_res(dev); + kfree(iov->args); + kfree(iov); + dev->iov = NULL; +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..8a13f8b 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -144,3 +144,16 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +/* Single Root I/O Virtualization */ +struct pci_iov { + int cap; /* Capability position */ + int align; /* Page size used to map memory space */ + int nr_virtfn; /* Number of available VFs */ + u16 max_virtfn;...
2008 Aug 12
0
SR-IOV: patches are available for Linux kernel [3/4]
...+ iov_set_vfe(dev, 0); + iov_free_res(dev); + kfree(iov->args); + kfree(iov); + dev->iov = NULL; +} +EXPORT_SYMBOL_GPL(pci_iov_disable); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index d807cd7..8a13f8b 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -144,3 +144,16 @@ struct pci_slot_attribute { }; #define to_pci_slot_attr(s) container_of(s, struct pci_slot_attribute, attr) +/* Single Root I/O Virtualization */ +struct pci_iov { + int cap; /* Capability position */ + int align; /* Page size used to map memory space */ + int nr_virtfn; /* Number of available VFs */ + u16 max_virtfn;...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...urn -EIO; + + pci_read_config_word(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 pc...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...urn -EIO; + + pci_read_config_word(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 pc...
2008 Sep 01
1
[PATCH 2/4 v2] PCI: support ARI capability
...urn -EIO; + + pci_read_config_word(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 pc...
2008 Nov 21
22
[PATCH 0/13 v7] 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. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from
2008 Nov 21
22
[PATCH 0/13 v7] 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. The Physical Function and Virtual Function drivers using the SR-IOV APIs will come soon! Major changes from