FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
 * When used in a virtualized environment PCI BUSMASTER capability may not be set
 * so explicity set it here and rewrite the ENABLE in the MSIX control register
 * at this point to cause the host to successfully initialize us.
 */
When used in a virtualized environment PCI BUSMASTER capability may not be set
so explicity set it here and rewrite the ENABLE in the MSIX control register
at this point to cause the host to successfully initialize us.
When used in a virtualized environment PCI BUSMASTER capability may not be set so explicity set it here and rewrite the ENABLE in the MSIX control register at this point to cause the host to successfully initialize us .
void
ixl_set_busmaster(device_t dev)
{
	u16 pci_cmd_word;
	int msix_ctrl, rid;
	pci_cmd_word = pci_read_config(dev, PCIR_COMMAND, 2);
	pci_cmd_word |= PCIM_CMD_BUSMASTEREN;
	pci_write_config(dev, PCIR_COMMAND, pci_cmd_word, 2);
	pci_find_cap(dev, PCIY_MSIX, &rid);
	rid += PCIR_MSIX_CTRL;
	msix_ctrl = pci_read_config(dev, rid, 2);
	msix_ctrl |= PCIM_MSIXCTRL_MSIX_ENABLE;
	pci_write_config(dev, rid, msix_ctrl, 2);
}
void ixl_set_busmaster ( device_t dev ) { u16 pci_cmd_word ; int msix_ctrl , rid ; pci_cmd_word = pci_read_config ( dev , PCIR_COMMAND , 2 ) ; pci_cmd_word |= PCIM_CMD_BUSMASTEREN ; pci_write_config ( dev , PCIR_COMMAND , pci_cmd_word , 2 ) ; pci_find_cap ( dev , PCIY_MSIX , & rid ) ; rid += PCIR_MSIX_CTRL ; msix_ctrl = pci_read_config ( dev , rid , 2 ) ; msix_ctrl |= PCIM_MSIXCTRL_MSIX_ENABLE ; pci_write_config ( dev , rid , msix_ctrl , 2 ) ; }
When used in a virtualized environment PCI BUSMASTER capability may not be set
 so explicity set it here and rewrite the ENABLE in the MSIX control register
 at this point to cause the host to successfully initialize us.
When used in a virtualized environment PCI BUSMASTER capability may not be set so explicity set it here and rewrite the ENABLE in the MSIX control register at this point to cause the host to successfully initialize us .