aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-10-18 11:15:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 17:08:04 -0400
commit4a71f242e51767e75c7ecdba890debab2c0dceaf (patch)
tree6ed10a483804ebef36d42de0001d3e7cd2196aea
parent5d8f681f3d14880d5b509eb32a910ba90ef28c36 (diff)
USB: EHCI: fix sparse errors
This patch fixes several sparse errors in ehci-hcd introduced by commit 3d091a6f7039 (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: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/ehci-mem.c4
-rw-r--r--drivers/usb/host/ehci-sched.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-mem.c b/drivers/usb/host/ehci-mem.c
index 52a77734a225..c0fb6a8ae6a3 100644
--- a/drivers/usb/host/ehci-mem.c
+++ b/drivers/usb/host/ehci-mem.c
@@ -224,11 +224,11 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
224 hw->hw_next = EHCI_LIST_END(ehci); 224 hw->hw_next = EHCI_LIST_END(ehci);
225 hw->hw_qtd_next = EHCI_LIST_END(ehci); 225 hw->hw_qtd_next = EHCI_LIST_END(ehci);
226 hw->hw_alt_next = EHCI_LIST_END(ehci); 226 hw->hw_alt_next = EHCI_LIST_END(ehci);
227 hw->hw_token &= ~QTD_STS_ACTIVE;
228 ehci->dummy->hw = hw; 227 ehci->dummy->hw = hw;
229 228
230 for (i = 0; i < ehci->periodic_size; i++) 229 for (i = 0; i < ehci->periodic_size; i++)
231 ehci->periodic[i] = ehci->dummy->qh_dma; 230 ehci->periodic[i] = cpu_to_hc32(ehci,
231 ehci->dummy->qh_dma);
232 } else { 232 } else {
233 for (i = 0; i < ehci->periodic_size; i++) 233 for (i = 0; i < ehci->periodic_size; i++)
234 ehci->periodic[i] = EHCI_LIST_END(ehci); 234 ehci->periodic[i] = EHCI_LIST_END(ehci);
diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index fbeb82e552b8..e113fd73aeae 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -103,7 +103,7 @@ static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr)
103 *hw_p = *shadow_next_periodic(ehci, &here, 103 *hw_p = *shadow_next_periodic(ehci, &here,
104 Q_NEXT_TYPE(ehci, *hw_p)); 104 Q_NEXT_TYPE(ehci, *hw_p));
105 else 105 else
106 *hw_p = ehci->dummy->qh_dma; 106 *hw_p = cpu_to_hc32(ehci, ehci->dummy->qh_dma);
107} 107}
108 108
109/*-------------------------------------------------------------------------*/ 109/*-------------------------------------------------------------------------*/
@@ -2446,7 +2446,8 @@ restart:
2446 q.itd->hw_next != EHCI_LIST_END(ehci)) 2446 q.itd->hw_next != EHCI_LIST_END(ehci))
2447 *hw_p = q.itd->hw_next; 2447 *hw_p = q.itd->hw_next;
2448 else 2448 else
2449 *hw_p = ehci->dummy->qh_dma; 2449 *hw_p = cpu_to_hc32(ehci,
2450 ehci->dummy->qh_dma);
2450 type = Q_NEXT_TYPE(ehci, q.itd->hw_next); 2451 type = Q_NEXT_TYPE(ehci, q.itd->hw_next);
2451 wmb(); 2452 wmb();
2452 modified = itd_complete (ehci, q.itd); 2453 modified = itd_complete (ehci, q.itd);
@@ -2481,7 +2482,8 @@ restart:
2481 q.sitd->hw_next != EHCI_LIST_END(ehci)) 2482 q.sitd->hw_next != EHCI_LIST_END(ehci))
2482 *hw_p = q.sitd->hw_next; 2483 *hw_p = q.sitd->hw_next;
2483 else 2484 else
2484 *hw_p = ehci->dummy->qh_dma; 2485 *hw_p = cpu_to_hc32(ehci,
2486 ehci->dummy->qh_dma);
2485 type = Q_NEXT_TYPE(ehci, q.sitd->hw_next); 2487 type = Q_NEXT_TYPE(ehci, q.sitd->hw_next);
2486 wmb(); 2488 wmb();
2487 modified = sitd_complete (ehci, q.sitd); 2489 modified = sitd_complete (ehci, q.sitd);