diff options
Diffstat (limited to 'drivers/pci/pci.c')
| -rw-r--r-- | drivers/pci/pci.c | 15 | 
1 files changed, 8 insertions, 7 deletions
| diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e3a49f66982d..ffaaca0978cb 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4477,12 +4477,6 @@ void pci_intx(struct pci_dev *pdev, int enable)  {  	u16 pci_command, new; -	/* Preserve the "hybrid" behavior for backwards compatibility */ -	if (pci_is_managed(pdev)) { -		WARN_ON_ONCE(pcim_intx(pdev, enable) != 0); -		return; -	} -  	pci_read_config_word(pdev, PCI_COMMAND, &pci_command);  	if (enable) @@ -4490,8 +4484,15 @@ void pci_intx(struct pci_dev *pdev, int enable)  	else  		new = pci_command | PCI_COMMAND_INTX_DISABLE; -	if (new != pci_command) +	if (new != pci_command) { +		/* Preserve the "hybrid" behavior for backwards compatibility */ +		if (pci_is_managed(pdev)) { +			WARN_ON_ONCE(pcim_intx(pdev, enable) != 0); +			return; +		} +  		pci_write_config_word(pdev, PCI_COMMAND, new); +	}  }  EXPORT_SYMBOL_GPL(pci_intx); | 
