From patchwork Wed Jun 10 19:53:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 187774 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp785918ilo; Wed, 10 Jun 2020 12:54:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+Y+MAuVvqySxQ7+vbuCIS56IGLnRJw1facpHQguCw/MLAlnIX6lL9+aFpENvl5/flRcO4 X-Received: by 2002:a17:906:6a92:: with SMTP id p18mr4890543ejr.233.1591818841031; Wed, 10 Jun 2020 12:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591818841; cv=none; d=google.com; s=arc-20160816; b=d8hwcTpd1e1LeC77IWHhAZNqM2nre19cYcN/HgeYp+6vIfraHFJCgD155lFuJP+WrX 33DqeV+nMhtpYsdSI68B8NlMhdzcvLegFSshJ0YeTyp0YRRYza73Okfb9XkxJtB6UCLS LQ4DagB35U3AhM4dwhuOQ3tuqNXPx3NjIGu91gHVJdXcvlpOVu+2714GIF7AqhzMr06b Yd+sHWLXGr7vd1F0xzuk6xxsnyAXACY8Jydh/87O0j1mlrs/6HM2nXyZu1oReUSRcE1P +8ynmcaj6pxjd71JXssCe0ziVqExx+efCIh9l468yXh36FQ2zfAyXmwASU6m7PtgmanP bCkQ== 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=TPu28iSnpxiaKV6OmQYQaLs7QlaJe31+At5Kd0wdaDI=; b=YxvjqYqfQp3KYeVro0WLntfXE0MUCfKVZUFcR4Qm77knZh612MG9xvgcvWUySQrEgS LNK7ZuZ08UGNTtEvQDw6hvt99KGxeoc8K8+Nk0Tb1MiSg9qKfDT79zmrNOwQQzaDUG9T FlBU3lsN5LJ5v/chmBhU9wAYEL6EleOrnwF0Sxah8oqJbWJSZjBhncoXU49D24KPdwgO 3UbGj2Cehfw1X2hSpRseF2u/qlrF3b2IfZkPDBxBkgslR5tv8fMYFJ4ncAVd6UQ4JsZU ts3CA0yEBFbTZlWkiibq/x+QNSh9E45XZnEthTGs0gtT1qQRVRyTSkH6pE1tAP8Rb2FY gSFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K3+ZwfOR; 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 gl17si636834ejb.336.2020.06.10.12.54.00; Wed, 10 Jun 2020 12:54:01 -0700 (PDT) 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=K3+ZwfOR; 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 S1730403AbgFJTx5 (ORCPT + 9 others); Wed, 10 Jun 2020 15:53:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730368AbgFJTxv (ORCPT ); Wed, 10 Jun 2020 15:53:51 -0400 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 639B1C03E96B for ; Wed, 10 Jun 2020 12:53:51 -0700 (PDT) Received: by mail-io1-xd42.google.com with SMTP id q8so3697906iow.7 for ; Wed, 10 Jun 2020 12:53:51 -0700 (PDT) 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=TPu28iSnpxiaKV6OmQYQaLs7QlaJe31+At5Kd0wdaDI=; b=K3+ZwfORmOVFRGG1urRqIcC4gUufLJJjuwLcZ7LSR+xCycfbHvEeB6GoJxqPsZwH1H 6p0Q+K4GKZtgn+82EMsnrOfYroJoKWl8b94TzFLGm5GmDGnOhg8t0mnC5U8TV+yjqG0l Humzwmlu/BVXvtE1GkdoJlmkoaEIvBgI8pMGOJDTfIxJuBgKd04lms6IXA87MUVhkVhH DP8axBJPM9c75q9HQ+PnrYDmI/+owBVOhw0OM7Bjr4QRTfGk966Qy1kSNxrm3Od/YldA piYET9anDy4k2M/bpN1Dl82TjtyAdxG7DwCEtWNiCYB10HYNa/s3ifQWJFpSUQk/mGe7 Qleg== 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=TPu28iSnpxiaKV6OmQYQaLs7QlaJe31+At5Kd0wdaDI=; b=gY1Y0co6DBTCEfXST0ME9PGNap6fTX3g9o2OU49HB1KHDzKpajqWhCApvd+vFAKfU5 s8b/dsDK6yUv/AVamRvD5uoCfYCWoJCbnaNMCWcvJpHqjuFxY6ymBdxdQP6JgFk5AgZI eO4e1Ey5n0sz3GC274irX3jv/qATWETd6VXF55yV/RioxDjpY2h7iHQsSMVpIi+/EoRI s4YEQzDabRkqWh2TO534gUg3A9xfL3bi3JroDghCtKhIIpv9xC0WBSyZWTCqb0agOrK6 Dxg5n3SMGQap30c12qYJSSIDvgwHdmj+54uEpNz7N4KpaMZ5No9R6ZyPcW2lbELTlLfj OBOQ== X-Gm-Message-State: AOAM5308BMzj5Jt9mBTQVyVaBo3+XErOcsMhgU0IUAj2JXlGydx/ipvX UTl+UzsP5L4oO0miFZKTMQlvRA== X-Received: by 2002:a6b:2cc5:: with SMTP id s188mr4956803ios.77.1591818830843; Wed, 10 Jun 2020 12:53:50 -0700 (PDT) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id r10sm408828ile.36.2020.06.10.12.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 12:53:50 -0700 (PDT) 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 3/5] net: ipa: program upper nibbles of sequencer type Date: Wed, 10 Jun 2020 14:53:30 -0500 Message-Id: <20200610195332.2612233-4-elder@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200610195332.2612233-1-elder@linaro.org> References: <20200610195332.2612233-1-elder@linaro.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The upper two nibbles of the sequencer type were not used for SDM845, and were assumed to be 0. But for SC7180 they are used, and so they must be programmed by ipa_endpoint_init_seq(). Fix this bug. IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP doesn't have a descriptive comment, so add one. Signed-off-by: Alex Elder --- drivers/net/ipa/ipa_endpoint.c | 6 ++++-- drivers/net/ipa/ipa_reg.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 6015fabb4df5..59313ced7036 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -699,10 +699,12 @@ static void ipa_endpoint_init_seq(struct ipa_endpoint *endpoint) u32 seq_type = endpoint->seq_type; u32 val = 0; + /* Sequencer type is made up of four nibbles */ val |= u32_encode_bits(seq_type & 0xf, HPS_SEQ_TYPE_FMASK); val |= u32_encode_bits((seq_type >> 4) & 0xf, DPS_SEQ_TYPE_FMASK); - /* HPS_REP_SEQ_TYPE is 0 */ - /* DPS_REP_SEQ_TYPE is 0 */ + /* The second two apply to replicated packets */ + val |= u32_encode_bits((seq_type >> 8) & 0xf, HPS_REP_SEQ_TYPE_FMASK); + val |= u32_encode_bits((seq_type >> 12) & 0xf, DPS_REP_SEQ_TYPE_FMASK); iowrite32(val, endpoint->ipa->reg_virt + offset); } diff --git a/drivers/net/ipa/ipa_reg.h b/drivers/net/ipa/ipa_reg.h index 3b8106aa277a..0a688d8c1d7c 100644 --- a/drivers/net/ipa/ipa_reg.h +++ b/drivers/net/ipa/ipa_reg.h @@ -455,6 +455,8 @@ enum ipa_mode { * second packet processing pass + no decipher + microcontroller * @IPA_SEQ_DMA_DEC: DMA + cipher/decipher * @IPA_SEQ_DMA_COMP_DECOMP: DMA + compression/decompression + * @IPA_SEQ_PKT_PROCESS_NO_DEC_NO_UCP_DMAP: + * packet processing + no decipher + no uCP + HPS REP DMA parser * @IPA_SEQ_INVALID: invalid sequencer type * * The values defined here are broken into 4-bit nibbles that are written