Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3607989imm; Mon, 20 Aug 2018 01:23:09 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxo/MrO5kF9WWNG46VSEBy9TUE9CDlL9ChCr4W39ZjdAPC+ZCuwZbA10YcYKnzgzTAzBrDm X-Received: by 2002:a63:f657:: with SMTP id u23-v6mr42568049pgj.258.1534753389644; Mon, 20 Aug 2018 01:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534753389; cv=none; d=google.com; s=arc-20160816; b=cX/bGNPpoXGXsOWRXKrTVVrHJHVgMf3SZEe/qDLzAA1rwgUgxW9lpscCjhrZnUJuLP N3apsxstlfZelPdcaHLWHEb1Vpqal+33rKDIRx4SvGc/TJcB9XB73DJiJrt9S9K9Fh4H 98ncz/O1T0mQXao6vFOTBKkNe837iRtbGBhSFlcujwLqd2B9w8LZ7XhT+OQUqmBBGUtN Hztw8M5WtMR/69BIionxYi8xqIMNjta/yToXNtN94lY4+M9NpJEL0imOdxJjbRbACVMG V5EB7KbScsXLUmD2hOGSPfJ6dT5rsLNJz1PgRVnpDRORmGZMvCIFFzRJdaCuhVUnkc/I ZM8Q== 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=8PkTKlaFlPzcbHUSiZwtiCgVec8HKcVoUmXLbJ0v3vM=; b=mSwZnt2jnMeOLpppMJMHCV5wBCVySMyVpGrdrj1IefMPn5/qDL5SvzmYdGb4YSEyAz XBtbe1yBIdj2rRpBaY8bW4scOAciB/AWo+WrgGelnpeNxIqg735EaU52I9yuS6gX+YAf Hm+32fuyNu56ikSJmOWlArp/J5zMn5V6yz5i2yogKqR7wAO2jM6L1dxkB4AxwwQI2Tbk ChNV2OQyRprYHBt/ONR2Q7LO0tc5LH+Igh/cYkcyT6CNhTWZZ0YVIvXryQAzJqu2Mw5l FyEgFXqnYH4mFDtEn5hapHEc8E4CwycXOAIr5bR3hHv/JypOFjqLVBJOh0xS+UVdzzfI dFVg== 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 h7-v6si9049523plt.258.2018.08.20.01.22.54; Mon, 20 Aug 2018 01:23:09 -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 S1726403AbeHTLgb (ORCPT + 99 others); Mon, 20 Aug 2018 07:36:31 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:41507 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbeHTLgb (ORCPT ); Mon, 20 Aug 2018 07:36:31 -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 bmailout3.hostsharing.net (Postfix) with ESMTPS id B4065100DECB4; Mon, 20 Aug 2018 10:21:50 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 694A8240DD7; Mon, 20 Aug 2018 10:21:50 +0200 (CEST) Date: Mon, 20 Aug 2018 10:21:50 +0200 From: Lukas Wunner To: Sinan Kaya Cc: linux-pci@vger.kernel.org, Bjorn Helgaas , Andy Shevchenko , Mika Westerberg , open list Subject: Re: [PATCH v8 2/2] PCI: pciehp: Mask AER surprise link down error if hotplug is enabled Message-ID: <20180820082150.r4q47ppqqclaschd@wunner.de> References: <20180818065126.77912-1-okaya@kernel.org> <20180818065126.77912-2-okaya@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180818065126.77912-2-okaya@kernel.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 17, 2018 at 11:51:10PM -0700, Sinan Kaya wrote: > +static int pciehp_control_surprise_error(struct controller *ctrl, bool enable) The return value isn't checked, so this could return void. > @@ -280,6 +303,9 @@ static int pciehp_probe(struct pcie_device *dev) > > pciehp_check_presence(ctrl); > > + /* We want exclusive control of link down events in hotplug driver */ > + pciehp_control_surprise_error(ctrl, false); > + > return 0; Hm, if the platform firmware hasn't granted native hotplug control to OSPM, or if some other hotplug driver than pciehp is used, shouldn't surprise down be ignored by error recovery as well? If yes, the mask would have to be set in generic code somewhere in drivers/pci/probe.c I guess, based on the is_hotplug_bridge bit in struct pci_dev. (Interestingly, PCI_ERR_UNCOR_MASK is already changed in probe.c by program_hpp_type2(). That seems to be ACPI-specific code, which kind of begs the question why it's not in pci-acpi.c?) Thanks, Lukas