提交 dff0367c 编写于 作者: P Prasad J Pandit 提交者: Gerd Hoffmann

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: NZuozhi Fzz <zuozhi.fzz@alibaba-inc.com>
Signed-off-by: NPrasad J Pandit <pjp@fedoraproject.org>
Message-id: 1454072434-16045-1-git-send-email-ppandit@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 983bff35
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册