Implement pci_get_relaxed_ordering_enabled() helper function.
Discussed with: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
c96151d335
commit
1acf24a044
@ -2182,6 +2182,21 @@ pci_ht_map_msi(device_t dev, uint64_t addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
pci_get_relaxed_ordering_enabled(device_t dev)
|
||||||
|
{
|
||||||
|
struct pci_devinfo *dinfo = device_get_ivars(dev);
|
||||||
|
int cap;
|
||||||
|
uint16_t val;
|
||||||
|
|
||||||
|
cap = dinfo->cfg.pcie.pcie_location;
|
||||||
|
if (cap == 0)
|
||||||
|
return (0);
|
||||||
|
val = pci_read_config(dev, cap + PCIER_DEVICE_CTL, 2);
|
||||||
|
val &= PCIEM_CTL_RELAXED_ORD_ENABLE;
|
||||||
|
return (val != 0);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
pci_get_max_payload(device_t dev)
|
pci_get_max_payload(device_t dev)
|
||||||
{
|
{
|
||||||
|
@ -677,6 +677,7 @@ int pci_msix_device_blacklisted(device_t dev);
|
|||||||
void pci_ht_map_msi(device_t dev, uint64_t addr);
|
void pci_ht_map_msi(device_t dev, uint64_t addr);
|
||||||
|
|
||||||
device_t pci_find_pcie_root_port(device_t dev);
|
device_t pci_find_pcie_root_port(device_t dev);
|
||||||
|
int pci_get_relaxed_ordering_enabled(device_t dev);
|
||||||
int pci_get_max_payload(device_t dev);
|
int pci_get_max_payload(device_t dev);
|
||||||
int pci_get_max_read_req(device_t dev);
|
int pci_get_max_read_req(device_t dev);
|
||||||
void pci_restore_state(device_t dev);
|
void pci_restore_state(device_t dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user