ohci: Add missing cache-flush for hcca area
Subsystems (2)
PATCH 1/1 ohci: Add missing cache-flush for hcca area
We need to cache-flush the hcca area after the initial memset, otherwise on the first hc_interrupt we might see an old $random value as done_head and try to interpret that as the address for a completed td (followed by chaos).
--- drivers/usb/host/ohci-hcd.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/ohci-hcd.c +1 -0
@@ -2205,6 +2205,7 @@ int ohci_register(struct udevice *dev, struct ohci_regs *regs)if (!ohci->hcca)return -ENOMEM ;memset (ohci->hcca,0 ,sizeof (struct ohci_hcca )); +flush_dcache_hcca (ohci->hcca);if (hc_reset (ohci) <0 )return -EIO ;
Signature · 1 line
2.5.0
PATCH 1/1 ohci: Add missing cache-flush for hcca area
Quoted 6 lines · Hans de Goede
We need to cache-flush the hcca area after the initial memset, otherwise on the first
hc_interruptwe might see an old $random value asdone_headand try to interpret that as the address for a completed td (followed by chaos).Signed-off-by Hans de Goede <[email protected]>
Dang, this came three hours after the release of 2015.10 ;-)
Oh well. Applied, thanks!
Quoted 9 lines
--- drivers/usb/host/ohci-hcd.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/host/ohci-hcd.c +0
-0
drivers/usb/host/ohci-hcd.c int ohci_register(struct udevice *dev, struct · line 2211
Quoted 7 lines
drivers/usb/host/ohci-hcd.c +1
-0@@ -2205,6 +2205,7 @@ int ohci_register(struct udevice *dev, struct ohci_regs *regs) if (!ohci->hcca)return -ENOMEM ;memset (ohci->hcca,0 ,sizeof (struct ohci_hcca )); +flush_dcache_hcca (ohci->hcca);if (hc_reset (ohci) <0 )return -EIO ;
Best regards,
Marek Vasut