Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp516622imm; Wed, 20 Jun 2018 02:04:41 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIvoLn7WQeemabIlo1PZeQ7IiqtMZj4PYkOs2r255ul4OsHDexvfnZIuY9/5DTvOKmpUBff X-Received: by 2002:a17:902:6b84:: with SMTP id p4-v6mr22745494plk.272.1529485481946; Wed, 20 Jun 2018 02:04:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529485481; cv=none; d=google.com; s=arc-20160816; b=DuhHmRIUzFoSja5Q0UxOktwHDecGzoTNMcfRjgb7DQ1GkFN1bg+Oa0zyXSDT/v5Wi7 3i675lfTrGH6Du+rQ7b+NUFxID3YX7UsiwwtQjTQ13b9EPAwqJ/6Y5WYDn9MMGWuRrRJ t+4dlYwUK8pgHXNL5HPfFJv7eJsxemrooxN2EzxYRUudM8GRQYwACAJp0SJoElqmaIJG Mf/hdRDMYvpMhiDTUUGbUTlZpEKDjYSxvapxYzzxysFcaDmrHendb2/9OsP7WBI+0pZx saHNxAE8eemYVP9zJmPoo8EgXBl6KutiqbWNk7EQHiS/3C1o9PP5a98Vpot1dV/IvlYU Y4UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=SNJHnRz+0HEG7k/fi6l+xn/7UpTlN4xF0V9IUHD+2rSEtpyvjo882xbvk4on4ZQsaq qFUO+KRFT3DsDPKFq2pbDBo6bpxbooba+QROVJ2fvNCFrRdVPWoEKBo2aWpY4059i7II eY0wUY0DzP4ZbuNy5+AJv33Nks2qpdUIzjiCOsWJtB0vovOaY7mUNyFvsjOw+nrDU9bJ lVKo+By3R4EALGDAxzfI1Znh7IDI1S/6JUNqDHrlLgmXJ0xrJzhk+I8oK7k0boxzJ5dS Rc7Ziy1sFYr48pBmURtqcpggeD3yjGC0dR2FH+5lyTZyvv1zHtc/buuy6Z6RWJfom5cn xI8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAinP0cU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id b10-v6si1876858pls.501.2018.06.20.02.04.27; Wed, 20 Jun 2018 02:04:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAinP0cU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S932802AbeFTImg (ORCPT + 99 others); Wed, 20 Jun 2018 04:42:36 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:33665 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595AbeFTImd (ORCPT ); Wed, 20 Jun 2018 04:42:33 -0400 Received: by mail-lf0-f68.google.com with SMTP id y20-v6so3718378lfy.0 for ; Wed, 20 Jun 2018 01:42:32 -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; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=QAinP0cUkQ5zt0rvGHnPqm8C19pbEnTgsOdE7o40ZdxvOw2oQcLgAOSxwX6DLHAuuY QykZ2tKUcx1FH0YkKELwREaH3E4p62NCXRQCX84610BJLQSwnfqxHsrpK1pioz3YvOm7 oV89YuUoBTNtuVg0sY8Ow276CNIH9u0+NeMZY= 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; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=ABe9KPX+73Plgw5pCgmJgHor9VMoM+IHNhLSq/uKjHPaqD43w6sNKXZQG/nvkqAUc9 e0wTmHr3YYWt6V2pUmTk1RT2pQr/6W2dTbP8oj4Oj7BkJBC3lFD7y3VzGTGeJguAx38R 6U+2wtmJevZhklCs0iphoG8nlkJ/5QiGQSeorUjKTxZM2Ied6geHvT/27Wwjb8kOW0wG /9uhmRIxJNwKlIlqQ7r0OtT1lkCr9TKWM6nK0AshZmhKHGKbnqNcfU7+RRcCrT5Bc+gs b7OPWlVwyvlufkXpE3XZcOVODF4rwMqdBXbMRS8Fitmur/xOI0rGUuY4ZxtzIuISsz8/ QB9w== X-Gm-Message-State: APt69E1Pzo7a1xGHrMtIodaewP+FpUWuBl53x0XVaGUO6oFdEuDby5Xm Pbo7ToCFyYhNwf5J2dUTujnU2A== X-Received: by 2002:a2e:7a0f:: with SMTP id v15-v6mr14038227ljc.68.1529484151743; Wed, 20 Jun 2018 01:42:31 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id l25-v6sm301267ljj.30.2018.06.20.01.42.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 01:42:31 -0700 (PDT) From: Niklas Cassel To: Kalle Valo , "David S. Miller" Cc: alagusankar@silex-india.com, Niklas Cassel , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ath10k: sdio: use same endpoint id for all packets in a bundle Date: Wed, 20 Jun 2018 10:42:20 +0200 Message-Id: <20180620084222.3521-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620084222.3521-1-niklas.cassel@linaro.org> References: <20180620084222.3521-1-niklas.cassel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All packets in a bundle should use the same endpoint id as the first lookahead. This matches how things are done is ath6kl, however, this patch can theoretically handle several bundles in ath10k_sdio_mbox_rx_process_packets(). Without this patch we get lots of errors about invalid endpoint id: ath10k_sdio mmc2:0001:1: invalid endpoint in look-ahead: 224 ath10k_sdio mmc2:0001:1: failed to get pending recv messages: -12 ath10k_sdio mmc2:0001:1: failed to process pending SDIO interrupts: -12 Signed-off-by: Alagu Sankar Signed-off-by: Niklas Cassel --- drivers/net/wireless/ath/ath10k/sdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index d612ce8c9cff..d46523b0472c 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -434,12 +434,14 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, enum ath10k_htc_ep_id id; int ret, i, *n_lookahead_local; u32 *lookaheads_local; + int lookahead_idx = 0; for (i = 0; i < ar_sdio->n_rx_pkts; i++) { lookaheads_local = lookaheads; n_lookahead_local = n_lookahead; - id = ((struct ath10k_htc_hdr *)&lookaheads[i])->eid; + id = ((struct ath10k_htc_hdr *) + &lookaheads[lookahead_idx++])->eid; if (id >= ATH10K_HTC_EP_COUNT) { ath10k_warn(ar, "invalid endpoint in look-ahead: %d\n", @@ -462,6 +464,7 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, /* Only read lookahead's from RX trailers * for the last packet in a bundle. */ + lookahead_idx--; lookaheads_local = NULL; n_lookahead_local = NULL; } -- 2.17.1