提交 e6f3e5e0 编写于 作者: P pbrook

OHCI large packet fix.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1939 c046a42c-6fe2-441c-8c8c-71466251a162
上级 159f3663
......@@ -419,6 +419,7 @@ static void ohci_copy_td(struct ohci_td *td, uint8_t *buf, int len, int write)
if (n == len)
return;
ptr = td->be & ~0xfffu;
buf += n;
cpu_physical_memory_rw(ptr, buf, len - n, write);
}
......@@ -474,7 +475,12 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed)
return 1;
}
if (td.cbp && td.be) {
len = (td.be - td.cbp) + 1;
if ((td.cbp & 0xfffff000) != (td.be & 0xfffff000)) {
len = (td.be & 0xfff) + 0x1001 - (td.cbp & 0xfff);
} else {
len = (td.be - td.cbp) + 1;
}
if (len && dir != OHCI_TD_DIR_IN) {
ohci_copy_td(&td, buf, len, 0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册