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 A611AC4332F for ; Thu, 24 Mar 2022 16:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232908AbiCXQdU (ORCPT ); Thu, 24 Mar 2022 12:33:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351724AbiCXQdJ (ORCPT ); Thu, 24 Mar 2022 12:33:09 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26D0EAA017; Thu, 24 Mar 2022 09:31:36 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 364BB68B05; Thu, 24 Mar 2022 17:31:32 +0100 (CET) Date: Thu, 24 Mar 2022 17:31:32 +0100 From: Christoph Hellwig To: Maxime Bizon Cc: Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Robin Murphy , Oleksandr Natalenko , Christoph Hellwig , 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 Message-ID: <20220324163132.GB26098@lst.de> References: <1812355.tdWV9SEqCh@natalenko.name> <20220324055732.GB12078@lst.de> <4386660.LvFx2qVVIh@natalenko.name> <81ffc753-72aa-6327-b87b-3f11915f2549@arm.com> <878rsza0ih.fsf@toke.dk> <4be26f5d8725cdb016c6fdd9d05cfeb69cdd9e09.camel@freebox.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4be26f5d8725cdb016c6fdd9d05cfeb69cdd9e09.camel@freebox.fr> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, Mar 24, 2022 at 05:29:12PM +0100, Maxime Bizon 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; Creating a new mapping for the same buffer before unmapping the previous one does looks rather bogus. But it does not fit the pattern where revering the sync_single changes make the driver work again.