Since PCI is little endian, 8-bit access might work, but the spec section
is very clear on this:
4.1.3.1 Driver Requirements: PCI Device Layout
The driver MUST access each field using the “natural” access method,
i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
fields and 8-bit accesses for 8-bit fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
/* Check if queue is either not available or already active. */
num = ioread16(&cfg->queue_size);
- if (!num || ioread8(&cfg->queue_enable))
+ if (!num || ioread16(&cfg->queue_enable))
return ERR_PTR(-ENOENT);
if (num & (num - 1)) {
*/
list_for_each_entry(vq, &vdev->vqs, list) {
iowrite16(vq->index, &vp_dev->common->queue_select);
- iowrite8(1, &vp_dev->common->queue_enable);
+ iowrite16(1, &vp_dev->common->queue_enable);
}
return 0;