diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2017-09-11 17:07:28 +1000 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2017-09-12 12:53:36 +1000 |
commit | 2e01fb1142cab15c2b05802c166cf48a01897a8e (patch) | |
tree | 2a846263776920e792716ff9d3a19aff558caa65 /lib | |
parent | 685af54d8a47a42d9d06c51be45870f6f210a0dc (diff) | |
download | SLOF-2e01fb1142cab15c2b05802c166cf48a01897a8e.zip SLOF-2e01fb1142cab15c2b05802c166cf48a01897a8e.tar.gz SLOF-2e01fb1142cab15c2b05802c166cf48a01897a8e.tar.bz2 |
usb-xhci: Reset ERSTSZ together with ERSTBA
When shutting down the adapter, SLOF writes 0 to the Event Ring Segment
Table Base Address Register (ERSTBA) but does not reset the Event Ring
Segment Table Size Register (ERSTSZ) which makes QEMU do DMA access
at zero address which fails in unassigned_mem_accepts.
This resets ERSTSZ right before resetting ERSTBA so these 2 registers
can stay in sync.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libusb/usb-xhci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c index 9f8b276..3ce6c00 100644 --- a/lib/libusb/usb-xhci.c +++ b/lib/libusb/usb-xhci.c @@ -873,6 +873,7 @@ static bool xhci_hcd_init(struct xhci_hcd *xhcd) return true; fail_erst_entries: + write_reg32(&irs->erstsz, 0); write_reg64(&irs->erstba, 0); mb(); SLOF_dma_map_out(xhcd->erst.dma, (void *)xhcd->erst.entries, XHCI_EVENT_TRBS_SIZE); @@ -916,6 +917,7 @@ static bool xhci_hcd_exit(struct xhci_hcd *xhcd) } irs = &xhcd->run_regs->irs[0]; + write_reg32(&irs->erstsz, 0); write_reg64(&irs->erstba, 0); mb(); if (xhcd->erst.entries) { |