Commit 24d8bf1b authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk

xen/pciback: Document when the 'unbind' and 'bind' functions are called.

And also mention that you cannot do any pci_reset_function,
pci_reset_slot, or such calls. This is because they take the same
lock as SysFS does - and we would end up with a dead-lock if
we call those functions.
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent 8be9df6d
...@@ -493,6 +493,8 @@ static int pcistub_seize(struct pci_dev *dev) ...@@ -493,6 +493,8 @@ static int pcistub_seize(struct pci_dev *dev)
return err; return err;
} }
/* Called when 'bind'. This means we must _NOT_ call pci_reset_function or
* other functions that take the sysfs lock. */
static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
{ {
int err = 0; int err = 0;
...@@ -520,6 +522,8 @@ static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) ...@@ -520,6 +522,8 @@ static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
return err; return err;
} }
/* Called when 'unbind'. This means we must _NOT_ call pci_reset_function or
* other functions that take the sysfs lock. */
static void pcistub_remove(struct pci_dev *dev) static void pcistub_remove(struct pci_dev *dev)
{ {
struct pcistub_device *psdev, *found_psdev = NULL; struct pcistub_device *psdev, *found_psdev = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment