From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759484AbcIMRWr (ORCPT ); Tue, 13 Sep 2016 13:22:47 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60171 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbcIMRWp (ORCPT ); Tue, 13 Sep 2016 13:22:45 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 4176C61DF1 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org Subject: Re: [PATCH 1/2] PCI: save and restore device state during bus reset To: Bjorn Helgaas References: <1472770801-30671-1-git-send-email-okaya@codeaurora.org> <20160913164205.GD4138@localhost> Cc: linux-pci@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, alex.williamson@redhat.com, vikrams@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: Date: Tue, 13 Sep 2016 13:22:42 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160913164205.GD4138@localhost> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, On 9/13/2016 12:42 PM, Bjorn Helgaas wrote: > > This comment is no longer correct (you don't leave the devices in > power-on state). Sorry about that, I can fix the comment. > >> + */ >> +void pci_reset_bridge_secondary_bus(struct pci_dev *dev) >> +{ >> + pci_bus_save_and_disable(dev->bus); > > "dev" is a bridge, and dev->bus is the bus on the *primary* side of > the bridge, so I think this saves and disables the bridge itself. > Don't you want dev->subordinate here instead? Yes, I need the subordinate. > >> + pcibios_reset_secondary_bus(dev); >> + pci_bus_restore(dev->bus); >> +} >> +EXPORT_SYMBOL_GPL(pci_reset_bridge_secondary_bus); >> + -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.