mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
bitkeeper revision 1.1159.20.1 (4119353fK0fKs_SYKxrgvHgZ7WbE4Q)
migration blkdev and netdev resume fixes
This commit is contained in:
1 parent
29ab24c974
commit
3cdfd04b47
3 files changed
+32
-2
No files matched your search
@@ -805,4 +805,16 @@ void blkdev_suspend(void)
|
||||
|
||||
void blkdev_resume(void)
|
||||
{
|
||||
ctrl_msg_t cmsg;
|
||||
blkif_fe_driver_status_changed_t st;
|
||||
|
||||
|
||||
/* Send a driver-UP notification to the domain controller. */
|
||||
cmsg.type = CMSG_BLKIF_FE;
|
||||
cmsg.subtype = CMSG_BLKIF_FE_DRIVER_STATUS_CHANGED;
|
||||
cmsg.length = sizeof(blkif_fe_driver_status_changed_t);
|
||||
st.status = BLKIF_DRIVER_STATUS_UP;
|
||||
memcpy(cmsg.msg, &st, sizeof(st));
|
||||
ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE);
|
||||
}
|
||||
|
||||
@@ -1200,6 +1200,7 @@ static void __do_suspend(void)
|
||||
/* Hmmm... a cleaner interface to suspend/resume blkdevs would be nice. */
|
||||
extern void blkdev_suspend(void);
|
||||
extern void blkdev_resume(void);
|
||||
extern void netif_resume(void);
|
||||
|
||||
extern void time_suspend(void);
|
||||
extern void time_resume(void);
|
||||
@@ -1248,8 +1249,8 @@ static void __do_suspend(void)
|
||||
|
||||
__sti();
|
||||
|
||||
//blkdev_resume();
|
||||
//netdev_resume();
|
||||
blkdev_resume();
|
||||
netif_resume();
|
||||
|
||||
out:
|
||||
if ( suspend_record != NULL )
|
||||
|
||||
@@ -874,4 +874,21 @@ static int __init netif_init(void)
|
||||
return err;
|
||||
}
|
||||
|
||||
void netif_resume(void)
|
||||
{
|
||||
ctrl_msg_t cmsg;
|
||||
netif_fe_driver_status_changed_t st;
|
||||
|
||||
/* Send a driver-UP notification to the domain controller. */
|
||||
cmsg.type = CMSG_NETIF_FE;
|
||||
cmsg.subtype = CMSG_NETIF_FE_DRIVER_STATUS_CHANGED;
|
||||
cmsg.length = sizeof(netif_fe_driver_status_changed_t);
|
||||
st.status = NETIF_DRIVER_STATUS_UP;
|
||||
st.nr_interfaces = 0;
|
||||
memcpy(cmsg.msg, &st, sizeof(st));
|
||||
ctrl_if_send_message_block(&cmsg, NULL, 0, TASK_UNINTERRUPTIBLE);
|
||||
|
||||
}
|
||||
|
||||
|
||||
__initcall(netif_init);
|
||||