Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbbEZEDl (ORCPT ); Tue, 26 May 2015 00:03:41 -0400 Received: from mga11.intel.com ([192.55.52.93]:65150 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751005AbbEZEDh (ORCPT ); Tue, 26 May 2015 00:03:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,495,1427785200"; d="scan'208";a="498159877" Date: Tue, 26 May 2015 09:34:30 +0530 From: Vinod Koul To: Andy Shevchenko , Alan Stern Cc: "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, Greg Kroah-Hartman , Lee Jones , Andrew Morton , Mika Westerberg , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Heikki Krogerus , Jarkko Nikula Subject: Re: [PATCH v2 3/8] core: platform: wakeup the parent before trying any driver operations Message-ID: <20150526040430.GO3140@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150526035155.GN3140@localhost> <1432570172-86963-4-git-send-email-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1522 Lines: 39 On Mon, May 25, 2015 at 01:36:43PM -0400, Alan Stern wrote: > On Mon, 25 May 2015, Andy Shevchenko wrote: > > > From: Heikki Krogerus > > > > If the parent is still suspended when a driver probe, > > remove or shutdown is attempted, the result may be a > > failure. > > > > For example, if the parent is a PCI MFD device that has been > > suspended when we try to probe our device, any register > > reads will return 0xffffffff. > > > > To fix the problem, making sure the parent is always awake > > before using driver probe, remove or shutdown. > > > > Signed-off-by: Heikki Krogerus > > Signed-off-by: Andy Shevchenko > > --- > > drivers/base/platform.c | 21 ++++++++++++++++++++- > > Why make the changes here rather than in dd.c? Is there something > special about platform devices? Right, also isn't there an assumption in runtime pm that pm_runtime_get_sync() will wake up its parent. So why should platform core do special handling here, if parent is set properly when creating this device. Or should the device probe "assume" that it is suspended and then do pm_runtime_get_sync() which wakes its parent and ensures devices accesses are okay -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/