Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2242149rdb; Mon, 20 Nov 2023 06:09:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMyCys+toek3DNwVtnea10fC2srAZI2jGdcbyEPZSJ/4T4G/u0xMqLeWUGCbmsIGcq3PMq X-Received: by 2002:a05:6808:1b1f:b0:3b6:d108:1ff3 with SMTP id bx31-20020a0568081b1f00b003b6d1081ff3mr9886834oib.2.1700489379132; Mon, 20 Nov 2023 06:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700489379; cv=none; d=google.com; s=arc-20160816; b=NNCT5qK8CgIiT5madfQ9fKQovq1LzxyAq0Em95JVKKXmZWX2HD/XN9x63ibxB3H2Z+ MuT+UITeRHsJSeLsR90GES/UJylup8iuSxUqYHi+ev8jpdL3Hys9H8XnaQ9jh93Awznv kb1T/ZKvJ1AyWo/vm8ZJWtFDuAX0y7wH3QdVKJLe8aHaCNmeWy9dYRadSLFouctifAyJ BhK5FpYXcQ5W9mCUreF48puQUBe9ZJNtsw2monyW0uimR760ZlUhMrXZPxc7RClPgodZ 2FuFeUldOGzRo6RU+dCBIZCD/MnrrKcM3P/rA6LLj6s5atcTqY1gbROD2B4wZK7+CukP 6iyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tUT5G9wWKDux+q/3wEibNtR/ItuQhmKh/lwb8ikN/Rg=; fh=394aakOCE5t9wEV/pdbsx8thBFL3z8M0U9ciOBITdv0=; b=lql/SXiBENLcIr9FGJH8HjztCW6loHxgonddk5gfkBAWKvSsU2hHwbQiuzyeVJMxyy GRRNA7J2MxeWogzayE4m3ZAFbd88bq2F8Shytnhij4jdNr0hB2O/uB0XgfsEbEiPkYhU 5a5dQteUejD/Ubtk8bkrcxC18+yvqV8MrLchCKSExDTjXpRJvEYpDgyOh27waEM+GE7v L2wfV7mFTuc2OrOf37uzKWgVA2kmO2NkqK8WUgdNqZjalrvEZ2pflEPdgD9xMyrv/HWp 0jhoh4VN/aLsN04RDLXN3pA+ptzckj152nUtp+pNRHIHswx6uH9m4aGDBlg0MJdZyM4J lCGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=as6b0PaR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id x21-20020a056808145500b003ae526c3daesi3071220oiv.9.2023.11.20.06.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:09:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=as6b0PaR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E863780407F2; Mon, 20 Nov 2023 06:09:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232984AbjKTOJ1 (ORCPT + 54 others); Mon, 20 Nov 2023 09:09:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232259AbjKTOJ0 (ORCPT ); Mon, 20 Nov 2023 09:09:26 -0500 Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A95ACA for ; Mon, 20 Nov 2023 06:09:22 -0800 (PST) Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2c876e44157so22299881fa.2 for ; Mon, 20 Nov 2023 06:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700489360; x=1701094160; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tUT5G9wWKDux+q/3wEibNtR/ItuQhmKh/lwb8ikN/Rg=; b=as6b0PaRvP3yHBollblKs+tz7joLu75qq4EQo3nBJAcwjGZ6XirOvH7A8XavQHKPkX tWETe7HHKojaJacbQrEwOk8qovZbOkuPFM1wxa/3Sn3bHdRtpZIHyMs69z8QOKHMdh9V peeokx7CMuaLoi+3ma0uouS6fwuUxt/7y+kFI81mFTPsTVDDb7SP2H3+0Q6K2/Q6/V6a QNzOBRDQN64E4yTBlpOJybe+Dl59fxvZs9yX3kjLVUUULgUaNwCQ6Ce2PD/0fY3DQvq+ 7wtQRZdSJSAKo9RnWdH7Yg95SpzTNcAwAtV/Ili+MdbLroAe1VZbnhox6+3YEC6yMmGH GRNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700489360; x=1701094160; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tUT5G9wWKDux+q/3wEibNtR/ItuQhmKh/lwb8ikN/Rg=; b=wZ40rBn6VbooI9rNVjRMN4zz9877zKC/LTxSL3e/5UzBye7KiNfFfv2EMnpcmh9Nwb 9HHQAeuo0mYu6npYW8JmT8cGA36it2FBeq9Vvgh+Ijfiz5ucndfgRKfkJMORHhSqlbE8 SXboJLdWJhQatTbcNx9i2w7JDMpqq20aUdUvFUN5lgB1lzviJYWGBvJm29/snWECs5FT LvewnLYYHp8FMtgnWiIpgYSXk68AgM9VR8C//eeQJpt1XOnvSvgyMACbjSFy7c3adTL4 vvMNKGDK5xE1v/2eBGGzXpAt3fmTjtPemQmjlxTurN2XY+QZ247JFIi9lzLj57PcRDNj e0dA== X-Gm-Message-State: AOJu0YwbUsYfRurRjhcMriOY1zOud+bXLDtRJqEeAkFv0cWYO8V7w11G 3ur8/tfP2a06uwyc5w7Rjd2FtQ== X-Received: by 2002:a2e:9101:0:b0:2c5:32b:28fa with SMTP id m1-20020a2e9101000000b002c5032b28famr6563347ljg.30.1700489360533; Mon, 20 Nov 2023 06:09:20 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id p11-20020adfcc8b000000b0032d9337e7d1sm11358195wrj.11.2023.11.20.06.09.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 06:09:20 -0800 (PST) Date: Mon, 20 Nov 2023 09:09:17 -0500 From: Dan Carpenter To: Ping-Ke Shih Cc: Su Hui , "Jes.Sorensen@gmail.com" , "kvalo@kernel.org" , "linux-wireless@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: Re: [PATCH v2] wifi: rtl8xxxu: correct the error value of 'timeout' Message-ID: <4b34643f-812e-4aad-9a10-eee5bc553144@suswa.mountain> References: <20231115050123.951862-1-suhui@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 06:09:36 -0800 (PST) On Fri, Nov 17, 2023 at 02:53:52AM +0000, Ping-Ke Shih wrote: > > > > -----Original Message----- > > From: Su Hui > > Sent: Wednesday, November 15, 2023 1:01 PM > > To: Ping-Ke Shih ; Jes.Sorensen@gmail.com > > Cc: Su Hui ; kvalo@kernel.org; linux-wireless@vger.kernel.org; > > linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org > > Subject: [PATCH v2] wifi: rtl8xxxu: correct the error value of 'timeout' > > > > When 'rtl8xxxu_dma_agg_pages <= page_thresh', 'timeout' should equal to > > 'page_thresh' rather than '4'. Change the code order to fix this problem. > > > > Fixes: fd83f1227826 ("rtl8xxxu: gen1: Add module parameters to adjust DMA aggregation parameters") > > Signed-off-by: Su Hui > > --- > > Checking logic of agg_pages and agg_timeout, I think we should correct it > by below changes. So, NACK this patch. > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index 43ee7592bc6e..c9e227aed685 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -4760,7 +4760,7 @@ void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv) > page_thresh = (priv->fops->rx_agg_buf_size / 512); > if (rtl8xxxu_dma_agg_pages >= 0) { > if (rtl8xxxu_dma_agg_pages <= page_thresh) > - timeout = page_thresh; > + page_thresh = rtl8xxxu_dma_agg_pages; Yeah. That looks correct. What I suggested earlier was wrong. regards, dan carpenter