aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ioat/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r--drivers/dma/ioat/dma.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 1879a5942bfc..17a2393b3e25 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -892,7 +892,7 @@ MODULE_PARM_DESC(ioat_interrupt_style,
892 * ioat_dma_setup_interrupts - setup interrupt handler 892 * ioat_dma_setup_interrupts - setup interrupt handler
893 * @device: ioat device 893 * @device: ioat device
894 */ 894 */
895static int ioat_dma_setup_interrupts(struct ioatdma_device *device) 895int ioat_dma_setup_interrupts(struct ioatdma_device *device)
896{ 896{
897 struct ioat_chan_common *chan; 897 struct ioat_chan_common *chan;
898 struct pci_dev *pdev = device->pdev; 898 struct pci_dev *pdev = device->pdev;
@@ -941,6 +941,7 @@ msix:
941 } 941 }
942 } 942 }
943 intrctrl |= IOAT_INTRCTRL_MSIX_VECTOR_CONTROL; 943 intrctrl |= IOAT_INTRCTRL_MSIX_VECTOR_CONTROL;
944 device->irq_mode = IOAT_MSIX;
944 goto done; 945 goto done;
945 946
946msix_single_vector: 947msix_single_vector:
@@ -956,6 +957,7 @@ msix_single_vector:
956 pci_disable_msix(pdev); 957 pci_disable_msix(pdev);
957 goto msi; 958 goto msi;
958 } 959 }
960 device->irq_mode = IOAT_MSIX_SINGLE;
959 goto done; 961 goto done;
960 962
961msi: 963msi:
@@ -969,6 +971,7 @@ msi:
969 pci_disable_msi(pdev); 971 pci_disable_msi(pdev);
970 goto intx; 972 goto intx;
971 } 973 }
974 device->irq_mode = IOAT_MSIX;
972 goto done; 975 goto done;
973 976
974intx: 977intx:
@@ -977,6 +980,7 @@ intx:
977 if (err) 980 if (err)
978 goto err_no_irq; 981 goto err_no_irq;
979 982
983 device->irq_mode = IOAT_INTX;
980done: 984done:
981 if (device->intr_quirk) 985 if (device->intr_quirk)
982 device->intr_quirk(device); 986 device->intr_quirk(device);
@@ -987,9 +991,11 @@ done:
987err_no_irq: 991err_no_irq:
988 /* Disable all interrupt generation */ 992 /* Disable all interrupt generation */
989 writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET); 993 writeb(0, device->reg_base + IOAT_INTRCTRL_OFFSET);
994 device->irq_mode = IOAT_NOIRQ;
990 dev_err(dev, "no usable interrupts\n"); 995 dev_err(dev, "no usable interrupts\n");
991 return err; 996 return err;
992} 997}
998EXPORT_SYMBOL(ioat_dma_setup_interrupts);
993 999
994static void ioat_disable_interrupts(struct ioatdma_device *device) 1000static void ioat_disable_interrupts(struct ioatdma_device *device)
995{ 1001{