USB: EHCI: AMD periodic frame list table quirk
On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write to memory space not allocated to USB controller if there is longer than normal latency on DMA read encountered. In this condition the exposure will be encountered only if the driver has following format of Periodic Frame List link pointer structure: For any idle periodic schedule, the Frame List link pointers that have the T-bit set to 1 intending to terminate the use of frame list link pointer as a physical memory pointer. Idle periodic schedule Frame List Link pointer shoule be in the following format to avoid the issue: Frame list link pointer should be always contains a valid pointer to a inactive QHead with T-bit set to 0. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
3d96587514
commit
3d091a6f70
@@ -98,7 +98,14 @@ static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
|
||||
*/
|
||||
*prev_p = *periodic_next_shadow(ehci, &here,
|
||||
Q_NEXT_TYPE(ehci, *hw_p));
|
||||
*hw_p = *shadow_next_periodic(ehci, &here, Q_NEXT_TYPE(ehci, *hw_p));
|
||||
|
||||
if (!ehci->use_dummy_qh ||
|
||||
*shadow_next_periodic(ehci, &here, Q_NEXT_TYPE(ehci, *hw_p))
|
||||
!= EHCI_LIST_END(ehci))
|
||||
*hw_p = *shadow_next_periodic(ehci, &here,
|
||||
Q_NEXT_TYPE(ehci, *hw_p));
|
||||
else
|
||||
*hw_p = ehci->dummy->qh_dma;
|
||||
}
|
||||
|
||||
/* how many of the uframe's 125 usecs are allocated? */
|
||||
@@ -2335,7 +2342,11 @@ restart:
|
||||
* pointer for much longer, if at all.
|
||||
*/
|
||||
*q_p = q.itd->itd_next;
|
||||
*hw_p = q.itd->hw_next;
|
||||
if (!ehci->use_dummy_qh ||
|
||||
q.itd->hw_next != EHCI_LIST_END(ehci))
|
||||
*hw_p = q.itd->hw_next;
|
||||
else
|
||||
*hw_p = ehci->dummy->qh_dma;
|
||||
type = Q_NEXT_TYPE(ehci, q.itd->hw_next);
|
||||
wmb();
|
||||
modified = itd_complete (ehci, q.itd);
|
||||
@@ -2368,7 +2379,11 @@ restart:
|
||||
* URB completion.
|
||||
*/
|
||||
*q_p = q.sitd->sitd_next;
|
||||
*hw_p = q.sitd->hw_next;
|
||||
if (!ehci->use_dummy_qh ||
|
||||
q.sitd->hw_next != EHCI_LIST_END(ehci))
|
||||
*hw_p = q.sitd->hw_next;
|
||||
else
|
||||
*hw_p = ehci->dummy->qh_dma;
|
||||
type = Q_NEXT_TYPE(ehci, q.sitd->hw_next);
|
||||
wmb();
|
||||
modified = sitd_complete (ehci, q.sitd);
|
||||
|
Reference in New Issue
Block a user