Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4101757pxb; Mon, 21 Feb 2022 12:11:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxgBlU6CG0IMpPft2j7L/GV4p63OXFJrdWuqHuO1MLaIXou8v98wgvlLm9tihprZ8qyMp+I X-Received: by 2002:a05:6402:228d:b0:410:d437:293a with SMTP id cw13-20020a056402228d00b00410d437293amr22956703edb.245.1645474260336; Mon, 21 Feb 2022 12:11:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645474260; cv=none; d=google.com; s=arc-20160816; b=QzBxRyG5bZB020YS0M2mX6rI+GGemAK84wEbSbYx/5VEVt1erdNMzoV62YKtT5/kfM HSHROoCa0csEEhgo6Ri1cRLat/wLR3mopeK2B6QcH2iQiL18hGGQyEFZKlNhKzGT9Np4 0MhN/k+znMKrhJmaMwCDqSXCNFiKxbLkV/ufZaIxLadDc6fejUGa7AIYV4lTUT6fAbul r60StjIojE8udET/NaBu6Tncon8Ui/GVN4NfxNpwlzeVfGUOUsn119wvSRSAUQ1wRPOo 5BfwNkOnAIJL4omhsrLCuWqJYY8EbuSwJ6QP5I8je0dQxR2iWVLLEHU1k+QBGYHohFpz Ot8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=ls60FTDFviBTgoF3jElYaNw9JoNt5CSZDUxqFx8URwc=; b=BoIluFblC1A/MfFROzWRI/ymj8R6KpByr/da7XKmb483h35E/aYETy50RiCNsvNtis xED857hduoLDH5DBvw/iOVJAy4negcjKVbiBUNwbc1YQ1vMJ56v/zhms+ld+h8hTkW+H i/NZYC/a6yph2VgVGBwCAREEZtDD5xQbBiTaNnH+SyN8p1qWk5BOQdktFuqeBsvhzchd E4rQnub9L0RbKYpajBp3fqcruMPQdJDmXcOkNNJpNBcWriCIY3uJQy9CdlYPjoJE8OSO KnvZPfazvt/OZc7RKlOv+aPe1/XARUik8oOuK/a9OVB4eIEfgUbcZuAvGmzN52rRa2di Px+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JuNAu8Je; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x13si9042178ejv.337.2022.02.21.12.10.37; Mon, 21 Feb 2022 12:11:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JuNAu8Je; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355435AbiBUK62 (ORCPT + 72 others); Mon, 21 Feb 2022 05:58:28 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:55954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346958AbiBUK6B (ORCPT ); Mon, 21 Feb 2022 05:58:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FF853122C for ; Mon, 21 Feb 2022 02:27:56 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3AE3460FFA for ; Mon, 21 Feb 2022 10:27:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0AF5C340E9; Mon, 21 Feb 2022 10:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645439275; bh=QoDql9tYlW8GV7mtDaOUYo+Yma7AQ017sPcM/GxlMJc=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=JuNAu8JeTu7SVX6ztbfjj4TDCDbK7pXAQFqTtd+Ml2pdELEdzqlUDbRYrryf3O0HO CqDVDHEGIkGvQcsqSmtauodhGzYKSzJlSZ9oN1GQYyMb7d0J62ZSDqjie+aElnygJG Rt3hlzfeUx9NnHbHpCaH0Unm5ospKh5Tm+Ubr3VBY1RNbgNPmMb7EN5QGrkba5dJmP uiJBwNBZgLw+3leKM+xl1yfILrsb4y55Ntr3EQtTZWhRzspO3vzZUArJX15oNVmDOI 6ntiowre9fUDty1AF+EVEgIuYgBGOR6qRRf6EJxV7EzeDMZbAd9dNOKLD98hlgU2RA c2A6RSI5Z3HzQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCHv2] ath11k: Invalidate cached reo ring entry before accessing it From: Kalle Valo In-Reply-To: <1645000354-32558-1-git-send-email-quic_ramess@quicinc.com> References: <1645000354-32558-1-git-send-email-quic_ramess@quicinc.com> To: Rameshkumar Sundaram Cc: , , Rameshkumar Sundaram User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164543927154.26423.3128388488663976690.kvalo@kernel.org> Date: Mon, 21 Feb 2022 10:27:54 +0000 (UTC) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Rameshkumar Sundaram wrote: > REO2SW ring descriptor is currently allocated in cacheable memory. > While reaping reo ring entries on second trial after updating head > pointer, first entry is not invalidated before accessing it. > > This results in host reaping and using cached descriptor which is > already overwritten in memory by DMA device (HW). > Since the contents of descriptor(buffer id, peer info and other information > bits) are outdated host throws errors like below while parsing corresponding > MSDU's and drops them. > > [347712.048904] ath11k_pci 0004:01:00.0: msdu_done bit in attention is not set > [349173.355503] ath11k_pci 0004:01:00.0: frame rx with invalid buf_id 962 > > Move the try_again: label above ath11k_hal_srng_access_begin() > so that first entry will be invalidated and prefetched. > > Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1 > > Fixes: 6452f0a3d565 ("ath11k: allocate dst ring descriptors from cacheable memory") > Signed-off-by: Rameshkumar Sundaram > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. f2180ccb52b5 ath11k: Invalidate cached reo ring entry before accessing it -- https://patchwork.kernel.org/project/linux-wireless/patch/1645000354-32558-1-git-send-email-quic_ramess@quicinc.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches