From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F6CFC433F5 for ; Fri, 25 Mar 2022 07:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347249AbiCYHOR (ORCPT ); Fri, 25 Mar 2022 03:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238896AbiCYHOQ (ORCPT ); Fri, 25 Mar 2022 03:14:16 -0400 X-Greylist: delayed 74847 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 25 Mar 2022 00:12:42 PDT Received: from vulcan.natalenko.name (vulcan.natalenko.name [104.207.131.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381D9BD898; Fri, 25 Mar 2022 00:12:42 -0700 (PDT) Received: from spock.localnet (unknown [83.148.33.151]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by vulcan.natalenko.name (Postfix) with ESMTPSA id 0402BE4C661; Fri, 25 Mar 2022 08:12:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=natalenko.name; s=dkim-20170712; t=1648192359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gcXLBP3mIfbGljUpsP//FsQOHOTfI0szjq2ialy/sIU=; b=nTgcEEtgRJjs1kBrwhIgdlq/eHBdXP950twIufQRtgGI9t1yPmzXlHuARe5Mm4Ku1Wl+gj J1qtm2C0WtQDcQ1vPPoPlPSxgR6hQ7w2kxF8mGOtYKwbxIJ1skLC/zf5LPO3fyjV3xW742 nilK7AS68nMA3cP9Tzef//M9aMfeDRo= From: Oleksandr Natalenko To: Robin Murphy , Christoph Hellwig , Maxime Bizon , Toke =?ISO-8859-1?Q?H=F8iland=2DJ=F8rgensen?= Cc: Linus Torvalds , Halil Pasic , Marek Szyprowski , Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Olha Cherevyk , iommu , linux-wireless , Netdev , Linux Kernel Mailing List , Greg Kroah-Hartman , stable Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP Date: Fri, 25 Mar 2022 08:12:37 +0100 Message-ID: <4699073.GXAFRqVoOG@natalenko.name> In-Reply-To: <871qyr9t4e.fsf@toke.dk> References: <1812355.tdWV9SEqCh@natalenko.name> <871qyr9t4e.fsf@toke.dk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hello. On =C4=8Dtvrtek 24. b=C5=99ezna 2022 18:07:29 CET Toke H=C3=B8iland-J=C3=B8= rgensen wrote: > Right, but is that sync_for_device call really needed? AFAICT, that > ath9k_hw_process_rxdesc_edma() invocation doesn't actually modify any of > the data when it returns EINPROGRESS, so could we just skip it? Like > the patch below? Or am I misunderstanding the semantics here? >=20 > -Toke >=20 >=20 > diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless= /ath/ath9k/recv.c > index 0c0624a3b40d..19244d4c0ada 100644 > --- a/drivers/net/wireless/ath/ath9k/recv.c > +++ b/drivers/net/wireless/ath/ath9k/recv.c > @@ -647,12 +647,8 @@ static bool ath_edma_get_buffers(struct ath_softc *s= c, > common->rx_bufsize, DMA_FROM_DEVICE); > =20 > ret =3D ath9k_hw_process_rxdesc_edma(ah, rs, skb->data); > - if (ret =3D=3D -EINPROGRESS) { > - /*let device gain the buffer again*/ > - dma_sync_single_for_device(sc->dev, bf->bf_buf_addr, > - common->rx_bufsize, DMA_FROM_DEVICE); > + if (ret =3D=3D -EINPROGRESS) > return false; > - } > =20 > __skb_unlink(skb, &rx_edma->rx_fifo); > if (ret =3D=3D -EINVAL) { With this patch and both ddbd89deb7d3+aa6f8dcbab47 in place the AP works fo= r me. Thanks. =2D-=20 Oleksandr Natalenko (post-factum)