Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-28 Thread Jesse Barnes
On Mon, 27 Jul 2009 23:37:48 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jul 27, 2009 at 09:14:23AM -0700, Greg KH wrote: Fine with me. You forgot the documentation though :) This enough? pci: expose function reset capability in sysfs Some devices allow an individual

Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-27 Thread Greg KH
On Sun, Jul 26, 2009 at 08:11:39PM +0300, Michael S. Tsirkin wrote: Some devices allow an individual function to be reset without affecting other functions in the same device: that's what pci_reset_function does. For devices that have this support, expose reset attribite in sysfs. Please add

Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-27 Thread Michael S. Tsirkin
On Mon, Jul 27, 2009 at 08:01:46AM -0700, Greg KH wrote: + if (!pci_probe_reset_function(dev)) { + retval = device_create_file(dev-dev, reset_attr); + if (retval) + goto error; + } So you only add the file if there is a reset function, which

Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-27 Thread Greg KH
On Mon, Jul 27, 2009 at 06:52:38PM +0300, Michael S. Tsirkin wrote: On Mon, Jul 27, 2009 at 08:01:46AM -0700, Greg KH wrote: + if (!pci_probe_reset_function(dev)) { + retval = device_create_file(dev-dev, reset_attr); + if (retval) + goto error; + }

Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-27 Thread Jesse Barnes
On Mon, 27 Jul 2009 09:14:23 -0700 Greg KH g...@kroah.com wrote: On Mon, Jul 27, 2009 at 06:52:38PM +0300, Michael S. Tsirkin wrote: On Mon, Jul 27, 2009 at 08:01:46AM -0700, Greg KH wrote: + if (!pci_probe_reset_function(dev)) { + retval =

Re: [PATCH RFC] pci: expose function reset capability in sysfs

2009-07-27 Thread Greg KH
On Mon, Jul 27, 2009 at 11:37:48PM +0300, Michael S. Tsirkin wrote: On Mon, Jul 27, 2009 at 09:14:23AM -0700, Greg KH wrote: Fine with me. You forgot the documentation though :) This enough? pci: expose function reset capability in sysfs Some devices allow an individual function to be

[PATCH RFC] pci: expose function reset capability in sysfs

2009-07-26 Thread Michael S. Tsirkin
Some devices allow an individual function to be reset without affecting other functions in the same device: that's what pci_reset_function does. For devices that have this support, expose reset attribite in sysfs. This is useful e.g. for virtualization, where a qemu userspace process wants to