/* Similar to pci_intx(pdev, 1), except that we make sure msi is off...  */
static void ipath_enable_intx(struct pci_dev *pdev)
/* Similar to pci_intx(pdev, 1), except that we make sure msi is off...  */
static void ipath_enable_intx(struct pci_dev *pdev)
{
	u16 cw, new;
	int pos;
	pci_read_config_word(pdev, PCI_COMMAND, &cw);
	new = cw & ~PCI_COMMAND_INTX_DISABLE;
	if (new != cw)
		pci_write_config_word(pdev, PCI_COMMAND, new);
	pos = pci_find_capability(pdev, PCI_CAP_ID_MSI);
	if (pos) {
		pci_read_config_word(pdev, pos + PCI_MSI_FLAGS, &cw);
		new = cw & ~PCI_MSI_FLAGS_ENABLE;
		if (new != cw)
			pci_write_config_word(pdev, pos + PCI_MSI_FLAGS, new);
	}
}