MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_pci_msix_init

Function rt_pci_msix_init

components/drivers/pci/msi/device.c:33–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void rt_pci_msix_init(struct rt_pci_device *pdev)
34{
35 if (pdev && (pdev->msix_cap = rt_pci_find_capability(pdev, PCIY_MSIX)))
36 {
37 rt_uint16_t ctrl;
38
39 rt_pci_read_config_u16(pdev, pdev->msix_cap + PCIR_MSIX_CTRL, &ctrl);
40
41 if (ctrl & PCIM_MSIXCTRL_MSIX_ENABLE)
42 {
43 rt_pci_write_config_u16(pdev, pdev->msix_cap + PCIR_MSIX_CTRL, ctrl & ~PCIM_MSIXCTRL_MSIX_ENABLE);
44 }
45 }
46}

Callers 1

pci_init_capabilitiesFunction · 0.85

Calls 3

rt_pci_find_capabilityFunction · 0.85
rt_pci_read_config_u16Function · 0.85
rt_pci_write_config_u16Function · 0.85

Tested by

no test coverage detected