diff options
author | Prasad J Pandit <pjp@fedoraproject.org> | 2016-01-29 18:30:34 +0530 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-03-18 14:20:39 +0100 |
commit | dff0367cf66f489aa772320fa2937a8cac1ca30d (patch) | |
tree | c47fa23377280ce69ae9d124aadbe11ee4c28b80 /hw/usb/hcd-ehci.c | |
parent | 983bff3530782d51c46c8d7c0e17e2a9dfe5fb77 (diff) | |
download | qemu-dff0367cf66f489aa772320fa2937a8cac1ca30d.zip qemu-dff0367cf66f489aa772320fa2937a8cac1ca30d.tar.gz qemu-dff0367cf66f489aa772320fa2937a8cac1ca30d.tar.bz2 |
usb: ehci: add capability mmio write function
USB Ehci emulation supports host controller capability registers.
But its mmio '.write' function was missing, which lead to a null
pointer dereference issue. Add a do nothing 'ehci_caps_write'
definition to avoid it; Do nothing because capability registers
are Read Only(RO).
Reported-by: Zuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 1454072434-16045-1-git-send-email-ppandit@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/hcd-ehci.c')
-rw-r--r-- | hw/usb/hcd-ehci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1b50601..0f95d0d 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -895,6 +895,11 @@ static uint64_t ehci_caps_read(void *ptr, hwaddr addr, return s->caps[addr]; } +static void ehci_caps_write(void *ptr, hwaddr addr, + uint64_t val, unsigned size) +{ +} + static uint64_t ehci_opreg_read(void *ptr, hwaddr addr, unsigned size) { @@ -2315,6 +2320,7 @@ static void ehci_frame_timer(void *opaque) static const MemoryRegionOps ehci_mmio_caps_ops = { .read = ehci_caps_read, + .write = ehci_caps_write, .valid.min_access_size = 1, .valid.max_access_size = 4, .impl.min_access_size = 1, |