Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1826453pxb; Fri, 25 Mar 2022 06:23:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZCQ/EgyOQJm0Jdc9Z5qnedUK6rgiMHf+a/WVSE5UiuwSY8zEifHG4ktZUiTR9YZM+UE2v X-Received: by 2002:a05:6402:1742:b0:419:2707:747a with SMTP id v2-20020a056402174200b004192707747amr13249220edx.238.1648214639518; Fri, 25 Mar 2022 06:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648214639; cv=none; d=google.com; s=arc-20160816; b=qJcvFoAgEQT50Q6kp8dcyonJxpoDJAhwhsK+HvGazpSbSjMRXRjGVofkYOkANLJTnU +wa2ZG06msqm5VUVTkRqlC1xQewkqbr/7iNpQ/3IH3Ke/WXlkeqymJK1RVD22ZkZxFup KFCy6p39I4M0KH3aQmduGKTFc862pHc3G8lReTFeLMo2H83M9Z4zubYgDSaf12kCM+2/ UzNtY+XbOwG+CPfpuAEqhoiHN4TtdjwmFvexFxTj4sdpsr9LEmsjepPbQiwQhIy5hSkB hHkQoZ9ial2IHs4cpCgXdfM1RQU+ne8sbfXGpborWugZ8zytF+4UfMgxAvmS4VTV8S2V OrFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=wmx0FHH2Kf1tY5WMqZLoCRhFUkYFOSQQKxBKVNEr5uw=; b=qHQNwzM7xtfqsCbq9GC1qWNI06VJ8Tq49MGYd8+5X1jSBSImzQYfuLzIacm72nKSke ixeAIAIEcX/hQwa2IsyhnVPJj2gN/vE/Z3YfLUnuwDxGEf1hSP4SPi6ySyryiFIsGSQ1 eET66WN0GqOHDsSamsR3Bt6kpsvGG3gAzV1YYGkQVWmEXafmCpuuFmCPXdxVpEoXd9p7 zSkrgZYwGJIgLVaeRc/mAjJGh6YNILv4uI28tuZmGtY9c9GU80zGg7wu3dDXn0jHLxsI a6YMiDHIuHNWxKoJjVGU6O+DrdxGT9igBp2mi8rSy6g9wvBAYE0aaYQ++6YFAPdWjzCD MOWA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a170906c31200b006df76385f03si2470190ejz.931.2022.03.25.06.23.42; Fri, 25 Mar 2022 06:23:59 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356722AbiCYJXX (ORCPT + 70 others); Fri, 25 Mar 2022 05:23:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345014AbiCYJXX (ORCPT ); Fri, 25 Mar 2022 05:23:23 -0400 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8234::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A99BCF49F; Fri, 25 Mar 2022 02:21:49 -0700 (PDT) Received: from ip4d144895.dynamic.kabel-deutschland.de ([77.20.72.149] helo=[192.168.66.200]); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1nXg8U-00023m-32; Fri, 25 Mar 2022 10:21:34 +0100 Message-ID: Date: Fri, 25 Mar 2022 10:21:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [REGRESSION] Recent swiotlb DMA_FROM_DEVICE fixes break ath9k-based AP Content-Language: en-US To: Oleksandr Natalenko , Robin Murphy , Christoph Hellwig , Maxime Bizon , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgense?= =?UTF-8?Q?n?= 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 References: <1812355.tdWV9SEqCh@natalenko.name> <871qyr9t4e.fsf@toke.dk> <4699073.GXAFRqVoOG@natalenko.name> From: Thorsten Leemhuis In-Reply-To: <4699073.GXAFRqVoOG@natalenko.name> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1648200109;1a0d0afe; X-HE-SMSGID: 1nXg8U-00023m-32 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 On 25.03.22 08:12, Oleksandr Natalenko wrote: > On čtvrtek 24. března 2022 18:07:29 CET Toke Høiland-Jø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? >> >> 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 *sc, >> common->rx_bufsize, DMA_FROM_DEVICE); >> >> ret = ath9k_hw_process_rxdesc_edma(ah, rs, skb->data); >> - if (ret == -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 == -EINPROGRESS) >> return false; >> - } >> >> __skb_unlink(skb, &rx_edma->rx_fifo); >> if (ret == -EINVAL) { > > With this patch and both ddbd89deb7d3+aa6f8dcbab47 in place the AP works for me. TWIMC: If anyone needs more testers or something, I noticed two bug report in bko about this problem: https://bugzilla.kernel.org/show_bug.cgi?id=215703 https://bugzilla.kernel.org/show_bug.cgi?id=215698 I'll point both to this discussion and the patch. Ciao, Thorsten