Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset cede6f8 in mainline


Ignore:
Timestamp:
2018-05-24T17:54:02Z (3 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
b085bba
Parents:
31cf8c3c
Message:

Enable/disable the virtq when it's set/torn down

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/virtio/virtio.c

    r31cf8c3c rcede6f8  
    130130        ddf_msg(LVL_NOTE, "notification register: %p", q->notify);
    131131
     132        /* Enable the queue */
     133        pio_write_le16(&cfg->queue_enable, 1);
     134        ddf_msg(LVL_NOTE, "virtq %d set", num);
     135
    132136        return rc;
    133137}
     
    135139void virtio_virtq_teardown(virtio_dev_t *vdev, uint16_t num)
    136140{
     141        virtio_pci_common_cfg_t *cfg = vdev->common_cfg;
     142
     143        /* Disable the queue */
     144        pio_write_le16(&cfg->queue_enable, 0);
     145
    137146        virtq_t *q = &vdev->queues[num];
    138147        if (q->size)
Note: See TracChangeset for help on using the changeset viewer.