summaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch
diff options
context:
space:
mode:
authorTodd Foggoa <tfoggoa@cisco.com>2016-04-12 14:33:55 -0400
committerGerrit Code Review <gerrit@fd.io>2016-04-12 20:34:21 +0000
commit619ac1c84cf8face92d200f17070dbf7ccd8f067 (patch)
treeb3c5cd151d1f3c45d34368d316aaa47c757712bf /dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch
parent370a24e36e7f32df66cfca2fb03214c93d164d64 (diff)
Porting 2 dpdk patches to dpdk 16.04 patches
Change-Id: If298d0ba4941b3c8ccec3b407080661b4a06ac5b Signed-off-by: Todd Foggoa <tfoggoa@cisco.com>
Diffstat (limited to 'dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch')
-rw-r--r--dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch b/dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch
new file mode 100644
index 00000000000..e938c7ca135
--- /dev/null
+++ b/dpdk/dpdk-16.04_patches/0007-Fix-a-crash-in-igb_uio-driver-when-the-device-is-rem.patch
@@ -0,0 +1,36 @@
+From a1020e16640e3b5d8cf32ef7d2914b788a1e06f6 Mon Sep 17 00:00:00 2001
+From: Bud Grise <griseb@cisco.com>
+Date: Tue, 2 Feb 2016 12:45:44 -0800
+Subject: [PATCH 7/8] 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>
+---
+ 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 72b2692..bf12391 100644
+--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
++++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
+@@ -506,8 +506,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)
+--
+2.5.4 (Apple Git-61)
+