mirror of https://gitee.com/openkylin/qemu.git
ehci: Don't verify the next pointer for periodic qh-s and qtd-s
While testing the move to async packet handling for interrupt endpoints I noticed that Windows-XP likes to play tricks with the next pointer for periodic qh-s, so we should not fail qh / qtd verification when it changes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
601a234731
commit
2c7b15c1de
|
@ -1550,8 +1550,10 @@ static EHCIQueue *ehci_state_fetchqh(EHCIState *ehci, int async)
|
||||||
endp = get_field(qh.epchar, QH_EPCHAR_EP);
|
endp = get_field(qh.epchar, QH_EPCHAR_EP);
|
||||||
if ((devaddr != get_field(q->qh.epchar, QH_EPCHAR_DEVADDR)) ||
|
if ((devaddr != get_field(q->qh.epchar, QH_EPCHAR_DEVADDR)) ||
|
||||||
(endp != get_field(q->qh.epchar, QH_EPCHAR_EP)) ||
|
(endp != get_field(q->qh.epchar, QH_EPCHAR_EP)) ||
|
||||||
(memcmp(&qh.current_qtd, &q->qh.current_qtd,
|
(qh.current_qtd != q->qh.current_qtd) ||
|
||||||
9 * sizeof(uint32_t)) != 0) ||
|
(q->async && qh.next_qtd != q->qh.next_qtd) ||
|
||||||
|
(memcmp(&qh.altnext_qtd, &q->qh.altnext_qtd,
|
||||||
|
7 * sizeof(uint32_t)) != 0) ||
|
||||||
(q->dev != NULL && q->dev->addr != devaddr)) {
|
(q->dev != NULL && q->dev->addr != devaddr)) {
|
||||||
if (ehci_reset_queue(q) > 0) {
|
if (ehci_reset_queue(q) > 0) {
|
||||||
ehci_trace_guest_bug(ehci, "guest updated active QH");
|
ehci_trace_guest_bug(ehci, "guest updated active QH");
|
||||||
|
@ -1719,7 +1721,8 @@ static int ehci_state_fetchqtd(EHCIQueue *q)
|
||||||
p = QTAILQ_FIRST(&q->packets);
|
p = QTAILQ_FIRST(&q->packets);
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
if (p->qtdaddr != q->qtdaddr ||
|
if (p->qtdaddr != q->qtdaddr ||
|
||||||
(!NLPTR_TBIT(p->qtd.next) && (p->qtd.next != qtd.next)) ||
|
(q->async && !NLPTR_TBIT(p->qtd.next) &&
|
||||||
|
(p->qtd.next != qtd.next)) ||
|
||||||
(!NLPTR_TBIT(p->qtd.altnext) && (p->qtd.altnext != qtd.altnext)) ||
|
(!NLPTR_TBIT(p->qtd.altnext) && (p->qtd.altnext != qtd.altnext)) ||
|
||||||
p->qtd.bufptr[0] != qtd.bufptr[0]) {
|
p->qtd.bufptr[0] != qtd.bufptr[0]) {
|
||||||
ehci_cancel_queue(q);
|
ehci_cancel_queue(q);
|
||||||
|
|
Loading…
Reference in New Issue