From patchwork Wed Dec 2 14:15:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 335991 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1073102ilb; Wed, 2 Dec 2020 06:16:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl/CNZ25dUSwSVv/pugcQGDIjvIojbp4feIRxdBXjPCQ9ZRMdzvymTh1HHBlEMf6clhWZP X-Received: by 2002:a17:906:74e:: with SMTP id z14mr2490974ejb.362.1606918615597; Wed, 02 Dec 2020 06:16:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606918615; cv=none; d=google.com; s=arc-20160816; b=aD++lF9X9G4zVCYFkRusl5B+sbcdstSvmMAtZ2lVMJ6HY93+YIg2HeD3k3Hs0RePr/ LaTRCJVUwVv9WC8NZdgFWuxnskSzLF30yIIgaQ3RWD44AN8vxsIJJtMSi5iRSvtDRYkO gdbmo2/u4OJGPJBtJGzbpyfEFmLq4EbMBDydLkiMnRPHoMaze7gJygyJZO4far/+QeJG QDJW1wwYGGDrmz5PhngEtQre1q4TF327Zj2uo91MC315sFbpHLxdiSJwDvi91TXVxfl5 j7du7XiY1eFe1pD5FLNPDDl/HBMrMn1DC9s9gFtTBWK0wfOiB6OOJF7nPIqzJoNkUxuE s2yw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Z4tstK0yqPb2/7JG4Zvyh0/BHtCKh0NvGTuUjF86KO8=; b=NpbNXHKN4PNCB269s2Oydvf+6xjhK6zv5NMAD4krfjX7f+EmBe8Xi3xblDpq4WRwIv j8MK0heMPebScsb6/HGDmsBucuwRjhOW989tbjD9Xoi1GGEp56/LKXOrJSLBW3mmWJgd rOz542Q90lgUFJzehnRmmQ0oZQ+xEsu3jLJAPzAp5wxO6LY/UkzC10R6oM954qyGDTSi mobeReyV8GK37uxUY8Iv98ofQyrc4+HJa4blHIqbZB5WIqTuJI6SHPDyWN3fbzWG1LmD 1Ps7GGzszWajrsJYXjkYdObYCAxHrMjgSPpq+Wh5cGhxskvJuEtewlggO8QUcJ+Q4sLI MO4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hi0ZCu9a; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si38875edx.275.2020.12.02.06.16.55; Wed, 02 Dec 2020 06:16:55 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-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=@linaro.org header.s=google header.b=hi0ZCu9a; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730246AbgLBOPx (ORCPT + 8 others); Wed, 2 Dec 2020 09:15:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728065AbgLBOPw (ORCPT ); Wed, 2 Dec 2020 09:15:52 -0500 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA390C0617A7 for ; Wed, 2 Dec 2020 06:15:05 -0800 (PST) Received: by mail-il1-x144.google.com with SMTP id w8so1630196ilg.12 for ; Wed, 02 Dec 2020 06:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z4tstK0yqPb2/7JG4Zvyh0/BHtCKh0NvGTuUjF86KO8=; b=hi0ZCu9a/qhdCc/pSu+owQ9WlAOD9fALklksTCXzjDJta5mR5asDZqsMf4LYrp1xhk NQVP4eFXo7nt5IOjz5bMVcOMzrgzUKbME0kK4NoTr5itiCUCe3elSS4DjeP1p1pTfYDN sjYXyXVo9JEd49AegFuR50gvoZiYdClbcPKKnEQZaPuOfWwn80kDHS0P/aSbbO5N+Brl i7cfu/14F0wXK1W4oQj33c+ow+rXmmHJSqSgq1wiTYpw4rAa1lX8C7YFxZwCHtbULIV6 2rfvpLhd+okSPKxLXZgfe4qyn0iToCc/TuTZ0MtTdt+utL1M3HVkdr6aNBw/Yfc4Fu7M Bd+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Z4tstK0yqPb2/7JG4Zvyh0/BHtCKh0NvGTuUjF86KO8=; b=phIjQKxY4/Xf3iW8MuivQ5TPweUdqVR4Es+4IanOG1QowyLxdwbp7WbbsnqdwQe+lT nBm/CLZAx8ZG9PLsbgwSBzhYAoytszSEon+v/eNjozsryU2TiC7EwlsJ8zupFBu2dL2O 6+vgw5woZHNCqbEG7wn3e0AwnRqj/GRQhirpvjE3ITrgNZZHlUiGtocu1+YCbjFtF8XN ylZP6kPQ/Qkn7oK2VkteBX2o50rS/2ncGTbprw+LcQaKrLl/y7MqD6V7GpfrpKR67f+C //YvhBHj4MCWQMLboCI8HAfYWzoeOFjFPMcw5W1D6KzGgQ/aILzj0NNDe37nfpm/cHe9 xtLg== X-Gm-Message-State: AOAM532qszvIA0rGBVFq+MZ/tqKpBAHeP+xndhVtTl6ZIaMs0m1FtIIN c6aILUUvUbmcdN0RsYon9asJvw== X-Received: by 2002:a92:ab02:: with SMTP id v2mr2507769ilh.184.1606918504945; Wed, 02 Dec 2020 06:15:04 -0800 (PST) Received: from beast.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id e18sm1209151ilc.52.2020.12.02.06.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2020 06:15:04 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: jonathanh@nvidia.com, evgreen@chromium.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, subashab@codeaurora.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 net-next] net: ipa: fix build-time bug in ipa_hardware_config_qsb() Date: Wed, 2 Dec 2020 08:15:02 -0600 Message-Id: <20201202141502.21265-1-elder@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jon Hunter reported observing a build bug in the IPA driver: https://lore.kernel.org/netdev/5b5d9d40-94d5-5dad-b861-fd9bef8260e2@nvidia.com The problem is that the QMB0 max read value set for IPA v4.5 (16) is too large to fit in the 4-bit field. The actual value we want is 0, which requests that the hardware use the maximum it is capable of. Reported-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Alex Elder --- v2: Got confirmation that 0 is the desired value to use (with comment). drivers/net/ipa/ipa_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_main.c b/drivers/net/ipa/ipa_main.c index d0768452c15cf..84bb8ae927252 100644 --- a/drivers/net/ipa/ipa_main.c +++ b/drivers/net/ipa/ipa_main.c @@ -288,7 +288,7 @@ static void ipa_hardware_config_qsb(struct ipa *ipa) max1 = 0; /* PCIe not present */ break; case IPA_VERSION_4_5: - max0 = 16; + max0 = 0; /* No limit (hardware maximum) */ break; } val = u32_encode_bits(max0, GEN_QMB_0_MAX_READS_FMASK);