xhci: Avoid DMA when ERSTBA is set to zero
commit6100dda70d84be83d131c3b35cb9c00f7b07db15
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 11 Sep 2017 06:56:06 +0000 (11 16:56 +1000)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 13 Sep 2017 08:41:39 +0000 (13 10:41 +0200)
tree5749e849bdb788e720fd241954c4b6abc162e2ae
parent619c200f6ce2f44fbc8a5732174530c3b4782aab
xhci: Avoid DMA when ERSTBA is set to zero

The existing XHCI code reads the Event Ring Segment Table Base Address
Register (ERSTBA) every time when it is changed. However zero is its
default state so one would think that zero there means it is not in use.

This adds a check for ERSTBA in addition to the existing check for
the Event Ring Segment Table Size Register (ERSTSZ).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 20170911065606.40600-1-aik@ozlabs.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/hcd-xhci.c