From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3FF5C433F5 for ; Mon, 11 Oct 2021 17:55:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 710D260C4A for ; Mon, 11 Oct 2021 17:55:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 710D260C4A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cE5gVwA6WPL4T7h+/JJhDdEeQ70zjs0sRj/eBA5XUD4=; b=H22Qi45ImQbIjz n0T+S/uju2axcY9YiQZ8tGSogQVR8SBYH+IzLaivDxFexKtS7DPC2CE1//b1AocSjpOnXEHXAdFd3 ZP023Hb3stDzbq2Oci+08klEYG0suh0r7QZbTqixNWnGK0PCllCPAaczGGWYE6yVqj24Yj7Ca2kRT HvA8/UryOWHcm7QykfElb9hjp8s6KRYI+9lbaTLZUAHD4xngNiv1YVXkegutc1x+JkLdu9XOdMbYs eWvU2U2Swh+Q5D3dLzEEFugB6loeOqFGxX21nApXDbvKi6/rL4gIt38vOrwerKqRr0RKh72+RNnSJ fjzG+sdTJgzSCiIoD/Sg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZzUI-00AIZb-RX; Mon, 11 Oct 2021 17:53:23 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZzUF-00AIYF-F8 for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 17:53:20 +0000 Received: by mail-pg1-x52c.google.com with SMTP id m21so11502105pgu.13 for ; Mon, 11 Oct 2021 10:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yQY7aUvtndoZpeI7zcTbeBS93aZ1xaTka3k7e0Wv25o=; b=QkiTAm9P7MyDTYthlnv6Fsv4494VNNpFET/VlZ4X0ml22KRH/CVG2AJTy18X6ONylK XMJwrUynxHJ3xfJisz4ulwyAghlZSkkIAPRHkKUm6cX3r17oZGxtA9EoLNVdLLiW2DOo h9GjDZF6L18K6Wnm+4KhQw36dGXR5IoyGxhwzhC5OuOUksfTPu7pjrVVhW1zFCq/ATad 51Wa3+ERB6sVngwa+KZfU+1OUADRML6SJHUFztc7uiS0aS74Sn2Tjc1MlXnuCy81g5jh abqyOf9GU/13vReJoaixiXD4U9ckKbWYfJbOSQKP2EnddXipXtyhYYG9aoOI/y+ZT/Kc AuPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yQY7aUvtndoZpeI7zcTbeBS93aZ1xaTka3k7e0Wv25o=; b=IMmuiHuvsHllPvGCJWIPGzMGo4dFMT0IVbXLV+PYw3J5yhTHvHZ0VJrrYGZdQzjtOp S5I5yQlGGY0NBd2mW4WUU/KzgntLVgEbc5cT9TXccFcMeRuFpY+8WE4oJ28fJ/MGCiYj kGLx58B+aKKaxylqio4Jtv4UE2YyQpkwlwjBCBj3zZVnrjQQVwIi/Ez2rgmT3WfULe82 uwBiXlNC3BMk57535ZqB/kZrcmvYy+GqwTTZVgTX/vPI39iNzs2B/dkkP1rMZ/Sv+j39 VFCuH52pIn90w2hWBhdHzT9PRnuWGSWWOivAzrU4508p+b5+WIeRUJDcCNvdXWdzybJg nmzQ== X-Gm-Message-State: AOAM532/uo3K6Hdl/d2YKxhBhIT10dGWP1PJ259JNdYFF2E7iDo1WmAK 82UPJnpPDi/SPC6aXzeyhOY= X-Google-Smtp-Source: ABdhPJwLy/3c/gEUvOtMpB3SxbWuiPUUEKkZasnDVajspjgXahcgNTfVCtvZiErGXhfpVvww6Q7tkA== X-Received: by 2002:a63:c4b:: with SMTP id 11mr19018518pgm.214.1633974797410; Mon, 11 Oct 2021 10:53:17 -0700 (PDT) Received: from localhost.localdomain ([2406:7400:63:9f95:848b:7cc8:d852:ad42]) by smtp.gmail.com with ESMTPSA id o4sm7876249pfb.48.2021.10.11.10.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Oct 2021 10:53:17 -0700 (PDT) From: Naveen Naidu To: bhelgaas@google.com Cc: Naveen Naidu , linux-kernel-mentees@lists.linuxfoundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Jingoo Han , Lorenzo Pieralisi , Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org (moderated list:PCI DRIVER FOR SAMSUNG EXYNOS), linux-samsung-soc@vger.kernel.org (open list:PCI DRIVER FOR SAMSUNG EXYNOS) Subject: [PATCH 06/22] PCI: exynos: Use SET_PCI_ERROR_RESPONSE() when device not found Date: Mon, 11 Oct 2021 23:22:48 +0530 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_105319_535011_0D6EA0F3 X-CRM114-Status: GOOD ( 14.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org An MMIO read from a PCI device that doesn't exist or doesn't respond causes a PCI error. There's no real data to return to satisfy the CPU read, so most hardware fabricates ~0 data. Use SET_PCI_ERROR_RESPONSE() to set the error response, when a faulty read occurs. This helps unify PCI error response checking and make error check consistent and easier to find. Compile tested only. Signed-off-by: Naveen Naidu --- drivers/pci/controller/dwc/pci-exynos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c index c24dab383654..1fdbef184532 100644 --- a/drivers/pci/controller/dwc/pci-exynos.c +++ b/drivers/pci/controller/dwc/pci-exynos.c @@ -217,7 +217,7 @@ static int exynos_pcie_rd_own_conf(struct pci_bus *bus, unsigned int devfn, struct dw_pcie *pci = to_dw_pcie_from_pp(bus->sysdata); if (PCI_SLOT(devfn)) { - *val = ~0; + SET_PCI_ERROR_RESPONSE(val); return PCIBIOS_DEVICE_NOT_FOUND; } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel