diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-04-21 15:43:08 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-05-23 12:33:50 -0400 |
commit | 24d8bf1b0a12a92171c6f08a665c6ff3f0788c91 (patch) | |
tree | b33b506798dd763e0c9e14b84c6e90ff2a98f8f7 /drivers/xen | |
parent | 8be9df6d4b6b53112abb078cb58827767471d797 (diff) |
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: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'drivers/xen')
-rw-r--r-- | drivers/xen/xen-pciback/pci_stub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c index b84426a7f88d..1539becad139 100644 --- a/drivers/xen/xen-pciback/pci_stub.c +++ b/drivers/xen/xen-pciback/pci_stub.c | |||
@@ -493,6 +493,8 @@ static int pcistub_seize(struct pci_dev *dev) | |||
493 | return err; | 493 | return err; |
494 | } | 494 | } |
495 | 495 | ||
496 | /* Called when 'bind'. This means we must _NOT_ call pci_reset_function or | ||
497 | * other functions that take the sysfs lock. */ | ||
496 | static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) | 498 | static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id) |
497 | { | 499 | { |
498 | int err = 0; | 500 | int err = 0; |
@@ -520,6 +522,8 @@ out: | |||
520 | return err; | 522 | return err; |
521 | } | 523 | } |
522 | 524 | ||
525 | /* Called when 'unbind'. This means we must _NOT_ call pci_reset_function or | ||
526 | * other functions that take the sysfs lock. */ | ||
523 | static void pcistub_remove(struct pci_dev *dev) | 527 | static void pcistub_remove(struct pci_dev *dev) |
524 | { | 528 | { |
525 | struct pcistub_device *psdev, *found_psdev = NULL; | 529 | struct pcistub_device *psdev, *found_psdev = NULL; |