diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-05-20 00:15:47 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-05-19 08:45:47 -0400 |
commit | eaeff9608a8cf43a676b6f4b6235ea9d76192230 (patch) | |
tree | 256259307b5ea4d2985d998896b10b1194182aa6 /drivers/char | |
parent | 3425e706bf6faa2965c4e99f39085f7367a8f4e2 (diff) |
virtio: console: Let host know of port or device add failures
The host may want to know and let management apps notify of port or
device add failures. Send a control message saying the device or port is
not ready in this case.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/virtio_console.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 8c24b86aadc9..f63bf77a4825 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -1210,6 +1210,8 @@ free_cdev: | |||
1210 | free_port: | 1210 | free_port: |
1211 | kfree(port); | 1211 | kfree(port); |
1212 | fail: | 1212 | fail: |
1213 | /* The host might want to notify management sw about port add failure */ | ||
1214 | send_control_msg(port, VIRTIO_CONSOLE_PORT_READY, 0); | ||
1213 | return err; | 1215 | return err; |
1214 | } | 1216 | } |
1215 | 1217 | ||
@@ -1488,6 +1490,9 @@ free_chrdev: | |||
1488 | free: | 1490 | free: |
1489 | kfree(portdev); | 1491 | kfree(portdev); |
1490 | fail: | 1492 | fail: |
1493 | /* The host might want to notify mgmt sw about device add failure */ | ||
1494 | __send_control_msg(portdev, VIRTIO_CONSOLE_BAD_ID, | ||
1495 | VIRTIO_CONSOLE_DEVICE_READY, 0); | ||
1491 | return err; | 1496 | return err; |
1492 | } | 1497 | } |
1493 | 1498 | ||