Make sure reserved fields of the EHCI DMA descriptors are not dirty
after previous transfers. MFC after: 1 week
This commit is contained in:
parent
b353507895
commit
9ae7f7c13c
@ -1654,12 +1654,17 @@ ehci_setup_standard_chain_sub(struct ehci_std_temp *temp)
|
||||
}
|
||||
td->len = 0;
|
||||
|
||||
/* properly reset reserved fields */
|
||||
td->qtd_buffer[0] = 0;
|
||||
td->qtd_buffer_hi[0] = 0;
|
||||
|
||||
td->qtd_buffer[1] = 0;
|
||||
td->qtd_buffer[2] = 0;
|
||||
td->qtd_buffer[3] = 0;
|
||||
td->qtd_buffer[4] = 0;
|
||||
td->qtd_buffer_hi[0] = 0;
|
||||
td->qtd_buffer_hi[1] = 0;
|
||||
|
||||
td->qtd_buffer_hi[2] = 0;
|
||||
td->qtd_buffer_hi[3] = 0;
|
||||
td->qtd_buffer_hi[4] = 0;
|
||||
} else {
|
||||
|
||||
uint8_t x;
|
||||
@ -1714,6 +1719,12 @@ ehci_setup_standard_chain_sub(struct ehci_std_temp *temp)
|
||||
htohc32(temp->sc,
|
||||
buf_res.physaddr & (~0xFFF));
|
||||
td->qtd_buffer_hi[x] = 0;
|
||||
|
||||
/* properly reset reserved fields */
|
||||
while (++x < EHCI_QTD_NBUFFERS) {
|
||||
td->qtd_buffer[x] = 0;
|
||||
td->qtd_buffer_hi[x] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (td_next) {
|
||||
@ -2001,6 +2012,18 @@ ehci_setup_standard_chain(struct usb_xfer *xfer, ehci_qh_t **qh_last)
|
||||
qh->qh_qtd.qtd_altnext =
|
||||
htohc32(temp.sc, EHCI_LINK_TERMINATE);
|
||||
|
||||
/* properly reset reserved fields */
|
||||
qh->qh_qtd.qtd_buffer[0] = 0;
|
||||
qh->qh_qtd.qtd_buffer[1] = 0;
|
||||
qh->qh_qtd.qtd_buffer[2] = 0;
|
||||
qh->qh_qtd.qtd_buffer[3] = 0;
|
||||
qh->qh_qtd.qtd_buffer[4] = 0;
|
||||
qh->qh_qtd.qtd_buffer_hi[0] = 0;
|
||||
qh->qh_qtd.qtd_buffer_hi[1] = 0;
|
||||
qh->qh_qtd.qtd_buffer_hi[2] = 0;
|
||||
qh->qh_qtd.qtd_buffer_hi[3] = 0;
|
||||
qh->qh_qtd.qtd_buffer_hi[4] = 0;
|
||||
|
||||
usb_pc_cpu_flush(qh->page_cache);
|
||||
|
||||
if (xfer->xroot->udev->flags.self_suspended == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user