From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932432AbcERR5w (ORCPT ); Wed, 18 May 2016 13:57:52 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:37419 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932201AbcERR5u (ORCPT ); Wed, 18 May 2016 13:57:50 -0400 Subject: Re: [PATCH] usb: echi-hcd: Add register access check in shutdown To: Alan Stern References: Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, andy.gross@linaro.org, linux-arm-kernel@lists.infradead.org From: Srinivas Kandagatla Message-ID: <573CAD1A.4090805@linaro.org> Date: Wed, 18 May 2016 18:57:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/05/16 15:56, Alan Stern wrote: > This doesn't seem like the right place. What you really should do is > skip calling ehci_silence_controller() if the hardware isn't > accessible. That's where the hardware gets touched, not in > ehci_shutdown(). Just tried this suggestion, this would not work as well, Its not just the hardware registers, which are of concern here, but also the rest of the things like ehci->hrtimer pointer which are allocated or initialized as part of ehci_setup(). Either the msm controller driver is not correct or we should have a way to stop calling ehci_shutdown() if there was no ehci_setup() done yet. Any suggestions? --srini