Ejemplo n.º 1
0
void disable_msi_mode(struct pci_dev *dev, int pos, int type)
{
    u16 control;

    pci_read_config_word(dev, msi_control_reg(pos), &control);
    if (type == PCI_CAP_ID_MSI) {
        /* Set enabled bits to single MSI & enable MSI_enable bit */
        msi_disable(control);
        pci_write_config_word(dev, msi_control_reg(pos), control);
    } else {
        msix_disable(control);
        pci_write_config_word(dev, msi_control_reg(pos), control);
    }
    if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
        /* PCI Express Endpoint device detected */
        pci_intx(dev, 1);  /* enable intx */
    }
}
Ejemplo n.º 2
0
static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
{
	u16 control;

	pci_read_config_word(dev, msi_control_reg(pos), &control);
	if (type == PCI_CAP_ID_MSI) {
		/* Set enabled bits to single MSI & enable MSI_enable bit */
		msi_disable(control);
		pci_write_config_word(dev, msi_control_reg(pos), control);
	} else {
		msix_disable(control);
		pci_write_config_word(dev, msi_control_reg(pos), control);
	}
    	if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
		/* PCI Express Endpoint device detected */
		u16 cmd;
		pci_read_config_word(dev, PCI_COMMAND, &cmd);
		cmd &= ~PCI_COMMAND_INTX_DISABLE;
		pci_write_config_word(dev, PCI_COMMAND, cmd);
	}
}