From patchwork Mon Nov 16 23:37:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 324524 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp3727148ils; Mon, 16 Nov 2020 15:38:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzi071QQFr7QEoaMBccsqu5QwGA0BR0SDeLSTqOdmQ+5H2cf/McsKw9lXFQtR16NdE6BYO5 X-Received: by 2002:a17:906:81da:: with SMTP id e26mr16401695ejx.491.1605569922305; Mon, 16 Nov 2020 15:38:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605569922; cv=none; d=google.com; s=arc-20160816; b=WX4pOeLZ6FNNf21IMIq7/66xVpEFVvX6ByRVy8FCbeR4BIkwUmy7QIvPZiIZk0J0CO vuGN/awUdrseJ2tBIX4EZVbiA1F1tojvhPGAXMvwftmG5h8tPEZ+S1tuSrFmcqWHNM/r 3wZo8969v8V9BVa4uhUzPKW7P3UzRFVhRMZEa3xAu2M+AKpzTbHTsyddccrbTEZvSZ/9 V0zjRhN1qVGZpH1L+6TLWxPN4QCRXhN5WxY9F+7NSraFX/+NCqTh4oPfon1x4Ok68/3W Dd8HCvqkylHsgAcEPOKuN39Qzj2xUg0zI7viVECmAZqi09NexXGj7O0cgll9wdhf9rkC ZWcA== 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=ibvkktNZHObaQcpICoKzhru5nZ1s0dOfq/+z59Thq90=; b=pMEuSQ6Q1tQ+YAzIJ4UXwDSWEAMhBd2Qu8wVla5ZBtQ5IifgNJ6SpjuS175VTCFDQ4 CbiOb1h6s9BXqWeRJB3wS2+aS6VGmKAK9oHKnLV5dDYkDg+PflZssng0cQ742kKXv0Cl 4315ZJpXBhQaCwce0LEVPlOEKpqA/7FPB0XFP82k8zoIRNOohNL5TAP2zUn4nlaPtV3X ZCdo1ZQQWt2xUEVi6w47izSDlhWxt/D12NLxvsoyzhybuIRrcreAAULtOxiCyDRye2bG JZCUI/AUzY/dj4tTnCHGUeNPCg48r+otAZXgEOf5cT35FBt4rXmMNVNsw1N+1o82Ba4j eUlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PRYejMot; 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 ce25si14313542edb.301.2020.11.16.15.38.42; Mon, 16 Nov 2020 15:38:42 -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=PRYejMot; 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 S1730962AbgKPXiU (ORCPT + 8 others); Mon, 16 Nov 2020 18:38:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730922AbgKPXiT (ORCPT ); Mon, 16 Nov 2020 18:38:19 -0500 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A6D1C0613D2 for ; Mon, 16 Nov 2020 15:38:19 -0800 (PST) Received: by mail-io1-xd43.google.com with SMTP id m9so19264346iox.10 for ; Mon, 16 Nov 2020 15:38:19 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ibvkktNZHObaQcpICoKzhru5nZ1s0dOfq/+z59Thq90=; b=PRYejMotlMrjs0eJGE1V3DsLE1A7XOXtVpntptTt4gC6Kn9g7/wRsrJ8L5hpcCq3iG 86ZepbczjQ+i8RxzWDEUfXeFAd/eAQvp354Q1cQrFK+dGRfb9yFGxR/URk0tOe3mKz7g XIyDMdgVbftJ7Gko/vpHNN7YWzuTBykfyNLXWXnd3T6oHa7NYldvNzTqWwldKy8dWs8t FKV4eqV+dZFazLpDrcZm6YbrnKg412FyH5SET9HLjBV6t93lTWEsll8cWfQKxhvxFNoM 8E7Swp63bm/M3TfAcTCs84I+VVcyGPhIZ6MWbG00DPGuR70XofOy+YCTSskEUO7Bz26U lF9w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ibvkktNZHObaQcpICoKzhru5nZ1s0dOfq/+z59Thq90=; b=YdbF8t5tXBhp7IY4w17vrgC9ga2xbAXSYTHxsZXqlUdbQ+/QFXKJhX4M8fEIblkQL+ Yz4Ev2BsjxQrXbyj/Xpu+k/YWWSFBxBSrUfYes1TGXYub3tOrsCOKXFnzJ3v3W6oIfZ2 piCtkieXJwxjo6+iQ7LjRaT+GrL1y1zWHt0bsj5pnPu0AFkY001ct1m1CkVAmrxt7Ufw EY6sSMmYhn6V1rleJu0j/rox/taEC2fYZlLnr1+8+bTYMAOnTQa/XwtKCRJKCeb1j19o Zsy/ZJZ0gygBwD+LZabfU5NRvhGXwNUu4sOl4y6xbxQ7lklF7sHzTFnHt9ddQgYR0RO2 3ZHg== X-Gm-Message-State: AOAM531zSOHjGGO9t+f+FC8Gu0hPMASYmyLehLOiYYzsCvl0+elJNmX9 O23TtdQByeTsb4r/wQKlA8nz/g== X-Received: by 2002:a05:6638:3f1:: with SMTP id s17mr1542024jaq.102.1605569898517; Mon, 16 Nov 2020 15:38:18 -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 f18sm10180099ill.22.2020.11.16.15.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Nov 2020 15:38:18 -0800 (PST) From: Alex Elder To: davem@davemloft.net, kuba@kernel.org Cc: evgreen@chromium.org, subashab@codeaurora.org, cpratapa@codeaurora.org, bjorn.andersson@linaro.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 03/11] net: ipa: support more versions for HOLB timer Date: Mon, 16 Nov 2020 17:37:57 -0600 Message-Id: <20201116233805.13775-4-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201116233805.13775-1-elder@linaro.org> References: <20201116233805.13775-1-elder@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org IPA version 3.5.1 represents the timer used in avoiding head-of-line blocking with a simple tick count. IPA v4.2 changes that, instead splitting the timer field into two parts (base and scale) to represent the ticks in the timer period. IPA v4.0 and IPA v4.1 use the same method as IPA v3.5.1. Change the test in ipa_reg_init_hol_block_timer_val() so the result is correct for those versions as well. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 548121b1531b7..3c9bbe2bf81c9 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -665,8 +665,8 @@ static u32 ipa_reg_init_hol_block_timer_val(struct ipa *ipa, u32 microseconds) /* ...but we still need to fit into a 32-bit register */ WARN_ON(ticks > U32_MAX); - /* IPA v3.5.1 just records the tick count */ - if (ipa->version == IPA_VERSION_3_5_1) + /* IPA v3.5.1 through v4.1 just record the tick count */ + if (ipa->version < IPA_VERSION_4_2) return (u32)ticks; /* For IPA v4.2, the tick count is represented by base and