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

Commit cd69a09e authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Christoph Hellwig
Browse files

bfa: Do not call pci_enable_msix() after it failed once



Function pci_enable_msix() should not be called in case
it threw a negative errno from a previous call.

Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Acked-by: default avatarAnil Gurumurthy <anil.gurumurthy@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 1e5df2a5
Loading
Loading
Loading
Loading
+23 −25
Original line number Diff line number Diff line
@@ -1235,9 +1235,8 @@ bfad_setup_intr(struct bfad_s *bfad)
	   (bfa_asic_id_cb(pdev->device) && !msix_disable_cb)) {

		error = pci_enable_msix(bfad->pcidev, msix_entries, bfad->nvec);
		if (error) {
		/* In CT1 & CT2, try to allocate just one vector */
			if (bfa_asic_id_ctc(pdev->device)) {
		if (error > 0 && bfa_asic_id_ctc(pdev->device)) {
			printk(KERN_WARNING "bfa %s: trying one msix "
			       "vector failed to allocate %d[%d]\n",
			       bfad->pci_name, bfad->nvec, error);
@@ -1262,7 +1261,6 @@ bfad_setup_intr(struct bfad_s *bfad)
				bfad->inst_no, error);
			goto line_based;
		}
		}

		/* Disable INTX in MSI-X mode */
		pci_read_config_word(pdev, PCI_COMMAND, &reg);