Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1459474pxb; Thu, 14 Apr 2022 06:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDLiEpTrg93qC8pZR1yfFzxTHxtI2j45qYIuBHK9LuZ7JSMVVtyQuujRNxcM4o/wLvyL1Z X-Received: by 2002:a65:6955:0:b0:380:64fd:a2dd with SMTP id w21-20020a656955000000b0038064fda2ddmr2295252pgq.383.1649943942277; Thu, 14 Apr 2022 06:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649943942; cv=none; d=google.com; s=arc-20160816; b=Q8/v0KXFKh0xANtKsJ2GmfrTP6P1/yrzUsCpwhe+sYuf9Gy53FWh84lHziI63L+Fn8 O2UL1rXdumdSKnrireLfX7KdY5nY5AtD1kvf2zmI6lRZmCX15a/54PipOAzfxUNvHLgH M78QuTFDpIpqBvyI45aBGv+OTmAyWKhdXAVpXm1rBv7VHtuYtGeOf8U63CemznDrw5ll H4lDp5hDsR0RUH+SgsNIaL6lGJ2U+AhhW1vgrinGREP3PIe2mL+z2BvxVy2GYHxYLjVt fEi/LwDZsMHVOGRU9+vvlq1D0s6KP2Raz9j+uXzh1QanD1vZhFyjyF+zqaY3Ixm4gUyF wwig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:subject:cc:to:from:date:message-id:dkim-signature; bh=CSb8eXfi4X28YB6JnZMBoT5Zw178Jb3u+JBDfRQAguM=; b=OtergHwhAv0bQku6tNpkhAYYdsnaPp4jPW+rRbzSwFQ1MXzGfGXZDgLb30fNxzYp3Q JGhn3L3yHsP8x9zcf8Ojs1o1uYlp5h54dITI3VjaP220cVpkiwCr8KNEnUlB0Grrj7Uy JevvcYkkvrWzmAyRE68NDugkLSqwlDonWI0UJVB5ZMIY4FD7Ye6V99mbwo9jsCafum6D y4S3tbVZ1RHOt8FcXrdX4G9jL+KT954aiyBbNvW4VMrjRvcCkM5ShJFcXVHP+gXuuYPs Fd0c6XJEjS/hgk03jqcir1m+nxhbAfYL2smXyIWqCb/eV5OH4EuNX0OcFujWgznNlcd4 X15w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JUiSoH3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pl9-20020a17090b268900b001c60d6b8faesi1654215pjb.78.2022.04.14.06.45.27; Thu, 14 Apr 2022 06:45:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JUiSoH3S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235748AbiDMN3E (ORCPT + 99 others); Wed, 13 Apr 2022 09:29:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232618AbiDMN3D (ORCPT ); Wed, 13 Apr 2022 09:29:03 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8443C5D198; Wed, 13 Apr 2022 06:26:41 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id k23so3965001ejd.3; Wed, 13 Apr 2022 06:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:from:to:cc:subject:references:mime-version :content-disposition:in-reply-to; bh=CSb8eXfi4X28YB6JnZMBoT5Zw178Jb3u+JBDfRQAguM=; b=JUiSoH3Sh7ufvAtp/1YhMcSgW+hKbCmq8VOb/r+qBA5GY4IE3vpkQpSisdMgsA6pis +R+mCjhrwG1l7GaUdhQusG3EhPM9Jy0obDLxSs6USKzUq+z/b1Z6uuz9q+tE39igYHuy UJSVY1kVhGXESKjve3OpGaeG0lJHVVAwflPCTOzY4/cuQbWBuFrllJ5ug5jgYmF8TBbk rSDwkMGpIF008ynIi+tm9eIJ02+cZKMiI8ax/iMbMfu2VFpStk/rKA7LYax5i4g+zKIF syuDuqnpozsWDuV9mM6nDGXL5Bx7pEfzSrV+/FBx7NvLpnAa+oXH8hqCHv+5B+TSxKhT IkAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:from:to:cc:subject:references :mime-version:content-disposition:in-reply-to; bh=CSb8eXfi4X28YB6JnZMBoT5Zw178Jb3u+JBDfRQAguM=; b=yX4vepMriUNSj0laq9OeMyCnrKz82dKcEEMlMCcdJNQn/vTxHcU6Q1NNzMwZBIpxWh g+a71/MeAi0k4OEEDhrwUC8Q0eq/j2lvVGN4dqk93JPVlL3uCTcax09RYIyQg9pWxJWz KOr9Toox1Nx0lIkJpIBtoU6QI5keEtUZwCDs0YpL6wACAAqOEwnCSLoMY28v+hsOOe4C T3kzvs0PdXqgnB1Gbl3/PTvihdYs2x6K+UExjiQGz5XdNJPAqxfZoiIhBF5maj3aHnf3 XQyuIH0zJgNTUzWypSnWeCLGXqxdeviO59fIhZNDn127SFEDIaLr2hnGF0cdCoFPH37S DdQw== X-Gm-Message-State: AOAM530FI92FeeGLO6GcTTqbmhig7xbkY948qCXFphVBQ7YAhTWXuFkL 7WfMq2cPZAcFS6amMwoaVao= X-Received: by 2002:a17:907:868c:b0:6e8:d608:bcc7 with SMTP id qa12-20020a170907868c00b006e8d608bcc7mr777827ejc.148.1649856399891; Wed, 13 Apr 2022 06:26:39 -0700 (PDT) Received: from Ansuel-xps. (host-80-182-176-248.retail.telecomitalia.it. [80.182.176.248]) by smtp.gmail.com with ESMTPSA id s12-20020a1709062ecc00b006e8558c9a5csm6027235eji.94.2022.04.13.06.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 06:26:38 -0700 (PDT) Message-ID: <6256cf8e.1c69fb81.b313c.dd8b@mx.google.com> X-Google-Original-Message-ID: Date: Wed, 13 Apr 2022 15:21:34 +0200 From: Ansuel Smith To: Dmitry Baryshkov Cc: Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan McDowell Subject: Re: [PATCH v3 07/18] ARM: dts: qcom: reduce pci IO size to 64K for ipq8064 References: <20220309190152.7998-1-ansuelsmth@gmail.com> <20220309190152.7998-8-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 04:19:42PM +0300, Dmitry Baryshkov wrote: > On 09/03/2022 22:01, Ansuel Smith wrote: > > The current value for pci IO is problematic for ath10k wifi card > > commonly connected to ipq8064 SoC. > > The current value is probably a typo and is actually uncommon to find > > 1MB IO space even on a x86 arch. > > I checked other Qualcomm platforms (including downstream apq8084.dtsi). All > of them list 1MB region as IO space. > > Interesting enough I couldn't get PCI to work on my IFC6410 (apq8064). It > has an ethernet adapter AR8151 sitting on the PCIe bus. The driver probes, > transmits packets successfully, but receives only garbage. I'm not sure if > it is the hardware or a software problem. Same adapter works fine on db820c. > I didn't understand if device works correctly without this change. The alternative to this, is to change the io space globally for every arm target and it was pointed out that it was a strange change to do. 99% the 1mb region present on every qcom platform is a copy past error but still a region that big worked before some kernel version just because the kernel didn't check them. So it's both reduce IO in dtsi or extend IO_SPACE_LIMIT for every arm target. > > Also with recent changes to the pci > > driver, pci1 and pci2 now fails to function as any connected device > > fails any reg read/write. Reduce this to 64K as it should be more than > > enough and 3 * 64K of total IO space doesn't exceed the IO_SPACE_LIMIT > > hardcoded for the ARM arch. > > > > Signed-off-by: Ansuel Smith > > Tested-by: Jonathan McDowell > > --- > > arch/arm/boot/dts/qcom-ipq8064.dtsi | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/arch/arm/boot/dts/qcom-ipq8064.dtsi b/arch/arm/boot/dts/qcom-ipq8064.dtsi > > index e247bf51df01..36bdfc8db3f0 100644 > > --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi > > +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi > > @@ -918,7 +918,7 @@ pcie0: pci@1b500000 { > > #address-cells = <3>; > > #size-cells = <2>; > > - ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00100000 /* downstream I/O */ > > + ranges = <0x81000000 0 0x0fe00000 0x0fe00000 0 0x00010000 /* downstream I/O */ > > 0x82000000 0 0x08000000 0x08000000 0 0x07e00000>; /* non-prefetchable memory */ > > interrupts = ; > > @@ -969,7 +969,7 @@ pcie1: pci@1b700000 { > > #address-cells = <3>; > > #size-cells = <2>; > > - ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00100000 /* downstream I/O */ > > + ranges = <0x81000000 0 0x31e00000 0x31e00000 0 0x00010000 /* downstream I/O */ > > 0x82000000 0 0x2e000000 0x2e000000 0 0x03e00000>; /* non-prefetchable memory */ > > interrupts = ; > > @@ -1020,7 +1020,7 @@ pcie2: pci@1b900000 { > > #address-cells = <3>; > > #size-cells = <2>; > > - ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00100000 /* downstream I/O */ > > + ranges = <0x81000000 0 0x35e00000 0x35e00000 0 0x00010000 /* downstream I/O */ > > 0x82000000 0 0x32000000 0x32000000 0 0x03e00000>; /* non-prefetchable memory */ > > interrupts = ; > > > -- > With best wishes > Dmitry -- Ansuel