From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751210AbbCDUoQ (ORCPT ); Wed, 4 Mar 2015 15:44:16 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:49366 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751009AbbCDUoP (ORCPT ); Wed, 4 Mar 2015 15:44:15 -0500 Date: Wed, 04 Mar 2015 15:44:12 -0500 (EST) Message-Id: <20150304.154412.1886796464281085513.davem@davemloft.net> To: Alexey.Brodkin@synopsys.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vineet.Gupta1@synopsys.com, andriy.shevchenko@linux.intel.com, peppe.cavallaro@st.com, sonic.zhang@analog.com Subject: Re: [PATCH] stmmac: check IRQ availability early on probe From: David Miller In-Reply-To: <1425379604-24107-1-git-send-email-abrodkin@synopsys.com> References: <1425379604-24107-1-git-send-email-abrodkin@synopsys.com> X-Mailer: Mew version 6.6 on Emacs 24.4 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Wed, 04 Mar 2015 12:44:14 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexey Brodkin Date: Tue, 3 Mar 2015 13:46:44 +0300 > Currently we're getting IRQs after lots of resources are already > allocated: > * netdev > * clocks > * MDIO bus > Also HW gets initialized by the time when checking IRQs as well. > > Now there's a possibility for master interrupt controller to be not > probed yet. This will lead to exit from GMAC probe routine with "- > EPROBE_DEFER" and so deferred probe will hapen later on. > > But since we exited the first GMAC probe without release of all > allocated resources there could be conflicts on subsequent probes. > > For example this is what happens for me: ... > Essential fix is to check for IRQs availability as early as possible and > then safely go to deferred probe if IRQs are not there yet. > > Signed-off-by: Alexey Brodkin Applied, thanks.