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

Function pci_intx_mask_broken

components/drivers/pci/probe.c:158–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158static rt_bool_t pci_intx_mask_broken(struct rt_pci_device *pdev)
159{
160 rt_bool_t res = RT_FALSE;
161 rt_uint16_t orig, toggle, new;
162
163 rt_pci_read_config_u16(pdev, PCIR_COMMAND, &orig);
164 toggle = orig ^ PCIM_CMD_INTxDIS;
165 rt_pci_write_config_u16(pdev, PCIR_COMMAND, toggle);
166 rt_pci_read_config_u16(pdev, PCIR_COMMAND, &new);
167
168 rt_pci_write_config_u16(pdev, PCIR_COMMAND, orig);
169
170 if (new != toggle)
171 {
172 res = RT_TRUE;
173 }
174
175 return res;
176}
177
178static void pci_read_irq(struct rt_pci_device *pdev)
179{

Callers 1

rt_pci_setup_deviceFunction · 0.85

Calls 2

rt_pci_read_config_u16Function · 0.85
rt_pci_write_config_u16Function · 0.85

Tested by

no test coverage detected