Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c901851f authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Jesse Barnes
Browse files

PCI MSI: Remove attribute check from pci_disable_msi()



The msi_list never have MSI-X's msi_desc while MSI is enabled,
and also it never have MSI's msi_desc while MSI-X is enabled.

This patch remove check for MSI-X entry from the pci_disable_msi(),
referring that pci_disable_msix() does not have any check for MSI
entry.

Reviewed-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 80286879
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -640,17 +640,10 @@ void pci_msi_shutdown(struct pci_dev *dev)


void pci_disable_msi(struct pci_dev* dev)
void pci_disable_msi(struct pci_dev* dev)
{
{
	struct msi_desc *entry;

	if (!pci_msi_enable || !dev || !dev->msi_enabled)
	if (!pci_msi_enable || !dev || !dev->msi_enabled)
		return;
		return;


	pci_msi_shutdown(dev);
	pci_msi_shutdown(dev);

	entry = list_entry(dev->msi_list.next, struct msi_desc, list);
	if (entry->msi_attrib.is_msix)
		return;

	msi_free_irqs(dev);
	msi_free_irqs(dev);
}
}
EXPORT_SYMBOL(pci_disable_msi);
EXPORT_SYMBOL(pci_disable_msi);
@@ -774,13 +767,13 @@ void pci_msix_shutdown(struct pci_dev* dev)
	pci_intx_for_msi(dev, 1);
	pci_intx_for_msi(dev, 1);
	dev->msix_enabled = 0;
	dev->msix_enabled = 0;
}
}

void pci_disable_msix(struct pci_dev* dev)
void pci_disable_msix(struct pci_dev* dev)
{
{
	if (!pci_msi_enable || !dev || !dev->msix_enabled)
	if (!pci_msi_enable || !dev || !dev->msix_enabled)
		return;
		return;


	pci_msix_shutdown(dev);
	pci_msix_shutdown(dev);

	msix_free_all_irqs(dev);
	msix_free_all_irqs(dev);
}
}
EXPORT_SYMBOL(pci_disable_msix);
EXPORT_SYMBOL(pci_disable_msix);