Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp856087imm; Tue, 3 Jul 2018 00:53:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKkuMKv1sWV60UDwWPaT5v/v5E4dZW7W+fSWptAZQhvOKPIKqz1Hu7s5t45jqeSnyLD6QpH X-Received: by 2002:a17:902:7b94:: with SMTP id w20-v6mr29059596pll.280.1530604421443; Tue, 03 Jul 2018 00:53:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530604421; cv=none; d=google.com; s=arc-20160816; b=ZBx+0vOkfzIFmDmdB7pJC+iE0PloFyLMU0lqDGsZsCJ73CvJh3ymRDFebDDyW3N1L1 pWFnajLFjGNxRc3Faa3ZIpWy1yudD8os94ESmmvztnohWLnpaR4Z/6fjKK5lDI3KV19z nFP+1t1i1Vz7OlXc/4JXmOInPbI9RI4Yl7/A5w0C6N5Sp0fL5WRpGqJq+BQvqmSkYn0q TIqcYv2uIBW8Y+feLizMHwO1pwi/v2Mc2NBoO/utOqjE5lpeESOw51aoX+264c498ALw TNNZHpIawvEi8Vc2mC1DtbwLK0QQhUsvUQblFWL+sLow1fsa9IfP1wK3pW/VpuT8dUqR rqAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ccV2tYQ84xLAb2Uxbj7IKEjIYr7+Kxl23WMDYzcNBNw=; b=daYscMZg3a9E3uKYRGTuLXe3y5YRfk1ROiLjdiB2ftXwlPznBFk/uj2ye4+yosSbqd GIvF8rLZinPV1lrG9ywgvkIaF3dBh6kxx9/np2Lk7kncnZeiOwdgbK90m2Km2xaF7MDU tyCGpa91fSQukU5nkVzrN/AIBuC2Q4XT1ZnF01VtPsa+iMk8Y3vwJKiWCzUqx6pdTxVt IbwF8FI8u4BJAdHyFRS1/S73JogjcPeG9zU/zINPcQ08FbYb+zlPV04kI89jAYthrgUI lWGoCCqXslZYemNbr100VBtaTKixBkbZngIR7K6XdSoag35qUrQUWqrzFXBDGRQDyAJF joBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y191-v6si596316pfg.246.2018.07.03.00.53.26; Tue, 03 Jul 2018 00:53:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933629AbeGCHvL (ORCPT + 99 others); Tue, 3 Jul 2018 03:51:11 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:55081 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932142AbeGCHvJ (ORCPT ); Tue, 3 Jul 2018 03:51:09 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 5B58F30002236; Tue, 3 Jul 2018 09:51:07 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 122BC1BE8F; Tue, 3 Jul 2018 09:51:07 +0200 (CEST) Date: Tue, 3 Jul 2018 09:51:06 +0200 From: Lukas Wunner To: Pingfan Liu Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "Rafael J . Wysocki" , Grygorii Strashko , Christoph Hellwig , Bjorn Helgaas , Dave Young , linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCHv3 2/4] drivers/base: utilize device tree info to shutdown devices Message-ID: <20180703075106.GA21136@wunner.de> References: <1530600642-25090-1-git-send-email-kernelfans@gmail.com> <1530600642-25090-3-git-send-email-kernelfans@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530600642-25090-3-git-send-email-kernelfans@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 03, 2018 at 02:50:40PM +0800, Pingfan Liu wrote: > commit 52cdbdd49853 ("driver core: correct device's shutdown order") > places an assumption of supplier<-consumer order on the process of probe. > But it turns out to break down the parent <- child order in some scene. > E.g in pci, a bridge is enabled by pci core, and behind it, the devices > have been probed. Then comes the bridge's module, which enables extra > feature(such as hotplug) on this bridge. This will break the > parent<-children order and cause failure when "kexec -e" in some scenario. > > The detailed description of the scenario: > An IBM Power9 machine on which, two drivers portdrv_pci and shpchp(a mod) > match the PCI_CLASS_BRIDGE_PCI, but neither of them success to probe due > to some issue. For this case, the bridge is moved after its children in > devices_kset. Then, when "kexec -e", a ata-disk behind the bridge can not > write back buffer in flight due to the former shutdown of the bridge which > clears the BusMaster bit. If you revert commit cc27b735ad3a ("PCI/portdrv: Turn off PCIe services during shutdown"), does the issue go away?