From: Hayes Wang <hayeswang@realtek.com>
To: <kuba@kernel.org>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <nic_swsd@realtek.com>,
<linux-kernel@vger.kernel.org>, <linux-usb@vger.kernel.org>,
Hayes Wang <hayeswang@realtek.com>
Subject: [PATCH net 3/3] r8152: move setting r8153b_rx_agg_chg_indicate()
Date: Wed, 26 Apr 2023 20:28:05 +0800 [thread overview]
Message-ID: <20230426122805.23301-403-nic_swsd@realtek.com> (raw)
In-Reply-To: <20230426122805.23301-400-nic_swsd@realtek.com>
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 <hayeswang@realtek.com>
---
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);
--
2.40.0
next prev parent reply other threads:[~2023-04-26 12:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 12:28 [PATCH net 0/3] r8152: fix 2.5G devices Hayes Wang
2023-04-26 12:28 ` [PATCH net 1/3] r8152: fix flow control issue of RTL8156A Hayes Wang
2023-04-27 0:21 ` Andrew Lunn
2023-04-26 12:28 ` [PATCH net 2/3] r8152: fix the poor throughput for 2.5G devices Hayes Wang
2023-04-27 0:26 ` Andrew Lunn
2023-04-26 12:28 ` Hayes Wang [this message]
2023-04-27 12:10 ` [PATCH net v2 0/3] r8152: fix " Hayes Wang
2023-04-27 12:10 ` [PATCH net v2 1/3] r8152: fix flow control issue of RTL8156A Hayes Wang
2023-04-27 12:18 ` Andrew Lunn
2023-04-27 12:10 ` [PATCH net v2 2/3] r8152: fix the poor throughput for 2.5G devices Hayes Wang
2023-04-27 12:25 ` Andrew Lunn
2023-04-27 12:10 ` [PATCH net v2 3/3] r8152: move setting r8153b_rx_agg_chg_indicate() Hayes Wang
2023-04-27 12:28 ` Andrew Lunn
2023-04-27 12:27 ` [PATCH net v2 0/3] r8152: fix 2.5G devices Andrew Lunn
2023-04-28 3:34 ` Hayes Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230426122805.23301-403-nic_swsd@realtek.com \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).