Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp48672pxj; Wed, 9 Jun 2021 16:09:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1+1P4mPdwMO1LO3IowR+JvoRNqL5tP7pgv6XwMHUUXEbIoEvghxG81xCxozkwjD6Xr9JI X-Received: by 2002:a17:907:9688:: with SMTP id hd8mr1868477ejc.314.1623280164938; Wed, 09 Jun 2021 16:09:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623280164; cv=none; d=google.com; s=arc-20160816; b=xopbNXn1JHnAOGLlWB579CaFlNsaK5NHVuWLVI6bQpv9as0wfFpzcmIQ3r3v2adPSz q1DWCWe+3HngQ+GLb2KrgIzKUsNoMQIW7pIfKApmTXitKbHpFMBAtv8oGEtMGa52Ap5C MMwRrBVnSs0iZTJzio8P6/A6Yi+4UrJKBv+fMVkUgFpInqwk6Sv3xwK/ssB8dvhDy7BU TXkekXeZ6DjZmz0SDJGitC0QpQWkxYylCIzo51RYOk/YxBlb5+VCUelA6276+bLa/YCC xHjfHmHoqatuBfa/4W6WTERAZfyUNwm5vVlRNO6l6fLw3Mqi25dFb8oerGGwnhrWZ773 emtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jkIXaPu0s4son8NwICU6mneFO3OxB35tKiJMgXd6ZnI=; b=tvvkj5cjtJwn9DkdCiI1ETMmWjXkGuUTNpEwo2WFS+Z3mDX8On6xFcfMIR2elQTlZM J+/7C6YDjBIR1U0DFkYaKcWFwGTDdNLYmLmpXooUIShSnmEjN3EBn0cwvWXT3N46WAcL hAMH/s8K6zAaj5faPuaMEN5vcJZUSp2l0XTeZ8EJTstylGhijHUv9Kl7c5RslUDg0aFN N9vf7JdtfvIZeOKWdLPXWGM0NP2q5jSjEDzQ+R/HaqtHegUEoiodFT811BZcIG7HgTCg 7dzBf8pDYlTcyGSElpuUxfKEPW1pFzJIfNLakauuHVePxRQf6crDkRrUiXmOw6B/iWwc 3iPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 30si900094ejg.621.2021.06.09.16.08.59; Wed, 09 Jun 2021 16:09:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbhFIXJb (ORCPT + 99 others); Wed, 9 Jun 2021 19:09:31 -0400 Received: from netrider.rowland.org ([192.131.102.5]:49757 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S229507AbhFIXJb (ORCPT ); Wed, 9 Jun 2021 19:09:31 -0400 Received: (qmail 1862035 invoked by uid 1000); 9 Jun 2021 19:07:35 -0400 Date: Wed, 9 Jun 2021 19:07:35 -0400 From: Alan Stern To: Claudiu Beznea Cc: gregkh@linuxfoundation.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, cristian.birsan@microchip.com, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: host: ohci-at91: suspend/resume ports after/before OHCI accesses Message-ID: <20210609230735.GA1861855@rowland.harvard.edu> References: <20210609121027.70951-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609121027.70951-1-claudiu.beznea@microchip.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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