Commit 4a71f242 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: EHCI: fix sparse errors

This patch fixes several sparse errors in ehci-hcd introduced by
commit 3d091a6f (USB: EHCI: AMD periodic frame list table quirk).
Although the problem fixed by that commit affects only little-endian
systems, the source code has to use types appropriate for big-endian
too.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d8f681f
...@@ -224,11 +224,11 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -224,11 +224,11 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
hw->hw_next = EHCI_LIST_END(ehci); hw->hw_next = EHCI_LIST_END(ehci);
hw->hw_qtd_next = EHCI_LIST_END(ehci); hw->hw_qtd_next = EHCI_LIST_END(ehci);
hw->hw_alt_next = EHCI_LIST_END(ehci); hw->hw_alt_next = EHCI_LIST_END(ehci);
hw->hw_token &= ~QTD_STS_ACTIVE;
ehci->dummy->hw = hw; ehci->dummy->hw = hw;
for (i = 0; i < ehci->periodic_size; i++) for (i = 0; i < ehci->periodic_size; i++)
ehci->periodic[i] = ehci->dummy->qh_dma; ehci->periodic[i] = cpu_to_hc32(ehci,
ehci->dummy->qh_dma);
} else { } else {
for (i = 0; i < ehci->periodic_size; i++) for (i = 0; i < ehci->periodic_size; i++)
ehci->periodic[i] = EHCI_LIST_END(ehci); ehci->periodic[i] = EHCI_LIST_END(ehci);
......
...@@ -103,7 +103,7 @@ static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr) ...@@ -103,7 +103,7 @@ static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
*hw_p = *shadow_next_periodic(ehci, &here, *hw_p = *shadow_next_periodic(ehci, &here,
Q_NEXT_TYPE(ehci, *hw_p)); Q_NEXT_TYPE(ehci, *hw_p));
else else
*hw_p = ehci->dummy->qh_dma; *hw_p = cpu_to_hc32(ehci, ehci->dummy->qh_dma);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -2446,7 +2446,8 @@ static void scan_isoc(struct ehci_hcd *ehci) ...@@ -2446,7 +2446,8 @@ static void scan_isoc(struct ehci_hcd *ehci)
q.itd->hw_next != EHCI_LIST_END(ehci)) q.itd->hw_next != EHCI_LIST_END(ehci))
*hw_p = q.itd->hw_next; *hw_p = q.itd->hw_next;
else else
*hw_p = ehci->dummy->qh_dma; *hw_p = cpu_to_hc32(ehci,
ehci->dummy->qh_dma);
type = Q_NEXT_TYPE(ehci, q.itd->hw_next); type = Q_NEXT_TYPE(ehci, q.itd->hw_next);
wmb(); wmb();
modified = itd_complete (ehci, q.itd); modified = itd_complete (ehci, q.itd);
...@@ -2481,7 +2482,8 @@ static void scan_isoc(struct ehci_hcd *ehci) ...@@ -2481,7 +2482,8 @@ static void scan_isoc(struct ehci_hcd *ehci)
q.sitd->hw_next != EHCI_LIST_END(ehci)) q.sitd->hw_next != EHCI_LIST_END(ehci))
*hw_p = q.sitd->hw_next; *hw_p = q.sitd->hw_next;
else else
*hw_p = ehci->dummy->qh_dma; *hw_p = cpu_to_hc32(ehci,
ehci->dummy->qh_dma);
type = Q_NEXT_TYPE(ehci, q.sitd->hw_next); type = Q_NEXT_TYPE(ehci, q.sitd->hw_next);
wmb(); wmb();
modified = sitd_complete (ehci, q.sitd); modified = sitd_complete (ehci, q.sitd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment