Skip to content

Commit 3a88c2a

Browse files
fix(sio): whoops, DMA should only be unmapped after reading the info
1 parent 7af37ed commit 3a88c2a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hw/dma/apple_sio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,14 @@ static void apple_sio_dma_writeback(AppleSIOState *s, AppleSIODMAEndpoint *ep)
144144

145145
rtk = APPLE_RTKIT(s);
146146

147-
apple_sio_unmap_dma(s, ep);
148-
149147
m.op = OP_DMA_COMPLETE;
150148
m.ep = ep->id;
151149
m.param = (1 << 7);
152150
m.tag = ep->tag;
153151
m.data = ep->actual_length;
152+
153+
apple_sio_unmap_dma(s, ep);
154+
154155
apple_rtkit_send_user_msg(rtk, EP_CONTROL, m.raw);
155156
}
156157

0 commit comments

Comments
 (0)