Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 299283
b: refs/heads/master
c: a6cb9ee
h: refs/heads/master
i:
  299281: 81f455d
  299279: 7ac1375
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Apr 17, 2012
1 parent ad30e8a commit 5a602d5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5191d566c023079fa283adc48b71854e9d74ffd5
refs/heads/master: a6cb9ee7cabe68002c3f2ab07224ea27d2617cf1
24 changes: 15 additions & 9 deletions trunk/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,8 +991,8 @@ static void pci_restore_config_dword(struct pci_dev *pdev, int offset,
}
}

static void pci_restore_config_space(struct pci_dev *pdev, int start, int end,
int retry)
static void pci_restore_config_space_range(struct pci_dev *pdev,
int start, int end, int retry)
{
int index;

Expand All @@ -1002,6 +1002,18 @@ static void pci_restore_config_space(struct pci_dev *pdev, int start, int end,
retry);
}

static void pci_restore_config_space(struct pci_dev *pdev)
{
if (pdev->hdr_type == PCI_HEADER_TYPE_NORMAL) {
pci_restore_config_space_range(pdev, 10, 15, 0);
/* Restore BARs before the command register. */
pci_restore_config_space_range(pdev, 4, 9, 10);
pci_restore_config_space_range(pdev, 0, 3, 0);
} else {
pci_restore_config_space_range(pdev, 0, 15, 0);
}
}

/**
* pci_restore_state - Restore the saved state of a PCI device
* @dev: - PCI device that we're dealing with
Expand All @@ -1015,13 +1027,7 @@ void pci_restore_state(struct pci_dev *dev)
pci_restore_pcie_state(dev);
pci_restore_ats_state(dev);

pci_restore_config_space(dev, 10, 15, 0);
/*
* The Base Address register should be programmed before the command
* register(s)
*/
pci_restore_config_space(dev, 4, 9, 10);
pci_restore_config_space(dev, 0, 3, 0);
pci_restore_config_space(dev);

pci_restore_pcix_state(dev);
pci_restore_msi_state(dev);
Expand Down

0 comments on commit 5a602d5

Please sign in to comment.