Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp776765ybc; Sat, 16 Nov 2019 08:30:06 -0800 (PST) X-Google-Smtp-Source: APXvYqzV+UnF7DjkuPx151t5Mbiy7WRAXXrNPWxAlo0ZYZUmo8mJM+Z+fjyHkouv4D0eCwLhG7GV X-Received: by 2002:a17:906:f255:: with SMTP id gy21mr11198496ejb.204.1573921805906; Sat, 16 Nov 2019 08:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573921805; cv=none; d=google.com; s=arc-20160816; b=mpzCRqGoI5LmXcjNzMh0rsvPw9lanKs+IYgEAQ1q6bzFyuWGjujdKTV0TxBBcIoeGm nAV18/m0JCwgmAJNcYvfBo4IRTvFfRY/yBnq6Y5STWUSR7Syz0Q3n4anuYlJlM1zSUHD sy7ioF4y2OcIYAx7IV0pzqWlUHzgGWjTQH8WDgvSiNNcxdKpuJ3YbggWVjGOBNBjYUUn EbUzIQF3WFUD6Bd4EDv/xWMx9fG+2EMQXReRO1uWCjPsQaqnayXBOvGPCkWyg2PFmzVK JlltmtofIdZ/ay7BlRaxJVcnxdtkZ1UqbuwoeKxMSnN0pxtvRm0Ul2XQh/oDFrXrbCkF wFeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e40Eq1FOH63T2KvVlQCjD8v2fH5hbII1y3xHPd2J+dk=; b=Gje7PNmXi29r2Gs8NN1iCzVMzvVBCqyc2ukcP7FRkENxNU392zVcuCiIkDgRHMf8IP uhIC/yUsY/pi3qm8ueMYJeDnmtrvJ/RUAxUErovLDzjfVIftT7DjoOLz5C/ulAYyo4qZ jYJOUh06HlFsSa2+iKr6awXBUqeW4bx9Tt1nzyhJXUWBDmbzCb60ryUR01QSnAk23e9h MWjNE3EwpBMrEWcQE2KNJlJE1VR+6vW52rDcaVWvPZYWjc+N/LPL2QZkUrQtF/60BQc+ hyBHLFpLCU1XeYtmFmjmtdD74Nqe6wnzhUqmz31rhOZeW/wlqvoIvQXMV7B9+racsJBb mkaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eaUvNw3D; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f36si8896157ede.159.2019.11.16.08.29.41; Sat, 16 Nov 2019 08:30:05 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=eaUvNw3D; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732101AbfKPQ1Q (ORCPT + 99 others); Sat, 16 Nov 2019 11:27:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:44872 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727958AbfKPPlj (ORCPT ); Sat, 16 Nov 2019 10:41:39 -0500 Received: from sasha-vm.mshome.net (unknown [50.234.116.4]) (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 77BEC207DD; Sat, 16 Nov 2019 15:41:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573918898; bh=UO3XCC42t0obPxpUMFWs3bkB7qRjPJ5pyIs/hvKqYnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eaUvNw3DnqYaGrVa1BUAq+bmllDgryEb8i3ElSHsFgXYS64R8ehJ9kVwLUdBljVmR htc0M8d65fIa3buSHa4T5IrJUiozRw5dANK6Wsfsya7QTVdfvVWLHQ6l2dtFMvHSHs i+aEO0wA+NnDkuDrJGITHGXikaIRzcG585me9k0I= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Honghui Zhang , Lorenzo Pieralisi , Ryder Lee , Sasha Levin , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 026/237] PCI: mediatek: Fix class type for MT7622 to PCI_CLASS_BRIDGE_PCI Date: Sat, 16 Nov 2019 10:37:41 -0500 Message-Id: <20191116154113.7417-26-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191116154113.7417-1-sashal@kernel.org> References: <20191116154113.7417-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Honghui Zhang [ Upstream commit a7f172ab6a8e755e60311f27512034b0441ef421 ] commit 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") erroneously set the class type for MT7622 to PCI_CLASS_BRIDGE_HOST. The PCIe controller of MT7622 integrates a Root Port that has type 1 configuration space header and related bridge windows. The HW default value of this bridge's class type is invalid. Fix its class type and set it to PCI_CLASS_BRIDGE_PCI to match the hardware implementation. Fixes: 101c92dc80c8 ("PCI: mediatek: Set up vendor ID and class type for MT7622") Signed-off-by: Honghui Zhang [lorenzo.pieralisi@arm.com: reworked the commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee Signed-off-by: Sasha Levin --- drivers/pci/controller/pcie-mediatek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index c5ff6ca65eab2..abedf8ec11bba 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -432,7 +432,7 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port) val = PCI_VENDOR_ID_MEDIATEK; writew(val, port->base + PCIE_CONF_VEND_ID); - val = PCI_CLASS_BRIDGE_HOST; + val = PCI_CLASS_BRIDGE_PCI; writew(val, port->base + PCIE_CONF_CLASS_ID); } -- 2.20.1