Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2655548pxa; Mon, 24 Aug 2020 22:31:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9jLqGO1DJCQ7X/TS6sdszdxuq0cMhdK+41ZbXbtFvrBUR4f3tGtCOi5lhqf2KbbXB6y22 X-Received: by 2002:a50:f386:: with SMTP id g6mr8895476edm.354.1598333471497; Mon, 24 Aug 2020 22:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598333471; cv=none; d=google.com; s=arc-20160816; b=CCa0HbPPCyVOPW/92++9TeTy1R8iyW8D3DEQxJ5wsKqjx96h/5cFxG17WKGJ/39Dqn ru11pLYaUvH1cws2uwp5UPhV8g3krhmy7CcfyVAvi/SkhGp5iFsniXrOCuRWaj1vutUd ImdNx9+l8Z7WpyUi17IsXCHy63m7rH76IB4UUfIwDraoI1i9QNDsxyP8n4KAHd+sGttC WtBZ24fJGfxff5nu7Vq2gk/GEIr58m/S5ogrJtMJV/s7p8lENQ4y9exSCl8aFT7rc+Eo +f2w1/X6EBxwZxMRLtyrK1IuMjP0ckhEbYmgJcpOr85re9oBsR6uTAUKy1HJMowzQ3Gx y6FQ== 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:to:from :dkim-signature; bh=vAp1kUCxDhAD2zQ47Xojt01AZLeTeC/elLrg17j7ZvI=; b=HOmmJW4/kP+IZ6cnlZDnj+18fbTqfTLSSA+rxVgeAe4iupr8a4c7minLB7t8FRsDAd qbNCW4W0/kq1qVUhf3ajvaOlTxXoWxaLVtoX1Eg2VLW9fGFkV+gCOiGLJzg3nflTV0Vv FLTYjzLwQAtyr2hmTi4HNleXnGUq4yYz0ncJJAVboOAZ6TbPJPgTbpKfDEAJmYtCM7gA Hx+/FhFizoPE54iWq+AVzp9lln0WCbMwtr2HDptZhTWT+DMLMCqEvf5E5Rr0Zfkda65m B1C/zF4TqJiGAj+8oypQ3+4uuX/Yd7QC/MUMYZjilo8Twvk/F+acYiibjY3KIdPer4bj qVyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="ZSy4/135"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i20si8098655edx.426.2020.08.24.22.30.47; Mon, 24 Aug 2020 22:31:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="ZSy4/135"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728687AbgHYF3Y (ORCPT + 99 others); Tue, 25 Aug 2020 01:29:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728630AbgHYF3R (ORCPT ); Tue, 25 Aug 2020 01:29:17 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4372C061797 for ; Mon, 24 Aug 2020 22:29:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=vAp1kUCxDhAD2zQ47Xojt01AZLeTeC/elLrg17j7ZvI=; b=ZSy4/1350ZFs/yzkagHOON0M3n cpC2LNsxHJogCqsUjIpss5Qz2oYCzCoBjHJ6/KIhKfQeH3iUV7M67vYDpPfVJMLz3LpA8PZrDiUsG 2N49Jtyu5ofb7Or3i8fAuq8xG2dluPXC5wkU7UqFhZv9Hb09QQWyujxVrSzWRhq00vp4=; Received: from p5b206497.dip0.t-ipconnect.de ([91.32.100.151] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.89) (envelope-from ) id 1kARWC-0006jr-L8 for linux-wireless@vger.kernel.org; Tue, 25 Aug 2020 07:29:12 +0200 From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 8/9] mt76: add memory barrier to DMA queue kick Date: Tue, 25 Aug 2020 07:29:08 +0200 Message-Id: <20200825052909.36955-8-nbd@nbd.name> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200825052909.36955-1-nbd@nbd.name> References: <20200825052909.36955-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Ensure that descriptor memory has been fully written before letting the hardware read it Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 7545b552db25..24ff21eedbd0 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -143,6 +143,7 @@ mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q) static void mt76_dma_kick_queue(struct mt76_dev *dev, struct mt76_queue *q) { + wmb(); writel(q->head, &q->regs->cpu_idx); } -- 2.28.0