From patchwork Wed Apr 26 12:28:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hayes Wang X-Patchwork-Id: 87852 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp209863vqo; Wed, 26 Apr 2023 05:41:15 -0700 (PDT) X-Google-Smtp-Source: AKy350a5rx4c/2vuU23ta99oIWRUKgbhXjzRE/M/2a2B7VRRAexhzbouUkM81MhdEgyN3DMCUDSM X-Received: by 2002:a17:903:848:b0:1a6:4200:bef4 with SMTP id ks8-20020a170903084800b001a64200bef4mr20579405plb.56.1682512875219; Wed, 26 Apr 2023 05:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682512875; cv=none; d=google.com; s=arc-20160816; b=wYqkwGTk/1oKwASDj+7yOg/rPetnea//yp8dFB5cZWblZg8EMfGzxs2rdIbOKVpivF Z87DGMWooqmKx+qOp7SmD2bfQgZeGVgPx00PfYmZNaNa2Y9KhswvWsBtrdzeR8UT6BEP hX9uk/d6/E1i7jJEZtOMjrtIKR5u3CadkQHOyDARy3+wkjBZgKiUaStaok7AbPhvtmr1 MXpcrp2c0SThfldOxHnfDnFob0MxhTc3j9FoBWinIv88U3M5R5/zGiwamEP2kcXUj7Y5 /LbgwTj5/SEMCrRiqGvyiFbps+CDA3rbuf2MVLjwI8YFV1s8p1nNRdEWmZMx6Qs5w80y 2xpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :authenticated-by; bh=PTN1Fo/sB42RRKU+r0EnlSAXjKD5wDyaGBCXkZ10o5I=; b=wDYboumPoqvztAHVuoCI9yN0sgICtVUY99xPDgDkU/LtGAirhxtQNZ3RJ/XEXUqLg4 /24YIONvjf5JeaaLv6tBYj9V9JD1SqeqzKN0QnppKheAfPVTxvDuLpEyNHy3FlI6/N6X Q0M2MmvdFpEzpJE23mfhJV6pQf0svvEJoHy/Zk9qKMepZ86vH6RiqyzB1/Zu+6gpx2mF LkDjtNKAso0Vb/t0YlP1h6QPFxo0Eja5rnKAYhwK/741qTa8HMiFBjrgZEQLLfoQiMUO ak+ELA6QxmNUgZ869UXzWG5uY6VOv0OaZGB5GX43lXyVKIqIuIEEBfURAWR+NDpXCVs8 f8hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a170902ecc700b001a656fe6c48si12894493plh.296.2023.04.26.05.40.46; Wed, 26 Apr 2023 05:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240884AbjDZM3Z (ORCPT + 99 others); Wed, 26 Apr 2023 08:29:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240887AbjDZM3T (ORCPT ); Wed, 26 Apr 2023 08:29:19 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 109995FCE; Wed, 26 Apr 2023 05:29:06 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33QCStOE2006642, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 33QCStOE2006642 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Wed, 26 Apr 2023 20:28:55 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Wed, 26 Apr 2023 20:28:57 +0800 Received: from fc34.localdomain (172.22.228.98) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Wed, 26 Apr 2023 20:28:55 +0800 From: Hayes Wang To: , CC: , , , , Hayes Wang Subject: [PATCH net 3/3] r8152: move setting r8153b_rx_agg_chg_indicate() Date: Wed, 26 Apr 2023 20:28:05 +0800 Message-ID: <20230426122805.23301-403-nic_swsd@realtek.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230426122805.23301-400-nic_swsd@realtek.com> References: <20230426122805.23301-400-nic_swsd@realtek.com> MIME-Version: 1.0 X-Originating-IP: [172.22.228.98] X-ClientProxiedBy: RTEXH36505.realtek.com.tw (172.21.6.25) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764242620627901560?= X-GMAIL-MSGID: =?utf-8?q?1764242620627901560?= Move setting r8153b_rx_agg_chg_indicate() for 2.5G devices. The r8153b_rx_agg_chg_indicate() has to be called after enabling tx/rx. Otherwise, the coalescing settings are useless. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang --- drivers/net/usb/r8152.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 3ecd4651ae29..c464da385511 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3023,12 +3023,16 @@ static int rtl_enable(struct r8152 *tp) ocp_write_byte(tp, MCU_TYPE_PLA, PLA_CR, ocp_data); switch (tp->version) { - case RTL_VER_08: - case RTL_VER_09: - case RTL_VER_14: - r8153b_rx_agg_chg_indicate(tp); + case RTL_VER_01: + case RTL_VER_02: + case RTL_VER_03: + case RTL_VER_04: + case RTL_VER_05: + case RTL_VER_06: + case RTL_VER_07: break; default: + r8153b_rx_agg_chg_indicate(tp); break; } @@ -3082,7 +3086,6 @@ static void r8153_set_rx_early_timeout(struct r8152 *tp) 640 / 8); ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EXTRA_AGGR_TMR, ocp_data); - r8153b_rx_agg_chg_indicate(tp); break; default: @@ -3116,7 +3119,6 @@ static void r8153_set_rx_early_size(struct r8152 *tp) case RTL_VER_15: ocp_write_word(tp, MCU_TYPE_USB, USB_RX_EARLY_SIZE, ocp_data / 8); - r8153b_rx_agg_chg_indicate(tp); break; default: WARN_ON_ONCE(1);