From patchwork Thu Apr 27 12:10:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hayes Wang X-Patchwork-Id: 88236 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp228715vqo; Thu, 27 Apr 2023 05:25:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4zWfvq36RVqEoDNfAK+CVV1agZ8BiAp2q9RPp8yKARUZf4cf+08LEdhPSHVhw4rwPKi1c1 X-Received: by 2002:a17:902:7208:b0:1a5:1b94:e63d with SMTP id ba8-20020a170902720800b001a51b94e63dmr1226525plb.65.1682598356172; Thu, 27 Apr 2023 05:25:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682598356; cv=none; d=google.com; s=arc-20160816; b=hh8Q762F3NqfZ/Z4erEtL9EBEYTABLYjnOnauRaXnrHKNDi/YYogYyy9oPBtL4x1tk rXJBiDlsHm8mdf6BeBREeU/ictMAyikWkJ4RSIzk71SMbfpbbAaBiHq0KMpRsSWPfciZ rIiPGYxcp5PtC/D3ipPaHpTjvD2xVgSeBSlHCrpjRGpaduNTXAd6jJ85ojLeHo25peS5 KWeJO82uPRgdwhwVv43O7RqaKFdA9tA+XkAsbjPnVWZ/k9th8FHqlsSPo+hj1tQ7Ebpl KlLIYydISh0hov9Tvhv+P80n5yEWQihgvWTpVt3ZGW+xvAZPR+klvt6Jvxic0mbSd/FM M3HQ== 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=a5y+7LdgnTo858T0ky2jj3bi9HLGRWMsot8tgEabkt4=; b=j5NeDqngIgWdr/I23kir6Pa0UH8wmiiI4KR7+VUEhxr18jB39e7OrONoNV/1DRt4QI G6SUwF8eojItikbfIkMXzH/jqE9Ca9oFgRBXmnVEvpegbfgS7GjuyczHUQw9E7RvB0dx MTf7MaTmeNqew+GEF/kPKp26zb0roXjrWyuWMl3hCB92AATLe+5beVAGBGbDvcIVzJdO oTHZRnM8Cqi8RYPM6buUBxbcfb1wXt3yhAXzRScbfFWgcief5dl9KzldAy8rVBnhqkWB XGeJyjJ/+mIGEoe+iMlhCeXjwa46ev8Gl9ayPCZh9tCtQPDzZWZpp7UkNv39PMrHgOFj qaMQ== 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 u17-20020a170903125100b00192721d6a97si10623513plh.499.2023.04.27.05.25.41; Thu, 27 Apr 2023 05:25:56 -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 S243872AbjD0MMx (ORCPT + 99 others); Thu, 27 Apr 2023 08:12:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243640AbjD0MMm (ORCPT ); Thu, 27 Apr 2023 08:12:42 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA7554C03; Thu, 27 Apr 2023 05:12:14 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 33RCBeuiE030764, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 33RCBeuiE030764 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 27 Apr 2023 20:11:40 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Thu, 27 Apr 2023 20:11:42 +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; Thu, 27 Apr 2023 20:11:41 +0800 From: Hayes Wang To: , CC: , , , , Hayes Wang Subject: [PATCH net v2 3/3] r8152: move setting r8153b_rx_agg_chg_indicate() Date: Thu, 27 Apr 2023 20:10:57 +0800 Message-ID: <20230427121057.29155-408-nic_swsd@realtek.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230427121057.29155-405-nic_swsd@realtek.com> References: <20230426122805.23301-400-nic_swsd@realtek.com> <20230427121057.29155-405-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-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?1764332253811802537?= 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 Reviewed-by: Andrew Lunn --- 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 0846ceb72162..59498aec8f16 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -3027,12 +3027,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; } @@ -3086,7 +3090,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: @@ -3120,7 +3123,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);