linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Support Function Level Reset (FLR) in the xen-pciback module (v1) and some fixes.
@ 2012-01-05  0:46 Konrad Rzeszutek Wilk
  2012-01-05  0:46 ` [PATCH 1/5] pci: Introduce __pci_reset_function_locked to be used when holding device_lock Konrad Rzeszutek Wilk
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-01-05  0:46 UTC (permalink / raw)
  To: linux-kernel, jbarnes, linux-pci; +Cc: xen-devel

The attached patches allow the pciback module to perform a reset whenever
a PCI device is:
 - attached to the pciback module, as so:
  echo "0000:01.07.0" > /sys/bus/pci/devices/pciback/bind
 - detached from the pciback module, as so:
  echo "0000:01.07.0" > /sys/bus/pci/devices/pciback/unbind
 - and when the guest is done with (internally when the guest is not using
   the PCI device anymore).

I ran in one issue which is that I could not do pci_reset_function call when "bind"
or "unbind" were done as the device_lock was held (and pci_reset_function tried to
acquire the mutex). The solution was to introduce a new "pci_reset_function":

[PATCH 1/5] pci: Introduce __pci_reset_function_locked to be used
and then piggyback on that in
[PATCH 2/5] xen/pciback: Support pci_reset_function, aka FLR or D3

Also there are two fixes included in this - one where the PCI_DEV_FLAG_ASSIGNED
was in the wrong location and the "device has been assigned to other domain"
warning that always appeared. More details are in the patches themselves.


 drivers/pci/pci.c                  |   25 ++++++++++++++++++++
 drivers/xen/xen-pciback/pci_stub.c |   45 +++++++++++++++++++++++++++++++++--
 drivers/xen/xen-pciback/pciback.h  |    1 +
 drivers/xen/xen-pciback/xenbus.c   |    8 +++---
 include/linux/pci.h                |    1 +
 5 files changed, 73 insertions(+), 7 deletions(-)

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-01-09 15:24 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-05  0:46 [PATCH] Support Function Level Reset (FLR) in the xen-pciback module (v1) and some fixes Konrad Rzeszutek Wilk
2012-01-05  0:46 ` [PATCH 1/5] pci: Introduce __pci_reset_function_locked to be used when holding device_lock Konrad Rzeszutek Wilk
2012-01-05  0:46 ` [PATCH 2/5] xen/pciback: Support pci_reset_function, aka FLR or D3 support Konrad Rzeszutek Wilk
2012-01-05 10:24   ` [Xen-devel] " Ian Campbell
2012-01-05 18:58     ` Don Dutile
2012-01-05 21:34       ` Konrad Rzeszutek Wilk
2012-01-06 16:53         ` Don Dutile
2012-01-06 16:17     ` Konrad Rzeszutek Wilk
2012-01-05  0:46 ` [PATCH 3/5] xen/pciback: Move the PCI_DEV_FLAGS_ASSIGNED ops to the "[un|]bind" Konrad Rzeszutek Wilk
2012-01-05  0:46 ` [PATCH 4/5] xen/pciback: Expand the warning message to include domain id Konrad Rzeszutek Wilk
2012-01-06  8:38   ` [Xen-devel] " Jan Beulich
2012-01-06 15:03     ` Konrad Rzeszutek Wilk
2012-01-06 15:50       ` Keir Fraser
2012-01-06 15:51       ` Ian Campbell
2012-01-06 16:00         ` Konrad Rzeszutek Wilk
2012-01-06 22:19           ` Konrad Rzeszutek Wilk
2012-01-09  9:29             ` Jan Beulich
2012-01-09  9:50             ` Ian Campbell
2012-01-09 15:11               ` Konrad Rzeszutek Wilk
2012-01-09 15:16                 ` Ian Campbell
2012-01-09 15:22                   ` Konrad Rzeszutek Wilk
2012-01-05  0:46 ` [PATCH 5/5] xen/pciback: Fix "device has been assigned to X domain!" warning Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).