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 EB6EDC43217 for ; Thu, 24 Mar 2022 16:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351705AbiCXQkw (ORCPT ); Thu, 24 Mar 2022 12:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239263AbiCXQkv (ORCPT ); Thu, 24 Mar 2022 12:40:51 -0400 X-Greylist: delayed 603 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 24 Mar 2022 09:39:17 PDT Received: from ns.iliad.fr (ns.iliad.fr [212.27.33.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A088843AD9; Thu, 24 Mar 2022 09:39:17 -0700 (PDT) Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 7668D208CF; Thu, 24 Mar 2022 17:29:12 +0100 (CET) Received: from sakura (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 6FAA6208C9; Thu, 24 Mar 2022 17:29:12 +0100 (CET) Message-ID: <4be26f5d8725cdb016c6fdd9d05cfeb69cdd9e09.camel@freebox.fr> Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP From: Maxime Bizon Reply-To: mbizon@freebox.fr To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , Robin Murphy , Oleksandr Natalenko , Christoph Hellwig 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 Date: Thu, 24 Mar 2022 17:29:12 +0100 In-Reply-To: <878rsza0ih.fsf@toke.dk> References: <1812355.tdWV9SEqCh@natalenko.name> <20220324055732.GB12078@lst.de> <4386660.LvFx2qVVIh@natalenko.name> <81ffc753-72aa-6327-b87b-3f11915f2549@arm.com> <878rsza0ih.fsf@toke.dk> Organization: Freebox Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Mar 24 17:29:12 2022 +0100 (CET) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2022-03-24 at 15:27 +0100, Toke Høiland-Jørgensen wrote: > > I'm looking into this; but in the interest of a speedy resolution of > the regression I would be in favour of merging that partial revert > and reinstating it if/when we identify (and fix) any bugs in ath9k :) This looks fishy: ath9k/recv.c /* We will now give hardware our shiny new allocated skb */ new_buf_addr = dma_map_single(sc->dev, requeue_skb->data, common->rx_bufsize, dma_type); if (unlikely(dma_mapping_error(sc->dev, new_buf_addr))) { dev_kfree_skb_any(requeue_skb); goto requeue_drop_frag; } /* Unmap the frame */ dma_unmap_single(sc->dev, bf->bf_buf_addr, common->rx_bufsize, dma_type); bf->bf_mpdu = requeue_skb; bf->bf_buf_addr = new_buf_addr; -- Maxime 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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E1C2C433EF for ; Thu, 24 Mar 2022 16:40:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2E3EC41C26; Thu, 24 Mar 2022 16:40:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lQAvGF7IqYqk; Thu, 24 Mar 2022 16:40:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 10A6E41C30; Thu, 24 Mar 2022 16:40:08 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DD75DC0012; Thu, 24 Mar 2022 16:40:07 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1E0CBC000B for ; Thu, 24 Mar 2022 16:39:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EFEC460BB1 for ; Thu, 24 Mar 2022 16:39:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C0uMLqyHInQ8 for ; Thu, 24 Mar 2022 16:39:18 +0000 (UTC) X-Greylist: delayed 00:10:03 by SQLgrey-1.8.0 Received: from ns.iliad.fr (ns.iliad.fr [212.27.33.1]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6677260B0A for ; Thu, 24 Mar 2022 16:39:18 +0000 (UTC) Received: from ns.iliad.fr (localhost [127.0.0.1]) by ns.iliad.fr (Postfix) with ESMTP id 7668D208CF; Thu, 24 Mar 2022 17:29:12 +0100 (CET) Received: from sakura (freebox.vlq16.iliad.fr [213.36.7.13]) by ns.iliad.fr (Postfix) with ESMTP id 6FAA6208C9; Thu, 24 Mar 2022 17:29:12 +0100 (CET) Message-ID: <4be26f5d8725cdb016c6fdd9d05cfeb69cdd9e09.camel@freebox.fr> Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP From: Maxime Bizon To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , Robin Murphy , Oleksandr Natalenko , Christoph Hellwig Date: Thu, 24 Mar 2022 17:29:12 +0100 In-Reply-To: <878rsza0ih.fsf@toke.dk> References: <1812355.tdWV9SEqCh@natalenko.name> <20220324055732.GB12078@lst.de> <4386660.LvFx2qVVIh@natalenko.name> <81ffc753-72aa-6327-b87b-3f11915f2549@arm.com> <878rsza0ih.fsf@toke.dk> Organization: Freebox X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP ; ns.iliad.fr ; Thu Mar 24 17:29:12 2022 +0100 (CET) X-Mailman-Approved-At: Thu, 24 Mar 2022 16:40:06 +0000 Cc: Netdev , Kalle Valo , linux-wireless , Linux Kernel Mailing List , stable , Halil Pasic , iommu , Olha Cherevyk , Greg Kroah-Hartman , Jakub Kicinski , Paolo Abeni , Linus Torvalds , "David S. Miller" X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: mbizon@freebox.fr Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Ck9uIFRodSwgMjAyMi0wMy0yNCBhdCAxNToyNyArMDEwMCwgVG9rZSBIw7hpbGFuZC1Kw7hyZ2Vu c2VuIHdyb3RlOgoKPiAKPiBJJ20gbG9va2luZyBpbnRvIHRoaXM7IGJ1dCBpbiB0aGUgaW50ZXJl c3Qgb2YgYSBzcGVlZHkgcmVzb2x1dGlvbiBvZgo+IHRoZSByZWdyZXNzaW9uIEkgd291bGQgYmUg aW4gZmF2b3VyIG9mIG1lcmdpbmcgdGhhdCBwYXJ0aWFsIHJldmVydAo+IGFuZCByZWluc3RhdGlu ZyBpdCBpZi93aGVuIHdlIGlkZW50aWZ5IChhbmQgZml4KSBhbnkgYnVncyBpbiBhdGg5ayA6KQoK VGhpcyBsb29rcyBmaXNoeToKCmF0aDlrL3JlY3YuYwoKICAgICAgICAgICAgICAgIC8qIFdlIHdp bGwgbm93IGdpdmUgaGFyZHdhcmUgb3VyIHNoaW55IG5ldyBhbGxvY2F0ZWQgc2tiICovCiAgICAg ICAgICAgICAgICBuZXdfYnVmX2FkZHIgPSBkbWFfbWFwX3NpbmdsZShzYy0+ZGV2LCByZXF1ZXVl X3NrYi0+ZGF0YSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGNvbW1vbi0+cnhfYnVmc2l6ZSwgZG1hX3R5cGUpOwogICAgICAgICAgICAgICAgaWYgKHVubGlr ZWx5KGRtYV9tYXBwaW5nX2Vycm9yKHNjLT5kZXYsIG5ld19idWZfYWRkcikpKSB7CiAgICAgICAg ICAgICAgICAgICAgICAgIGRldl9rZnJlZV9za2JfYW55KHJlcXVldWVfc2tiKTsKICAgICAgICAg ICAgICAgICAgICAgICAgZ290byByZXF1ZXVlX2Ryb3BfZnJhZzsKICAgICAgICAgICAgICAgIH0K CiAgICAgICAgICAgICAgICAvKiBVbm1hcCB0aGUgZnJhbWUgKi8KICAgICAgICAgICAgICAgIGRt YV91bm1hcF9zaW5nbGUoc2MtPmRldiwgYmYtPmJmX2J1Zl9hZGRyLAogICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjb21tb24tPnJ4X2J1ZnNpemUsIGRtYV90eXBlKTsKCiAgICAgICAg ICAgICAgICBiZi0+YmZfbXBkdSA9IHJlcXVldWVfc2tiOwogICAgICAgICAgICAgICAgYmYtPmJm X2J1Zl9hZGRyID0gbmV3X2J1Zl9hZGRyOwoKLS0gCk1heGltZQoKCgpfX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwppb21tdSBtYWlsaW5nIGxpc3QKaW9tbXVA bGlzdHMubGludXgtZm91bmRhdGlvbi5vcmcKaHR0cHM6Ly9saXN0cy5saW51eGZvdW5kYXRpb24u b3JnL21haWxtYW4vbGlzdGluZm8vaW9tbXU=