Revision f487b677 hw/usb/hcd-ehci.c
b/hw/usb/hcd-ehci.c | ||
---|---|---|
1241 | 1241 |
{ |
1242 | 1242 |
uint32_t cpage, offset, bytes, plen; |
1243 | 1243 |
dma_addr_t page; |
1244 |
USBBus *bus = &p->queue->ehci->bus; |
|
1245 |
BusState *qbus = BUS(bus); |
|
1244 | 1246 |
|
1245 | 1247 |
cpage = get_field(p->qtd.token, QTD_TOKEN_CPAGE); |
1246 | 1248 |
bytes = get_field(p->qtd.token, QTD_TOKEN_TBYTES); |
1247 | 1249 |
offset = p->qtd.bufptr[0] & ~QTD_BUFPTR_MASK; |
1248 |
qemu_sglist_init(&p->sgl, 5, p->queue->ehci->as); |
|
1250 |
qemu_sglist_init(&p->sgl, qbus->parent, 5, p->queue->ehci->as);
|
|
1249 | 1251 |
|
1250 | 1252 |
while (bytes > 0) { |
1251 | 1253 |
if (cpage > 4) { |
... | ... | |
1484 | 1486 |
return -1; |
1485 | 1487 |
} |
1486 | 1488 |
|
1487 |
qemu_sglist_init(&ehci->isgl, 2, ehci->as); |
|
1489 |
qemu_sglist_init(&ehci->isgl, DEVICE(ehci), 2, ehci->as);
|
|
1488 | 1490 |
if (off + len > 4096) { |
1489 | 1491 |
/* transfer crosses page border */ |
1490 | 1492 |
uint32_t len2 = off + len - 4096; |
Also available in: Unified diff