return 0;
}
-static int virtio_pci_reset(struct udevice *udev)
-{
- struct virtio_pci_priv *priv = dev_get_priv(udev);
-
- /* 0 status means a reset */
- iowrite8(0, &priv->common->device_status);
-
- /*
- * After writing 0 to device_status, the driver MUST wait for a read
- * of device_status to return 0 before reinitializing the device.
- * This will flush out the status write, and flush in device writes,
- * including MSI-X interrupts, if any.
- */
- while (ioread8(&priv->common->device_status))
- udelay(1000);
-
- return 0;
-}
-
static int virtio_pci_get_features(struct udevice *udev, u64 *features)
{
struct virtio_pci_priv *priv = dev_get_priv(udev);
return 0;
}
+static int virtio_pci_reset(struct udevice *udev)
+{
+ struct virtio_pci_priv *priv = dev_get_priv(udev);
+
+ /* 0 status means a reset */
+ iowrite8(0, &priv->common->device_status);
+
+ /*
+ * After writing 0 to device_status, the driver MUST wait for a read
+ * of device_status to return 0 before reinitializing the device.
+ * This will flush out the status write, and flush in device writes,
+ * including MSI-X interrupts, if any.
+ */
+ while (ioread8(&priv->common->device_status))
+ udelay(1000);
+
+ return virtio_pci_del_vqs(udev);
+}
+
static int virtio_pci_notify(struct udevice *udev, struct virtqueue *vq)
{
struct virtio_pci_priv *priv = dev_get_priv(udev);