mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
dma: Let ld*_dma() propagate MemTxResult
dma_memory_read() returns a MemTxResult type. Do not discard it, return it to the caller. Update the few callers. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211223115554.3155328-19-philmd@redhat.com>
This commit is contained in:
parent
24aed6bcb6
commit
cd1db8df74
5 changed files with 29 additions and 23 deletions
|
@ -2062,7 +2062,7 @@ static TRBCCode xhci_address_slot(XHCIState *xhci, unsigned int slotid,
|
|||
assert(slotid >= 1 && slotid <= xhci->numslots);
|
||||
|
||||
dcbaap = xhci_addr64(xhci->dcbaap_low, xhci->dcbaap_high);
|
||||
poctx = ldq_le_dma(xhci->as, dcbaap + 8 * slotid, MEMTXATTRS_UNSPECIFIED);
|
||||
ldq_le_dma(xhci->as, dcbaap + 8 * slotid, &poctx, MEMTXATTRS_UNSPECIFIED);
|
||||
ictx = xhci_mask64(pictx);
|
||||
octx = xhci_mask64(poctx);
|
||||
|
||||
|
@ -3429,6 +3429,7 @@ static int usb_xhci_post_load(void *opaque, int version_id)
|
|||
uint32_t slot_ctx[4];
|
||||
uint32_t ep_ctx[5];
|
||||
int slotid, epid, state;
|
||||
uint64_t addr;
|
||||
|
||||
dcbaap = xhci_addr64(xhci->dcbaap_low, xhci->dcbaap_high);
|
||||
|
||||
|
@ -3437,8 +3438,8 @@ static int usb_xhci_post_load(void *opaque, int version_id)
|
|||
if (!slot->addressed) {
|
||||
continue;
|
||||
}
|
||||
slot->ctx = xhci_mask64(ldq_le_dma(xhci->as, dcbaap + 8 * slotid,
|
||||
MEMTXATTRS_UNSPECIFIED));
|
||||
ldq_le_dma(xhci->as, dcbaap + 8 * slotid, &addr, MEMTXATTRS_UNSPECIFIED);
|
||||
slot->ctx = xhci_mask64(addr);
|
||||
xhci_dma_read_u32s(xhci, slot->ctx, slot_ctx, sizeof(slot_ctx));
|
||||
slot->uport = xhci_lookup_uport(xhci, slot_ctx);
|
||||
if (!slot->uport) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue