Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/pci.h
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | |||||
static inline void | static inline void | ||||
pci_set_drvdata(struct pci_dev *pdev, void *data) | pci_set_drvdata(struct pci_dev *pdev, void *data) | ||||
{ | { | ||||
dev_set_drvdata(&pdev->dev, data); | dev_set_drvdata(&pdev->dev, data); | ||||
} | } | ||||
static __inline void | |||||
pci_dev_put(struct pci_dev *pdev) | |||||
{ | |||||
if (pdev != NULL) | |||||
put_device(&pdev->dev); | |||||
} | |||||
static inline int | static inline int | ||||
pci_enable_device(struct pci_dev *pdev) | pci_enable_device(struct pci_dev *pdev) | ||||
{ | { | ||||
pci_enable_io(pdev->dev.bsddev, SYS_RES_IOPORT); | pci_enable_io(pdev->dev.bsddev, SYS_RES_IOPORT); | ||||
pci_enable_io(pdev->dev.bsddev, SYS_RES_MEMORY); | pci_enable_io(pdev->dev.bsddev, SYS_RES_MEMORY); | ||||
return (0); | return (0); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 740 Lines • ▼ Show 20 Lines | struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, | ||||
unsigned int bus, unsigned int devfn); | unsigned int bus, unsigned int devfn); | ||||
#define pci_get_domain_bus_and_slot(domain, bus, devfn) \ | #define pci_get_domain_bus_and_slot(domain, bus, devfn) \ | ||||
lkpi_pci_get_domain_bus_and_slot(domain, bus, devfn) | lkpi_pci_get_domain_bus_and_slot(domain, bus, devfn) | ||||
static inline int | static inline int | ||||
pci_domain_nr(struct pci_bus *pbus) | pci_domain_nr(struct pci_bus *pbus) | ||||
{ | { | ||||
return (pci_get_domain(pbus->self->dev.bsddev)); | return (pbus->domain); | ||||
} | } | ||||
static inline int | static inline int | ||||
pci_bus_read_config(struct pci_bus *bus, unsigned int devfn, | pci_bus_read_config(struct pci_bus *bus, unsigned int devfn, | ||||
int pos, uint32_t *val, int len) | int pos, uint32_t *val, int len) | ||||
{ | { | ||||
*val = pci_read_config(bus->self->dev.bsddev, pos, len); | *val = pci_read_config(bus->self->dev.bsddev, pos, len); | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |