All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix device removal on net and block frontend drivers
@ 2005-11-21 15:43 Murillo Fernandes Bernardes
  2005-11-21 16:07 ` Stefan Berger
  2005-11-21 17:48 ` Adam Heath
  0 siblings, 2 replies; 10+ messages in thread
From: Murillo Fernandes Bernardes @ 2005-11-21 15:43 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 352 bytes --]


Frontend devices are not being unregistered when in closed state. The 
following patch fix that.

Fix bug #420.

Makes "05_attach_and_dettach_device_repeatedly_pos" and 
"09_attach_and_dettach_device_check_data_pos" tests pass.


Signed-off-by: Murillo Fernandes Bernardes <mfb@br.ibm.com>

-- 
Murillo Fernandes Bernardes
IBM Linux Technology Center

[-- Attachment #2: frontend_unregister_device.patch --]
[-- Type: text/x-diff, Size: 1117 bytes --]

diff -r 6a666940fa04 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Sun Nov 20 09:19:38 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Mon Nov 21 14:58:42 2005
@@ -273,7 +273,6 @@
 	case XenbusStateInitialising:
 	case XenbusStateInitWait:
 	case XenbusStateInitialised:
-	case XenbusStateClosed:
 		break;
 
 	case XenbusStateConnected:
@@ -282,6 +281,10 @@
 
 	case XenbusStateClosing:
 		blkfront_closing(dev);
+		break;
+		
+	case XenbusStateClosed:
+		device_unregister(&dev->dev);
 		break;
 	}
 }
diff -r 6a666940fa04 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Sun Nov 20 09:19:38 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Mon Nov 21 14:58:42 2005
@@ -406,11 +406,14 @@
 	case XenbusStateInitialised:
 	case XenbusStateConnected:
 	case XenbusStateUnknown:
-	case XenbusStateClosed:
 		break;
 
 	case XenbusStateClosing:
 		netfront_closing(dev);
+		break;
+	
+	case XenbusStateClosed:
+		device_unregister(&dev->dev);
 		break;
 	}
 }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-21 21:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-21 15:43 [PATCH] Fix device removal on net and block frontend drivers Murillo Fernandes Bernardes
2005-11-21 16:07 ` Stefan Berger
2005-11-21 16:33   ` Murillo Fernandes Bernardes
2005-11-21 16:49     ` Stefan Berger
2005-11-21 18:31       ` Ewan Mellor
2005-11-21 20:02         ` Stefan Berger
2005-11-21 21:11         ` Murillo Fernandes Bernardes
2005-11-21 17:48 ` Adam Heath
2005-11-21 18:40   ` Ewan Mellor
2005-11-21 21:30     ` Adam Heath

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.