aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/ioat/dma.c27
-rw-r--r--drivers/dma/ioat/dma.h1
-rw-r--r--drivers/dma/ioat/dma_v3.c7
3 files changed, 3 insertions, 32 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 6fcf741ad91b..fb879d9f026f 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -869,8 +869,7 @@ static char ioat_interrupt_style[32] = "msix";
869module_param_string(ioat_interrupt_style, ioat_interrupt_style, 869module_param_string(ioat_interrupt_style, ioat_interrupt_style,
870 sizeof(ioat_interrupt_style), 0644); 870 sizeof(ioat_interrupt_style), 0644);
871MODULE_PARM_DESC(ioat_interrupt_style, 871MODULE_PARM_DESC(ioat_interrupt_style,
872 "set ioat interrupt style: msix (default), " 872 "set ioat interrupt style: msix (default), msi, intx");
873 "msix-single-vector, msi, intx)");
874 873
875/** 874/**
876 * ioat_dma_setup_interrupts - setup interrupt handler 875 * ioat_dma_setup_interrupts - setup interrupt handler
@@ -888,8 +887,6 @@ int ioat_dma_setup_interrupts(struct ioatdma_device *device)
888 887
889 if (!strcmp(ioat_interrupt_style, "msix")) 888 if (!strcmp(ioat_interrupt_style, "msix"))
890 goto msix; 889 goto msix;
891 if (!strcmp(ioat_interrupt_style, "msix-single-vector"))
892 goto msix_single_vector;
893 if (!strcmp(ioat_interrupt_style, "msi")) 890 if (!strcmp(ioat_interrupt_style, "msi"))
894 goto msi; 891 goto msi;
895 if (!strcmp(ioat_interrupt_style, "intx")) 892 if (!strcmp(ioat_interrupt_style, "intx"))
@@ -904,10 +901,8 @@ msix:
904 device->msix_entries[i].entry = i; 901 device->msix_entries[i].entry = i;
905 902
906 err = pci_enable_msix(pdev, device->msix_entries, msixcnt); 903 err = pci_enable_msix(pdev, device->msix_entries, msixcnt);
907 if (err < 0) 904 if (err)
908 goto msi; 905 goto msi;
909 if (err > 0)
910 goto msix_single_vector;
911 906
912 for (i = 0; i < msixcnt; i++) { 907 for (i = 0; i < msixcnt; i++) {
913 msix = &device->msix_entries[i]; 908 msix = &device->msix_entries[i];
@@ -921,29 +916,13 @@ msix:
921 chan = ioat_chan_by_index(device, j); 916 chan = ioat_chan_by_index(device, j);
922 devm_free_irq(dev, msix->vector, chan); 917 devm_free_irq(dev, msix->vector, chan);
923 } 918 }
924 goto msix_single_vector; 919 goto msi;
925 } 920 }
926 } 921 }
927 intrctrl |= IOAT_INTRCTRL_MSIX_VECTOR_CONTROL; 922 intrctrl |= IOAT_INTRCTRL_MSIX_VECTOR_CONTROL;
928 device->irq_mode = IOAT_MSIX; 923 device->irq_mode = IOAT_MSIX;
929 goto done; 924 goto done;
930 925
931msix_single_vector:
932 msix = &device->msix_entries[0];
933 msix->entry = 0;
934 err = pci_enable_msix(pdev, device->msix_entries, 1);
935 if (err)
936 goto msi;
937
938 err = devm_request_irq(dev, msix->vector, ioat_dma_do_interrupt, 0,
939 "ioat-msix", device);
940 if (err) {
941 pci_disable_msix(pdev);
942 goto msi;
943 }
944 device->irq_mode = IOAT_MSIX_SINGLE;
945 goto done;
946
947msi: 926msi:
948 err = pci_enable_msi(pdev); 927 err = pci_enable_msi(pdev);
949 if (err) 928 if (err)
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index df552d841481..11fb877ddca9 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -52,7 +52,6 @@
52enum ioat_irq_mode { 52enum ioat_irq_mode {
53 IOAT_NOIRQ = 0, 53 IOAT_NOIRQ = 0,
54 IOAT_MSIX, 54 IOAT_MSIX,
55 IOAT_MSIX_SINGLE,
56 IOAT_MSI, 55 IOAT_MSI,
57 IOAT_INTX 56 IOAT_INTX
58}; 57};
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index f8170de1d6a4..38616634780f 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -1468,13 +1468,6 @@ static int ioat3_irq_reinit(struct ioatdma_device *device)
1468 pci_disable_msix(pdev); 1468 pci_disable_msix(pdev);
1469 break; 1469 break;
1470 1470
1471 case IOAT_MSIX_SINGLE:
1472 msix = &device->msix_entries[0];
1473 chan = ioat_chan_by_index(device, 0);
1474 devm_free_irq(&pdev->dev, msix->vector, chan);
1475 pci_disable_msix(pdev);
1476 break;
1477
1478 case IOAT_MSI: 1471 case IOAT_MSI:
1479 chan = ioat_chan_by_index(device, 0); 1472 chan = ioat_chan_by_index(device, 0);
1480 devm_free_irq(&pdev->dev, pdev->irq, chan); 1473 devm_free_irq(&pdev->dev, pdev->irq, chan);