virtio_pci: use 16-bit accessor for queue_enable.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 11 Feb 2015 04:31:14 +0000 (15:01 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 11 Feb 2015 04:33:16 +0000 (15:03 +1030)
commit7abb568dbb32d055ec6a5633d26fb39fbcd525e3
tree7e5aac0a98bbcd55d764a28c84743a02ff72e320
parent6d96ee98b1d08bcf0f90a6bf2c6766dda6b3a010
virtio_pci: use 16-bit accessor for queue_enable.

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>
drivers/virtio/virtio_pci_modern.c