summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch
diff options
context:
space:
mode:
authorRay Kinsella <ray.kinsella@intel.com>2016-08-10 12:48:06 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-08-10 12:51:18 +0000
commit2bd44b7cdd49188da46ea85c4ab64d38d1e586f4 (patch)
tree935ce40178f538ffa00030de31e57f1d71f71e4a /dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch
parent348c3b70a43a0307d8a83fcc8f615c637ced4658 (diff)
DPDK: Fix a crash in igb_uio driver when the device is removed.
This crash happens because the device still has MSI configured, the fix is to free the IRQ. Adding pending further investigation. Change-Id: Ifcd3404fcc25fe27dcccc67d0dcf9d8f0ec18582 Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com> Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Diffstat (limited to 'dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch')
-rw-r--r--dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch b/dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch
new file mode 100644
index 00000000000..07e1c9c8140
--- /dev/null
+++ b/dpdk/dpdk-16.07_patches/0007-UIO-Fix-a-crash-in-igb_uio-driver-when-the-device-is.patch
@@ -0,0 +1,38 @@
+From 95c2d549d8d123aac37a372580122f1b043c6165 Mon Sep 17 00:00:00 2001
+From: Ray Kinsella <ray.kinsella@intel.com>
+Date: Wed, 10 Aug 2016 11:59:07 +0100
+Subject: [PATCH] UIO: Fix a crash in igb_uio driver when the device is
+ removed.
+
+This crash happens because the device still has MSI configured,
+the fix is to free the IRQ.
+
+Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
+Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
+---
+ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+index df41e45..69873e7 100644
+--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
++++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+@@ -442,8 +442,15 @@ static void
+ igbuio_pci_remove(struct pci_dev *dev)
+ {
+ struct rte_uio_pci_dev *udev = pci_get_drvdata(dev);
++ struct uio_info *info = pci_get_drvdata(dev);
+
+ sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp);
++
++ if (info->irq && (info->irq != UIO_IRQ_CUSTOM)){
++ free_irq(info->irq, info->uio_dev);
++ info->irq = UIO_IRQ_NONE;
++ }
++
+ uio_unregister_device(&udev->info);
+ igbuio_pci_release_iomem(&udev->info);
+ if (udev->mode == RTE_INTR_MODE_MSIX)
+--
+1.9.1
+