Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1473336pxy; Thu, 6 May 2021 08:39:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws/BVpyxXhxwjKXI1YjjQ+s7j49RCLjevjt6AvusqmEEEpugYdqmfAmg3x5Na6/XtlYoiC X-Received: by 2002:a05:6402:48f:: with SMTP id k15mr5932790edv.262.1620315564875; Thu, 06 May 2021 08:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620315564; cv=none; d=google.com; s=arc-20160816; b=DSzOijXPBMfBhAdVh0qaa6DuwESUHpiOpExzJqEWpnyiTPu3qBnLab3L5xvzwRH7w3 xlCqSwv54cHw/P1wrdm7PCmBmW8RE4ceghRiplZvTzbwr5pfhi+oLjjU6PcSjDseYaIj DF+BVe2VxA6if+vOigvsMhGDxB+8na/BsWMjB6I+ixwiX74yExPsJeQ1sJyQJ0Dt4HKj Ngfz+mov3eKL2eZiXBl5q+Ju+QWAdrnVIgMLeLNSGIBMzUFTMVXbpHBPkbr5bc0eHR6L UnKVLvbU2Y7rIUOSMrRHWTzaNwY8ttDNRbSBVmYilfTFbOmzLBI97R2BJNMclW14xA02 z3eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KQv4wWaGTMgReekL3lhCKOxcCkvUXbzNA+I0qZY8+Cw=; b=Y5DQtEP+ITelcbJs9nJ7GQ2rX/jK/3CdDTClnLhCguA83lI2QOmA3oEioPKbSw9tvq Ys0B/geHEUVStcMnMfh2noHjy/PvHnQlbqqcQ10nbXL4G1njcvrzWEgnDHp3rZ4vhHqw mvVpox8NAyqGDFnerR0QhaZArm18zQFTPBuFFjoNmNmqEGdDIlDGBE6xQGo95rE0iaIx s87yUq5t2wi3FWe7a0TSh4iK9RBeskBxYzSzbTdxOPGroPg8lTS3HBzbiMy4da74ZuQe m1sX6FK4M9rOAS+/Yv3FL6hNO/LrXUIcc9wJh+dnyANtFHOS1XsuhktUINnrCI1mbcna cH6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oFxyk95u; 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 r10si2836646ejy.100.2021.05.06.08.38.59; Thu, 06 May 2021 08:39:24 -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=k20201202 header.b=oFxyk95u; 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 S235812AbhEFPgE (ORCPT + 99 others); Thu, 6 May 2021 11:36:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:45970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235368AbhEFPdq (ORCPT ); Thu, 6 May 2021 11:33:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EA209613F5; Thu, 6 May 2021 15:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620315168; bh=u1gZ4iCJ8EZuBq5+caF8WVSL+jyHUTpCgbqmTBAr8V8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oFxyk95u1LyOsMCxTvvj4v2FldyAmFLbYC+G5ZQUrf/8Oy6C4dBjQRshqVOcaJpa1 klQB3MKtwfzwXlRdVNPPoaWwfgzwpSAw4G70CyI2iDJnlcoe2+6b6eka574kPB8pzV Xx72qrVdMlzTcxcPycxRnXnPTk2Fc5s4V/MbLbQ7qEDTORl+/KEMs26dWYrfoXnds2 o72XlXW3fgi4p5CgxtAMtsYDOYuadBgvTpKNk39zm+GbdPz/QhsilUYN7hLp9J6nDD CKd2cu5Ch49OZbOAbRfSSVDxFSW2ifiT77d9s1eVsc2jmqLm3337CyRns3bRN1MZgX 0V1+ETSGO/hVg== Received: by pali.im (Postfix) id 819311208; Thu, 6 May 2021 17:32:46 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Lorenzo Pieralisi , Thomas Petazzoni , Rob Herring , Bjorn Helgaas Cc: Russell King , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Remi Pommarel , Xogium , Tomasz Maciej Nowak , Marc Zyngier , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/42] PCI: aardvark: Fix PCIe Max Payload Size setting Date: Thu, 6 May 2021 17:31:20 +0200 Message-Id: <20210506153153.30454-10-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210506153153.30454-1-pali@kernel.org> References: <20210506153153.30454-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change PCIe Max Payload Size setting in PCIe Device Control register to 512 bytes to align with PCIe Link Initialization sequence as defined in Marvell Armada 3700 Functional Specification. According to the specification, maximal Max Payload Size supported by this device is 512 bytes. Without this kernel prints suspicious line: pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 16384, max 512) With this change it changes to: pci 0000:01:00.0: Upstream bridge's Max Payload Size set to 256 (was 512, max 512) Signed-off-by: Pali Rohár Reviewed-by: Marek Behún Cc: stable@vger.kernel.org --- drivers/pci/controller/pci-aardvark.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index edeacd95297e..873efd79fffb 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -351,8 +351,9 @@ static void advk_pcie_setup_hw(struct advk_pcie *pcie) reg = advk_readl(pcie, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL); reg &= ~PCI_EXP_DEVCTL_RELAX_EN; reg &= ~PCI_EXP_DEVCTL_NOSNOOP_EN; + reg &= ~PCI_EXP_DEVCTL_PAYLOAD; reg &= ~PCI_EXP_DEVCTL_READRQ; - reg |= PCI_EXP_DEVCTL_PAYLOAD; /* Set max payload size */ + reg |= PCI_EXP_DEVCTL_PAYLOAD_512B; reg |= PCI_EXP_DEVCTL_READRQ_512B; advk_writel(pcie, reg, PCIE_CORE_PCIEXP_CAP + PCI_EXP_DEVCTL); -- 2.20.1