diff options
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 48807556b47a..6d6120007af4 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1418,10 +1418,10 @@ int pci_restore_standard_config(struct pci_dev *dev) | |||
1418 | break; | 1418 | break; |
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | dev->current_state = PCI_D0; | 1421 | pci_update_current_state(dev, PCI_D0); |
1422 | 1422 | ||
1423 | Restore: | 1423 | Restore: |
1424 | return pci_restore_state(dev); | 1424 | return dev->state_saved ? pci_restore_state(dev) : 0; |
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | /** | 1427 | /** |
@@ -1540,16 +1540,21 @@ void pci_release_region(struct pci_dev *pdev, int bar) | |||
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | /** | 1542 | /** |
1543 | * pci_request_region - Reserved PCI I/O and memory resource | 1543 | * __pci_request_region - Reserved PCI I/O and memory resource |
1544 | * @pdev: PCI device whose resources are to be reserved | 1544 | * @pdev: PCI device whose resources are to be reserved |
1545 | * @bar: BAR to be reserved | 1545 | * @bar: BAR to be reserved |
1546 | * @res_name: Name to be associated with resource. | 1546 | * @res_name: Name to be associated with resource. |
1547 | * @exclusive: whether the region access is exclusive or not | ||
1547 | * | 1548 | * |
1548 | * Mark the PCI region associated with PCI device @pdev BR @bar as | 1549 | * Mark the PCI region associated with PCI device @pdev BR @bar as |
1549 | * being reserved by owner @res_name. Do not access any | 1550 | * being reserved by owner @res_name. Do not access any |
1550 | * address inside the PCI regions unless this call returns | 1551 | * address inside the PCI regions unless this call returns |
1551 | * successfully. | 1552 | * successfully. |
1552 | * | 1553 | * |
1554 | * If @exclusive is set, then the region is marked so that userspace | ||
1555 | * is explicitly not allowed to map the resource via /dev/mem or | ||
1556 | * sysfs MMIO access. | ||
1557 | * | ||
1553 | * Returns 0 on success, or %EBUSY on error. A warning | 1558 | * Returns 0 on success, or %EBUSY on error. A warning |
1554 | * message is also printed on failure. | 1559 | * message is also printed on failure. |
1555 | */ | 1560 | */ |
@@ -1588,12 +1593,12 @@ err_out: | |||
1588 | } | 1593 | } |
1589 | 1594 | ||
1590 | /** | 1595 | /** |
1591 | * pci_request_region - Reserved PCI I/O and memory resource | 1596 | * pci_request_region - Reserve PCI I/O and memory resource |
1592 | * @pdev: PCI device whose resources are to be reserved | 1597 | * @pdev: PCI device whose resources are to be reserved |
1593 | * @bar: BAR to be reserved | 1598 | * @bar: BAR to be reserved |
1594 | * @res_name: Name to be associated with resource. | 1599 | * @res_name: Name to be associated with resource |
1595 | * | 1600 | * |
1596 | * Mark the PCI region associated with PCI device @pdev BR @bar as | 1601 | * Mark the PCI region associated with PCI device @pdev BAR @bar as |
1597 | * being reserved by owner @res_name. Do not access any | 1602 | * being reserved by owner @res_name. Do not access any |
1598 | * address inside the PCI regions unless this call returns | 1603 | * address inside the PCI regions unless this call returns |
1599 | * successfully. | 1604 | * successfully. |