Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp5940902rwj; Wed, 21 Dec 2022 08:51:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtms/KhXSkgVIjhM5A5h+QmiQikZNBv7TTBO5xyh3/V2gP3y8rzDx4+WLzK5r6DSeaUqQvN X-Received: by 2002:a17:902:8688:b0:189:e7ea:9ff9 with SMTP id g8-20020a170902868800b00189e7ea9ff9mr2582847plo.42.1671641493775; Wed, 21 Dec 2022 08:51:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671641493; cv=none; d=google.com; s=arc-20160816; b=AaZgFyKFzuPEuq32sfR7r9ycFPT4KFpb0Q3xUJShw9qFc/2L+znuDG4ziszzwAg/gQ n1t9d7uJ8eRxzaufnowMmYWj8QBuY2tvPyBqppWvLf39tzD4vvj1j4pCdmlE+hf/rGFN p6W36B0I0O/Qv7OE6oCOTZ/gveg3LsZ9p6rVFRR+T0ag5liHAqkUxXDFsyekP9NnEYxz 0xpXaB2M6w6QbFQSrzGP73Y5AzIETogiQNdMo2cclPJzwIybCZZu31FMJpBgugkO3LkY C969b/XifnoqgjXKjPGApXcmyrfD6Y9KmNH/T1A14H1mdgBoCLQh4TtAarXwztiTF5Xe f/yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bvON8TqnojOQVl9NlsJCtNwn4S7xBAtXgHeXxuDAxy4=; b=0e9C0TtRrEAiXLdHUTnDDL/UsEwBhHhvSq8oedFR+HxZrbj9lFFOrIanb5JwWohk48 RFIvlOQSWLsyjbEMZ9yxPp5fHn1iU5C144p6ajvgrPy7yBf4QAvI0SSPPLZOjFkXi3d9 RmecWPsY1ZB+V8+m97W5V9aIiQ7cMPz/i9+pPvL8zw1CQmhAi/BiVyN3QkdxwXoeS3BE rpJy7Xv+iG/qRWJt0yKaCdm+PZfFSJzm0rCJAtBUyAUfyVYXBNTY2e/4xmAlFwtpzO6D XC8SZ6VkpRH48p3Z8Q3H8YeeNzq6Kbtcv2xMBZDe/o3IKhOz3RhdUYM0wgYB5yFl/Et6 395g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=og7LZpjb; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a170902c75500b001836e51050esi15380422plq.572.2022.12.21.08.51.22; Wed, 21 Dec 2022 08:51:33 -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=@gmail.com header.s=20210112 header.b=og7LZpjb; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234412AbiLUQqe (ORCPT + 66 others); Wed, 21 Dec 2022 11:46:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230336AbiLUQq3 (ORCPT ); Wed, 21 Dec 2022 11:46:29 -0500 Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4497624F29; Wed, 21 Dec 2022 08:46:27 -0800 (PST) Received: by mail-qt1-x82d.google.com with SMTP id i20so14063226qtw.9; Wed, 21 Dec 2022 08:46:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bvON8TqnojOQVl9NlsJCtNwn4S7xBAtXgHeXxuDAxy4=; b=og7LZpjbhLE3HZ7Fjfx2/cAdGFxSN+j734UTBSSSVHDAPto+GfGPUAw+Yq5v5700WB 26W3UQJz4h9cx0Ud8GczGRr8jEXYP4fvvTEkyXTh1LiM3eVSJgiB3jKzD3F+9+rhTTz3 VGg6AeobQeY4hIXBN2RaEGRYs0CBm+5LCrgvkTliIwsTrKF1uVNrUeELyMFT2CijTJQ9 5gaFziZ8QKyROMYoQsUBBaJuJY4O/cb8m6UnEyQbi185N2J9pqef1xSNMcVb2GCPeL0r ESeN6hQZVimAgSKY38LQ9KjqrWVrB/Udyv+WdtMn/L4g0qMGqJ1Dxajh4iccnhbXQ8rD +0IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bvON8TqnojOQVl9NlsJCtNwn4S7xBAtXgHeXxuDAxy4=; b=wXDI18CAzc/9aWyDppVtMgdedlwZ8s/FgZIWmIxq5QCv7B3b61O50b3EryMDpAqF1V WX3XacnSnZ43XgCQXJt/Gr2UT4ywMBHxnym5aYnttPIWvLqu9GEq/HglFfA1jR1ZScDN trzAEFqBzaBMTKVzUE3l2f6noLUSbXHeARHu/hRJtf+ZEaoLOIQMrZE1iC9auxLtePN3 eVb0p4rPPfgEfSN1gXAItcSmHt7ECcwuYH6yiLsEZoxlKeSBogt8OCA2FBNz0Ag/gv8A c9hnCNgOaiikqeoZLLR1LUd/+dzLJrFz4Xutlf20TVvqVGB/Ts7a6MpAy4tkMhkoBXDw 6ivg== X-Gm-Message-State: AFqh2kryclOiN45QOKUqskJzCe7LdxjZ+Cv9D0SyzBoN2iOAx3pefc5d 0kx10i7fkMm5HrBjvByAsJJeGHpN3hnYrR79Aiw= X-Received: by 2002:ac8:450f:0:b0:3a7:b44d:bd56 with SMTP id q15-20020ac8450f000000b003a7b44dbd56mr102676qtn.464.1671641186142; Wed, 21 Dec 2022 08:46:26 -0800 (PST) MIME-Version: 1.0 References: <678adc67-9e46-3eef-f274-c951b121570f@nbd.name> In-Reply-To: From: Mikhail Gavrilov Date: Wed, 21 Dec 2022 21:46:15 +0500 Message-ID: Subject: Re: [6.2][regression] after commit cd372b8c99c5a5cf6a464acebb7e4a79af7ec8ae stopping working wifi mt7921e To: Felix Fietkau Cc: lorenzo@kernel.org, sujuan.chen@mediatek.com, Linux List Kernel Mailing , Linux List Kernel Mailing Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 Wed, Dec 21, 2022 at 7:12 PM Felix Fietkau wrote: > > Thanks! I guess I focused on the wrong part of your kernel log > initially. After more code review, I found that there is in fact a DMA > related bug in the commit that your bisection pointed to, which happened > to uncover and trigger the deadlock fixed by my other patch. > > So here's my fix for the DMA issue: > --- [cutted] > qbuf.skip_unmap = false; > - if (mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t) < 0) { > + if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) { > dma_unmap_single(dev->dma_dev, addr, len, > DMA_FROM_DEVICE); > skb_free_frag(buf); > Sorry for stupid question. Do you have a separate branch? I see that the code is differ between master branch and the patch. For example in patch the line: - if (mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t) < 0) { replaced by the line: + if (mt76_dma_add_rx_buf(dev, q, &qbuf, buf) < 0) { But in master branch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/wireless/mediatek/mt76/dma.c?id=b6bb9676f2165d518b35ba3bea5f1fcfc0d969bf#n604 after line: qbuf.skip_unmap = false; followed the line: mt76_dma_add_buf(dev, q, &qbuf, 1, 0, buf, t); without if condition. So I'm stuck applying the patch :( -- Best Regards, Mike Gavrilov.