#include <linux/delay.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/ioport.h>
#include <linux/wait.h>
#include "pci.h"
Go to the source code of this file.
|
| DEFINE_RAW_SPINLOCK (pci_lock) |
|
| EXPORT_SYMBOL (pci_bus_read_config_byte) |
|
| EXPORT_SYMBOL (pci_bus_read_config_word) |
|
| EXPORT_SYMBOL (pci_bus_read_config_dword) |
|
| EXPORT_SYMBOL (pci_bus_write_config_byte) |
|
| EXPORT_SYMBOL (pci_bus_write_config_word) |
|
| EXPORT_SYMBOL (pci_bus_write_config_dword) |
|
struct pci_ops * | pci_bus_set_ops (struct pci_bus *bus, struct pci_ops *ops) |
|
| EXPORT_SYMBOL (pci_bus_set_ops) |
|
ssize_t | pci_read_vpd (struct pci_dev *dev, loff_t pos, size_t count, void *buf) |
|
| EXPORT_SYMBOL (pci_read_vpd) |
|
ssize_t | pci_write_vpd (struct pci_dev *dev, loff_t pos, size_t count, const void *buf) |
|
| EXPORT_SYMBOL (pci_write_vpd) |
|
int | pci_vpd_pci22_init (struct pci_dev *dev) |
|
int | pci_vpd_truncate (struct pci_dev *dev, size_t size) |
|
| EXPORT_SYMBOL (pci_vpd_truncate) |
|
void | pci_cfg_access_lock (struct pci_dev *dev) |
|
| EXPORT_SYMBOL_GPL (pci_cfg_access_lock) |
|
bool | pci_cfg_access_trylock (struct pci_dev *dev) |
|
| EXPORT_SYMBOL_GPL (pci_cfg_access_trylock) |
|
void | pci_cfg_access_unlock (struct pci_dev *dev) |
|
| EXPORT_SYMBOL_GPL (pci_cfg_access_unlock) |
|
int | pcie_capability_read_word (struct pci_dev *dev, int pos, u16 *val) |
|
| EXPORT_SYMBOL (pcie_capability_read_word) |
|
int | pcie_capability_read_dword (struct pci_dev *dev, int pos, u32 *val) |
|
| EXPORT_SYMBOL (pcie_capability_read_dword) |
|
int | pcie_capability_write_word (struct pci_dev *dev, int pos, u16 val) |
|
| EXPORT_SYMBOL (pcie_capability_write_word) |
|
int | pcie_capability_write_dword (struct pci_dev *dev, int pos, u32 val) |
|
| EXPORT_SYMBOL (pcie_capability_write_dword) |
|
int | pcie_capability_clear_and_set_word (struct pci_dev *dev, int pos, u16 clear, u16 set) |
|
| EXPORT_SYMBOL (pcie_capability_clear_and_set_word) |
|
int | pcie_capability_clear_and_set_dword (struct pci_dev *dev, int pos, u32 clear, u32 set) |
|
| EXPORT_SYMBOL (pcie_capability_clear_and_set_dword) |
|
#define PCI_dword_BAD (pos & 3) |
Value:int pci_bus_read_config_##
size \
{ \
raw_spin_lock_irqsave(&pci_lock, flags); \
raw_spin_unlock_irqrestore(&pci_lock, flags); \
}
Definition at line 28 of file access.c.
Value:int pci_bus_write_config_##
size \
{ \
raw_spin_lock_irqsave(&pci_lock, flags); \
raw_spin_unlock_irqrestore(&pci_lock, flags); \
}
Definition at line 43 of file access.c.
#define PCI_USER_READ_CONFIG |
( |
|
size, |
|
|
|
type |
|
) |
| |
Value:int pci_user_read_config_##
size \
{ \
raw_spin_lock_irq(&pci_lock); \
pci_wait_cfg(dev); \
raw_spin_unlock_irq(&pci_lock); \
if (ret > 0) \
} \
EXPORT_SYMBOL_GPL(pci_user_read_config_##
size);
Definition at line 147 of file access.c.
#define PCI_USER_WRITE_CONFIG |
( |
|
size, |
|
|
|
type |
|
) |
| |
Value:int pci_user_write_config_##
size \
{ \
raw_spin_lock_irq(&pci_lock); \
pci_wait_cfg(dev); \
raw_spin_unlock_irq(&pci_lock); \
if (ret > 0) \
} \
EXPORT_SYMBOL_GPL(pci_user_write_config_##
size);
Definition at line 169 of file access.c.
#define PCI_word_BAD (pos & 1) |
EXPORT_SYMBOL |
( |
pci_bus_read_config_byte |
| ) |
|
EXPORT_SYMBOL |
( |
pci_bus_read_config_word |
| ) |
|
EXPORT_SYMBOL |
( |
pci_bus_read_config_dword |
| ) |
|
EXPORT_SYMBOL |
( |
pci_bus_write_config_byte |
| ) |
|
EXPORT_SYMBOL |
( |
pci_bus_write_config_word |
| ) |
|
EXPORT_SYMBOL |
( |
pci_bus_write_config_dword |
| ) |
|
pci_bus_set_ops - Set raw operations of pci bus : pci bus struct : new raw operations
Return previous raw operations
Definition at line 77 of file access.c.
pci_cfg_access_lock - Lock PCI config reads/writes : pci device struct
When access is locked, any userspace reads or writes to config space and concurrent lock requests will sleep until access is allowed via pci_cfg_access_unlocked again.
Definition at line 415 of file access.c.
pci_cfg_access_trylock - try to lock PCI config reads/writes : pci device struct
Same as pci_cfg_access_lock, but will return 0 if access is already locked, 1 otherwise. This function can be used from atomic contexts.
Definition at line 435 of file access.c.
pci_cfg_access_unlock - Unlock PCI config reads/writes : pci device struct
This function allows PCI config accesses to resume.
Definition at line 457 of file access.c.
pci_read_vpd - Read one entry from Vital Product Data : pci device struct : offset in vpd space : number of bytes to read : pointer to where to store result
Definition at line 98 of file access.c.
pci_vpd_truncate - Set available Vital Product Data size : pci device struct : available memory in bytes
Adjust size of available VPD area.
Definition at line 390 of file access.c.
pci_write_vpd - Write entry to Vital Product Data : pci device struct : offset in vpd space : number of bytes to write : buffer containing write data
Definition at line 114 of file access.c.