| .. | .. |
|---|
| 13 | 13 | #include <linux/pci_regs.h> |
|---|
| 14 | 14 | #include <linux/types.h> |
|---|
| 15 | 15 | |
|---|
| 16 | +#include "pci.h" |
|---|
| 17 | + |
|---|
| 16 | 18 | /** |
|---|
| 17 | 19 | * pci_vc_save_restore_dwords - Save or restore a series of dwords |
|---|
| 18 | 20 | * @dev: device |
|---|
| .. | .. |
|---|
| 105 | 107 | struct pci_dev *link = NULL; |
|---|
| 106 | 108 | |
|---|
| 107 | 109 | /* Enable VCs from the downstream device */ |
|---|
| 108 | | - if (!dev->has_secondary_link) |
|---|
| 110 | + if (!pci_is_pcie(dev) || !pcie_downstream_port(dev)) |
|---|
| 109 | 111 | return; |
|---|
| 110 | 112 | |
|---|
| 111 | 113 | ctrl_pos = pos + PCI_VC_RES_CTRL + (res * PCI_CAP_VC_PER_VC_SIZEOF); |
|---|
| .. | .. |
|---|
| 170 | 172 | * @dev: device |
|---|
| 171 | 173 | * @pos: starting position of VC capability (VC/VC9/MFVC) |
|---|
| 172 | 174 | * @save_state: buffer for save/restore |
|---|
| 173 | | - * @name: for error message |
|---|
| 174 | 175 | * @save: if provided a buffer, this indicates what to do with it |
|---|
| 175 | 176 | * |
|---|
| 176 | 177 | * Walking Virtual Channel config space to size, save, or restore it |
|---|
| .. | .. |
|---|
| 409 | 410 | * For each type of VC capability, VC/VC9/MFVC, find the capability, size |
|---|
| 410 | 411 | * it, and allocate a buffer for save/restore. |
|---|
| 411 | 412 | */ |
|---|
| 412 | | - |
|---|
| 413 | 413 | void pci_allocate_vc_save_buffers(struct pci_dev *dev) |
|---|
| 414 | 414 | { |
|---|
| 415 | 415 | int i; |
|---|