From: Murillo Fernandes Bernardes <mfb@br.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix device removal on net and block frontend drivers
Date: Mon, 21 Nov 2005 13:43:01 -0200 [thread overview]
Message-ID: <200511211343.02186.mfb@br.ibm.com> (raw)
[-- 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
next reply other threads:[~2005-11-21 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 15:43 Murillo Fernandes Bernardes [this message]
2005-11-21 16:07 ` [PATCH] Fix device removal on net and block frontend drivers 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511211343.02186.mfb@br.ibm.com \
--to=mfb@br.ibm.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.