Re: [PATCH] usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses

From: Alan Stern
Date: Wed Jun 09 2021 - 19:07:40 EST


On Wed, Jun 09, 2021 at 03:10:27PM +0300, Claudiu Beznea wrote:
> On SAMA7G5 suspending ports will cut the access to OHCI registers and
> any subsequent access to them will lead to CPU being blocked trying to
> access that memory. Same thing happens on resume: if OHCI memory is
> accessed before resuming ports the CPU will block on that access. The
> OCHI memory is accessed on suspend/resume though
> ohci_suspend()/ohci_resume().

That sounds very strange. Suppose one of the ports is suspended, so access to the
OHCI registers is blocked. Then how can you resume the port? Don't you have to
access the OHCI registers in order to tell the controller to do the port resume?

What happens when there's more than one port, and one of them is suspended while
the other one is still running? How can you communicate with the active port if
access to the OHCI registers is blocked?

Alan Stern