Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2876772imm; Sun, 29 Jul 2018 05:33:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpep9m1BQqZAHRCH1Q1/pi4Eio1Yz+7L1Ko/5N81nQLuZRca8rIfg5Ul30EVrvK3kdnvxfoI X-Received: by 2002:a17:902:2006:: with SMTP id n6-v6mr12592011pla.325.1532867633809; Sun, 29 Jul 2018 05:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532867633; cv=none; d=google.com; s=arc-20160816; b=cLPh89+ARiw6VM9hZ+dLDUznxQNnB7KrSTHdrirlJwlVRYEk1zoR6vX9k8DDU92cAC J/6hsB4Buz8k0gKdjXV7dekx0aMHbBNwUMrJ/IX4B9FrJrVVenN9y+NxkMFqTKv6QYaA n8yYGkAOqyRSf6P/PFzpwwo+9qAV8RYwNSlPJgP/RHErlOJBWL53vpab6DYhGTS3lskX PpVjO5pvf7w3qftVPmvTLZjauSapg2tewPyYlMhxsqq9ikDVSvJaKWlTI6vRNCctBHso GvqeDSVaZki9EB0NGKslypCL68HeKRsHTw2ZxY3fuFTRDtgOd+7bGrOc2rONTP5LVXwv Pgdw== 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=9hnaRfeTe+Jaf50KR53wT7P7GaecJ2SOxwH7vDyTLvk=; b=wRaWEjUMTgr/p6qK3VnNHWpMoW/eLYWjjuwd/Wsnpz21XqOjmHdQH1lj/clXJ24MD9 xEcI6cD7u1dRA/v2ckp3aJ8K4QuyXJp8igdPooTQOuF739C7lmiFoAWulkGKm9RSHRcp f7I83HZVtGu6dXckNJvWC/sr1ZznoMJxY5ALps6og8nlW72qse8fGDQIgLrT7mffLOEO BaoO8+Xle3SD+FS386iYQMjJpX5IwdiMBwymsgsW1yKEUeO1zSChg9qbbABCKLsyviYi 3JhNQNn2jiIRJLfwy4w6KrytpLoGKn3EnU9PUw6iWexfa+pDPa2RDG66JHawMG4Zy5JT 1lwA== 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 w1-v6si8664200pgo.87.2018.07.29.05.33.39; Sun, 29 Jul 2018 05:33:53 -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 S1726545AbeG2ODM (ORCPT + 99 others); Sun, 29 Jul 2018 10:03:12 -0400 Received: from bmailout1.hostsharing.net ([83.223.95.100]:49215 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726361AbeG2ODM (ORCPT ); Sun, 29 Jul 2018 10:03:12 -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 0947830000621; Sun, 29 Jul 2018 14:32:52 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id D357EB6609; Sun, 29 Jul 2018 14:32:51 +0200 (CEST) Date: Sun, 29 Jul 2018 14:32:51 +0200 From: Lukas Wunner To: poza@codeaurora.org Cc: okaya@codeaurora.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Helgaas , Keith Busch , open list Subject: Re: [PATCH V5 3/3] PCI: Mask and unmask hotplug interrupts during reset Message-ID: <20180729123251.GB4364@wunner.de> References: <1530571967-19099-1-git-send-email-okaya@codeaurora.org> <1530571967-19099-4-git-send-email-okaya@codeaurora.org> <20180703083447.GA2689@wunner.de> <8b6ce0f415858463d1c0588c29e30415@codeaurora.org> <9e871cc3978fbdca12ccf8a91f34ad07@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e871cc3978fbdca12ccf8a91f34ad07@codeaurora.org> 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 06:41:33PM +0530, poza@codeaurora.org wrote: > pciehp_unconfigure_device doing little more than enumeration to quiescence > the bus. > > /* > * Ensure that no new Requests will be generated from > * the device. > */ > if (presence) { > pci_read_config_word(dev, PCI_COMMAND, &command); > command &= ~(PCI_COMMAND_MASTER | PCI_COMMAND_SERR); > command |= PCI_COMMAND_INTX_DISABLE; > pci_write_config_word(dev, PCI_COMMAND, command); > } That piece of code is supposed to be executed on safe removal via sysfs or an Attention Button press: The card remains in the slot, even though the slot is brought down. So the card is quiesced. However IIUC, on fatal error the link goes down and for pciehp, that's essentially a surprise removal. In that case, the above code is not intended to be executed, rather the devices below the hotplug bridge are marked disconnected. See this patch I posted yesterday: https://www.spinics.net/lists/linux-pci/msg74763.html Thanks, Lukas