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@xxxxxxxxxxxxxxxxxxx> --- [as1726] drivers/usb/host/ehci-mem.c | 4 ++-- drivers/usb/host/ehci-sched.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) Index: usb-3.12/drivers/usb/host/ehci-mem.c =================================================================== --- usb-3.12.orig/drivers/usb/host/ehci-mem.c +++ usb-3.12/drivers/usb/host/ehci-mem.c @@ -224,11 +224,11 @@ static int ehci_mem_init (struct ehci_hc hw->hw_next = EHCI_LIST_END(ehci); hw->hw_qtd_next = EHCI_LIST_END(ehci); hw->hw_alt_next = EHCI_LIST_END(ehci); - hw->hw_token &= ~QTD_STS_ACTIVE; ehci->dummy->hw = hw; 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 { for (i = 0; i < ehci->periodic_size; i++) ehci->periodic[i] = EHCI_LIST_END(ehci); Index: usb-3.12/drivers/usb/host/ehci-sched.c =================================================================== --- usb-3.12.orig/drivers/usb/host/ehci-sched.c +++ usb-3.12/drivers/usb/host/ehci-sched.c @@ -103,7 +103,7 @@ static void periodic_unlink (struct ehci *hw_p = *shadow_next_periodic(ehci, &here, Q_NEXT_TYPE(ehci, *hw_p)); else - *hw_p = ehci->dummy->qh_dma; + *hw_p = cpu_to_hc32(ehci, ehci->dummy->qh_dma); } /*-------------------------------------------------------------------------*/ @@ -2446,7 +2446,8 @@ restart: q.itd->hw_next != EHCI_LIST_END(ehci)) *hw_p = q.itd->hw_next; 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); wmb(); modified = itd_complete (ehci, q.itd); @@ -2481,7 +2482,8 @@ restart: q.sitd->hw_next != EHCI_LIST_END(ehci)) *hw_p = q.sitd->hw_next; 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); wmb(); modified = sitd_complete (ehci, q.sitd); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html