Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4034512pxu; Mon, 12 Oct 2020 07:53:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysoguuObQejppCwW1/ERxXNEn99S+P5JZTJlUus3p4+q7a5tY1SKTwNTjbBFXdTEHVX2Se X-Received: by 2002:a17:906:a1d4:: with SMTP id bx20mr28200124ejb.262.1602514419809; Mon, 12 Oct 2020 07:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602514419; cv=none; d=google.com; s=arc-20160816; b=aJ8edKugsZvRRpC/rE0I02hRiZhmwgP1EvYX+P2P44BIeQAbDyka2lDXqlR+5G5k0F dm88f5eX3ZvNmSI6Tcww7JJntleZ66t8fMxvn7hYCwMgC0pbz2yVdg4FnZP/UWwjhUSN E4RmfbmOdZ39NdfFIpIzB//s3jWM/BdASBK5f8qsX7vJ54q92ixFvOCWFQ3PyTE6sbPA e3JWKTt8Ua02oeowiSHABk2QI/hh4R8KxvLdc22uD9EfqqR00hk5xG/KQTTr6tVJv9+C PI/0u963sFOqELyHsbubE3CMgeO4qo2k/m+jU68tpT3d0qiRB7kAf/BuDm/udYgw6OSl rIvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:autocrypt:from :references:cc:to:subject:dkim-signature; bh=0nSvwyrAmSap8GvfukHB/E9MQnhQOtMV+4EK3b/SBZQ=; b=R/OGn+yzM1IguLJQEJ4qRbC8RM/KzdDMpcoP7DMBYs+MSzMuKRmzxikN4Wztt4nCKk LXLsLus6owNgINPDmNExulZ58wDCXUYKVp7qeMtgBDT01W1EUzPgCgr+RlXy+OJoCIGu 1Yp6dChz807P2Z0pCLTZ/gYcnSaWJNhElPsumf/fQiXlJ7JZeVv44T45pcRr9Lg9cqaU +u4klWB7GGpuH51X8odFH6d2h4Y+9d4LPnz2voOhMzjY3VLxxJ7SE0bSpdN++kdOzcd3 4abMAAAwI4isJj5KKX1fOhxiVQRFKe+ffZSPuyhVEdMnRwffYjAHANw8603N0WIFqqYd awvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftQ9hEcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e15si12427049edr.306.2020.10.12.07.53.16; Mon, 12 Oct 2020 07:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ftQ9hEcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389669AbgJLOvU (ORCPT + 99 others); Mon, 12 Oct 2020 10:51:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:57350 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730003AbgJLOvU (ORCPT ); Mon, 12 Oct 2020 10:51:20 -0400 Received: from [192.168.0.112] (75-58-59-55.lightspeed.rlghnc.sbcglobal.net [75.58.59.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B2BE2080A; Mon, 12 Oct 2020 14:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602514279; bh=KjcJj3HhUJ7QjgoguyEHAlgwsxwB6hxZaDCQ/+0hunU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=ftQ9hEcYMpMcGI44trydysHHPWBqKPKVBnHIj7m2LvnfYWBkj6ieYZ8DlIUJuHKZC l31hJcJGp32qBVnwZfsWROfNSf0K2qj48as7jMv4XlHwDi45Rp0r58J0W0yUkbjjWf fzomFq53wYQUfTb8D9qJTLtUlYtX0DgJG0dVWlQo= Subject: Re: [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback To: sathyanarayanan.nkuppuswamy@gmail.com, bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ashok.raj@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com References: <5c5bca0bdb958e456176fe6ede10ba8f838fbafc.1602263264.git.sathyanarayanan.kuppuswamy@linux.intel.com> From: Sinan Kaya Autocrypt: addr=okaya@kernel.org; keydata= mQENBFrnOrUBCADGOL0kF21B6ogpOkuYvz6bUjO7NU99PKhXx1MfK/AzK+SFgxJF7dMluoF6 uT47bU7zb7HqACH6itTgSSiJeSoq86jYoq5s4JOyaj0/18Hf3/YBah7AOuwk6LtV3EftQIhw 9vXqCnBwP/nID6PQ685zl3vH68yzF6FVNwbDagxUz/gMiQh7scHvVCjiqkJ+qu/36JgtTYYw 8lGWRcto6gr0eTF8Wd8f81wspmUHGsFdN/xPsZPKMw6/on9oOj3AidcR3P9EdLY4qQyjvcNC V9cL9b5I/Ud9ghPwW4QkM7uhYqQDyh3SwgEFudc+/RsDuxjVlg9CFnGhS0nPXR89SaQZABEB AAG0HVNpbmFuIEtheWEgPG9rYXlhQGtlcm5lbC5vcmc+iQFOBBMBCAA4FiEEYdOlMSE+a7/c ckrQvGF4I+4LAFcFAlztcAoCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQvGF4I+4L AFfidAf/VKHInxep0Z96iYkIq42432HTZUrxNzG9IWk4HN7c3vTJKv2W+b9pgvBF1Smk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.org> Date: Mon, 12 Oct 2020 10:51:17 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <5c5bca0bdb958e456176fe6ede10ba8f838fbafc.1602263264.git.sathyanarayanan.kuppuswamy@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/12/2020 1:03 AM, sathyanarayanan.nkuppuswamy@gmail.com wrote: > From: Kuppuswamy Sathyanarayanan > > Currently if report_error_detected() or report_mmio_enabled() > functions requests PCI_ERS_RESULT_NEED_RESET, current > pcie_do_recovery() implementation does not do the requested > explicit device reset, but instead just calls the > report_slot_reset() on all affected devices. Notifying about the > reset via report_slot_reset() without doing the actual device > reset is incorrect. So call pci_bus_reset() before triggering > ->slot_reset() callback. > > Signed-off-by: Kuppuswamy Sathyanarayanan > --- > drivers/pci/pcie/err.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/pci/pcie/err.c b/drivers/pci/pcie/err.c > index c543f419d8f9..067c58728b88 100644 > --- a/drivers/pci/pcie/err.c > +++ b/drivers/pci/pcie/err.c > @@ -181,11 +181,7 @@ pci_ers_result_t pcie_do_recovery(struct pci_dev *dev, > } > > if (status == PCI_ERS_RESULT_NEED_RESET) { > - /* > - * TODO: Should call platform-specific > - * functions to reset slot before calling > - * drivers' slot_reset callbacks? > - */ > + pci_reset_bus(dev); > status = PCI_ERS_RESULT_RECOVERED; > pci_dbg(dev, "broadcast slot_reset message\n"); > pci_walk_bus(bus, report_slot_reset, &status); > Reviewed-by: Sinan Kaya