From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759587AbcIMXUS (ORCPT ); Tue, 13 Sep 2016 19:20:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53627 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754521AbcIMXUQ (ORCPT ); Tue, 13 Sep 2016 19:20:16 -0400 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org B948061669 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> <20160913215315.GJ4138@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: <46a47bf2-ab39-0ee2-0faf-2f4050f2a89d@codeaurora.org> Date: Tue, 13 Sep 2016 19:20:03 -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: <20160913215315.GJ4138@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 On 9/13/2016 5:53 PM, Bjorn Helgaas wrote: >> + pci_bus_restore(dev->bus); > This path eventually writes the Bridge Control register: > > pci_reset_bridge_secondary_bus > pcibios_reset_secondary_bus > pci_reset_secondary_bus > pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl) > > But I think it'd be easy to call this on a non-bridge device, and I > don't think there's anything in the path that checks whether this is > actually a bridge. I wonder if we should check that somewhere, or > maybe even change the interface so it takes a struct pci_bus instead > of a pci_dev. > I'll change it to pci_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.