Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp556728rdb; Thu, 30 Nov 2023 11:40:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBDPVbCvfB+QJkXw2mtMsFM7gJDf+fhBGVivZjZf1VFf0s1ToUrpmqmcJxxaTrCHSh3ODo X-Received: by 2002:a50:cd87:0:b0:548:4f67:b8c3 with SMTP id p7-20020a50cd87000000b005484f67b8c3mr29776edi.33.1701373215607; Thu, 30 Nov 2023 11:40:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701373215; cv=none; d=google.com; s=arc-20160816; b=gT92shtRN09nyk1Du9pQHm5V8kwWFlPpwhZReYaAIsOzPQLRq7nVoSiCNboo9N+q1K q/UoylL7DKomqr9oaLL6eWNwZdHXijQ/uoUfB5w3El7Ed692bz0PjaLWjgEcZZngXwqv d+gCTAygsw118G4NWBaZTVgfC/ekEqG72IWfBCtcsGEOPr/cXVHW30DMvA1DGKamVt+r ZvPVCLXWYdjPei8SX7bpcihCM0fjfmRkr/em/+Sjbbfkr/fJVHZv/CNf2RVBVeQBW4wb YpK/gDjy5xS1VIg5obfHpRM3Oi7N3VxnUIRbKjaBDaxoq569iRTD2vHMhEW8fzCCqugh cYmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-filter:from; bh=4caaXaBpAxKvdK7NlAbYTg5WtbxsJwX0ppgCfqI+89w=; fh=TZXrDkjVFrVIy9HSop/bmiUS21EBHJnsiIx/GApJAYE=; b=Ch6cwRrKknydrZfPia0f3Z6BgLCZmHcrXedDRXeH2NhWfarz81tmFXx5FTE+SUCguq F1R7QflvHiNmNZx0XZfm+td6zGGKGpv7P26xU6UrWRKubE7ifvIoBVcV6xFfuabYwUCk X6CoM1qOnuJVOg1n2wzw2jWuzijP6RvUFaDgBu/5JIj8shIMlHQ2wegna3tWtaVgLjix VOPUC49l8d6gs74AXUo0nj3BJfuWEB41aVrYWcXzrt1sef90ZcB0WC5lfHnNUGdwoHmq zyAI5+z3BekMqawaUHpsc/rjJrmyvbHMx/Rr3GduqqziCeGBlTDWata42PLgmiS8W6Wd hB4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mntre.com header.s=mntremail header.b=uQjeu4yz; spf=pass (google.com: domain of linux-wireless+bounces-258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-258-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mntre.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x22-20020a50d616000000b0054b43d735c1si872020edi.285.2023.11.30.11.40.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 11:40:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@mntre.com header.s=mntremail header.b=uQjeu4yz; spf=pass (google.com: domain of linux-wireless+bounces-258-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-258-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mntre.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 538E61F20F85 for ; Thu, 30 Nov 2023 19:40:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AB6A852F80; Thu, 30 Nov 2023 19:40:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mntre.com header.i=@mntre.com header.b="uQjeu4yz" X-Original-To: linux-wireless@vger.kernel.org X-Greylist: delayed 569 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 30 Nov 2023 11:40:08 PST Received: from softboy.mntmn.com (softboy.mntmn.com [91.250.115.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC55293; Thu, 30 Nov 2023 11:40:08 -0800 (PST) From: Lukas F. Hartmann DKIM-Filter: OpenDKIM Filter v2.11.0 softboy.mntmn.com B2C34720F02 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mntre.com; s=mntremail; t=1701372636; bh=i3XHqgENCD1BVsHIAts2MPe8L5K/nDu57j6R0DSlv1w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=uQjeu4yz5XLuWYHu0sgR04X0ZMiTT4rC+fprj0jQp5a1TmpLINaNaZfnUrTLNphpw 08BPDZawonmtUAIfa5QoIxOAG6PFvGTLT54aslQxBWUdEErSKTj9Bn8g6Yo4av9qBW aL1jgZFvO+5aipvS31Y/fMwznWc8vdebF6ofnHRme6Mrodb/KLdnNM96NNGl0IKHAT ALq2G/onS5XScsSvNXtdh+37F0V3/MhKE+cI3AOdSVBP5LxRu9CNPa7GSRMqatEIIW RymN9SDPI5hY0I85FpwFQJ4Iw5IJSc65z82RNV6kkF+lQ/cAAN7hmV+/v2/RnBuAfR jApji+lvVH6+w== To: Kalle Valo , Martin Blumenstingl Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, jernej.skrabec@gmail.com, pkshih@realtek.com, ulf.hansson@linaro.org, tony0620emma@gmail.com, Martin Blumenstingl Subject: Re: [PATCH v3] wifi: rtw88: sdio: Honor the host max_req_size in the RX path In-Reply-To: <170137159397.1963309.4329648460865757143.kvalo@kernel.org> References: <20231120115726.1569323-1-martin.blumenstingl@googlemail.com> <170137159397.1963309.4329648460865757143.kvalo@kernel.org> Date: Thu, 30 Nov 2023 20:30:33 +0100 Message-ID: <87edg7ujhi.fsf@mntre.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi Ping-Ke, Kalle, Martin, sorry for my late reply. Yes, this patch fixes my original problems and I have usable WiFi now. There are still some remaining problems like connection dropouts every minute or so, but it's unrelated and a topic of further investigation. Tested-by: Lukas F. Hartmann Best Lukas -- Lukas F. Hartmann, CEO MNT Research GmbH https://mntre.com Kalle Valo writes: > Martin Blumenstingl wrote: > >> Lukas reports skb_over_panic errors on his Banana Pi BPI-CM4 which comes >> with an Amlogic A311D (G12B) SoC and a RTL8822CS SDIO wifi/Bluetooth >> combo card. The error he observed is identical to what has been fixed >> in commit e967229ead0e ("wifi: rtw88: sdio: Check the HISR RX_REQUEST >> bit in rtw_sdio_rx_isr()") but that commit didn't fix Lukas' problem. >> >> Lukas found that disabling or limiting RX aggregation works around the >> problem for some time (but does not fully fix it). In the following >> discussion a few key topics have been discussed which have an impact on >> this problem: >> - The Amlogic A311D (G12B) SoC has a hardware bug in the SDIO controller >> which prevents DMA transfers. Instead all transfers need to go through >> the controller SRAM which limits transfers to 1536 bytes >> - rtw88 chips don't split incoming (RX) packets, so if a big packet is >> received this is forwarded to the host in it's original form >> - rtw88 chips can do RX aggregation, meaning more multiple incoming >> packets can be pulled by the host from the card with one MMC/SDIO >> transfer. This Depends on settings in the REG_RXDMA_AGG_PG_TH >> register (BIT_RXDMA_AGG_PG_TH limits the number of packets that will >> be aggregated, BIT_DMA_AGG_TO_V1 configures a timeout for aggregation >> and BIT_EN_PRE_CALC makes the chip honor the limits more effectively) >> >> Use multiple consecutive reads in rtw_sdio_read_port() and limit the >> number of bytes which are copied by the host from the card in one >> MMC/SDIO transfer. This allows receiving a buffer that's larger than >> the hosts max_req_size (number of bytes which can be transferred in >> one MMC/SDIO transfer). As a result of this the skb_over_panic error >> is gone as the rtw88 driver is now able to receive more than 1536 bytes >> from the card (either because the incoming packet is larger than that >> or because multiple packets have been aggregated). >> >> In case of an receive errors (-EILSEQ has been observed by Lukas) we >> need to drain the remaining data from the card's buffer, otherwise the >> card will return corrupt data for the next rtw_sdio_read_port() call. >> >> Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") >> Reported-by: Lukas F. Hartmann >> Closes: https://lore.kernel.org/linux-wireless/CAFBinCBaXtebixKbjkWKW_WXc5k=NdGNaGUjVE8NCPNxOhsb2g@mail.gmail.com/ >> Suggested-by: Ping-Ke Shih >> Signed-off-by: Martin Blumenstingl >> Reviewed-by: Ulf Hansson >> Acked-by: Ping-Ke Shih > > Did this fix Lukas' problem? I couldn't see any answer to Ping's > question. > > Patch set to Deferred. > > -- > https://patchwork.kernel.org/project/linux-wireless/patch/20231120115726.1569323-1-martin.blumenstingl@googlemail.com/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches >