Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1224895imm; Tue, 3 Jul 2018 07:36:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcbgYRAMAk26zr+ppwq+KS1LWjS4KxKLQWMVkINNYJBknnmNyT604czMGT39UrGfRq4/CfX X-Received: by 2002:a62:b90f:: with SMTP id z15-v6mr30376978pfe.254.1530628604667; Tue, 03 Jul 2018 07:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530628604; cv=none; d=google.com; s=arc-20160816; b=hxH428yZvfl9Fzr3fwlDLQ/azUp3D4oAIY+7feHAnKLi+575229MwGdVylIgLFPqiT +uVKzf3wccOv3liOJdFtwFU44il70FfBPTISAVcBy4chLzOobmb61MsbWMNEQbFzeSEN IA96/7url3+V8PU8LigJK8U2QnamLOB9B2Pjv+Us/wW/HKvRdyyridgemhFD80hJgSrw l4++kVtn4nISFw1YFYiNkCXickUGcxIA5DuSjgMAFrIgIggieBIsGHK4TmIWt/ucTKQc wT8bGnHusmmQ2a8AeyXJth/BoU9LEQp6Wton51iqLsEkzw2mgwOukxv486i3YXpTgfMI 6tFg== 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=ebU8j4yEsl/hhe8hCGQU6sw9VBEr3rOV5GR15y1WNXs=; b=0WbpY35yY9t2SInRi51+aJ6NjNecidam0bathZ8VApwfLwGzi9sQ5iNjQcUcHZEmrU Yk3pL6wxkWK881jZ0um6bLrVDP2yS9+3smdNg2fBm1NfmPygba09brQAcIkOfz3n37IA VhS3V6RjlZxDEojrNebMyKWuxdaSk7bRBYMjhYOwTLDXQmDiDYEKlh9czCo7nZQa93Gc mtQ0Gabh1DtSLDZ6nfV9F6TyJooZpdAyjkkrv5lNdOyBo+DE4YPwIHQJPVJ4UAR/84Gc K/SBuRTJSxUz9cIZTznbLqtBBMP5qa0YJyYFBB9kArtuPLb1UM2MDpleyjMrz3C/8JWe 7YLw== 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 x12-v6si1087558pgp.496.2018.07.03.07.36.29; Tue, 03 Jul 2018 07:36:44 -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 S932553AbeGCOei (ORCPT + 99 others); Tue, 3 Jul 2018 10:34:38 -0400 Received: from bmailout2.hostsharing.net ([83.223.90.240]:35499 "EHLO bmailout2.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932133AbeGCOeg (ORCPT ); Tue, 3 Jul 2018 10:34:36 -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 bmailout2.hostsharing.net (Postfix) with ESMTPS id CA62528011BBF; Tue, 3 Jul 2018 16:34:34 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 6E1731BE87; Tue, 3 Jul 2018 16:34:34 +0200 (CEST) Date: Tue, 3 Jul 2018 16:34:34 +0200 From: Lukas Wunner To: Sinan Kaya Cc: linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bjorn Helgaas , Oza Pawandeep , Keith Busch , open list Subject: Re: [PATCH V5 3/3] PCI: Mask and unmask hotplug interrupts during reset Message-ID: <20180703143434.GA4086@wunner.de> References: <1530571967-19099-1-git-send-email-okaya@codeaurora.org> <1530571967-19099-4-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1530571967-19099-4-git-send-email-okaya@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 Mon, Jul 02, 2018 at 06:52:47PM -0400, Sinan Kaya wrote: > @@ -308,8 +310,17 @@ void pcie_do_fatal_recovery(struct pci_dev *dev, u32 service) > pci_dev_put(pdev); > } > > + hpsvc = pcie_port_find_service(udev, PCIE_PORT_SERVICE_HP); > + hpdev = pcie_port_find_device(udev, PCIE_PORT_SERVICE_HP); > + > + if (hpdev && hpsvc) > + hpsvc->mask_irq(to_pcie_device(hpdev)); > + > result = reset_link(udev, service); > > + if (hpdev && hpsvc) > + hpsvc->unmask_irq(to_pcie_device(hpdev)); > + We've already got the ->reset_slot callback in struct hotplug_slot_ops, I'm wondering if we really need additional ones for this use case. If you just do... if (!pci_probe_reset_slot(dev->slot)) pci_reset_slot(dev->slot) else { /* regular code path */ } would that not be equivalent? (It's worth noting though that pciehp is the only hotplug driver implementing the ->reset_slot callback. If hotplug is handled by a different driver or by the platform firmware, devices may still be removed and re-enumerated twice.) Thanks, Lukas