Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

vioblk: Implement quiesce

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
  • Loading branch information...
commit 6f2fed297a600beec85591124fd05267f7557c30 1 parent 73f5d15
Alexey Zaytsev authored
Showing with 13 additions and 1 deletion.
  1. +13 −1 virtio_blk/vioblk.c
14 virtio_blk/vioblk.c
View
@@ -173,6 +173,7 @@ static bd_ops_t vioblk_ops = {
vioblk_write,
};
+static int vioblk_quiesce(dev_info_t *);
static int vioblk_attach(dev_info_t *, ddi_attach_cmd_t);
static int vioblk_detach(dev_info_t *, ddi_detach_cmd_t);
@@ -188,7 +189,7 @@ static struct dev_ops vioblk_dev_ops = {
NULL, /* cb_ops */
NULL, /* bus_ops */
NULL, /* power */
- ddi_quiesce_not_supported /* quiesce */
+ vioblk_quiesce /* quiesce */
};
@@ -1152,6 +1153,17 @@ vioblk_detach(dev_info_t *devinfo, ddi_detach_cmd_t cmd)
return (DDI_SUCCESS);
}
+static int
+vioblk_quiesce(dev_info_t *devinfo)
+{
+ struct vioblk_softc *sc = ddi_get_driver_private(devinfo);
+
+ virtio_stop_vq_intr(sc->sc_vq);
+ virtio_device_reset(&sc->sc_virtio);
+
+ return (DDI_SUCCESS);
+}
+
int
_init(void)
{
Please sign in to comment.
Something went wrong with that request. Please try again.