[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <66015840.659833.1301978966706.JavaMail.root@zmail07.collab.prod.int.phx2.redhat.com>
Date: Tue, 5 Apr 2011 00:49:26 -0400 (EDT)
From: Takuma Umeya <tumeya@...hat.com>
To: virtualization@...ts.linux-foundation.org
Cc: Stephen Hemminger <shemminger@...tta.com>,
Rusty Russell <rusty@...tcorp.com.au>,
linux-kernel@...r.kernel.org
Subject: [PATCH] virtio: decrement dev_index when device is unregistered
When virtio device is removed, dev_index does not get decremented.
The next device hotplug event results in consuming the next pci to
the one that is suppose to be available.
Signed-off-by: Takuma Umeya <tumeya@...hat.com>
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c
index efb35aa..67fe71d 100644
--- a/drivers/virtio/virtio.c
+++ b/drivers/virtio/virtio.c
@@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(register_virtio_device);
void unregister_virtio_device(struct virtio_device *dev)
{
device_unregister(&dev->dev);
+ dev_index--;
}
EXPORT_SYMBOL_GPL(unregister_virtio_device);
--
Umeya, Takuma
Technical Account Manager
Red Hat GSS APAC
+81.3.5798.8584 (direct)
tumeya@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists