mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next 0/6] r8152: support new chips
@ 2016-06-27  5:07 Hayes Wang
  2016-06-27  5:07 ` [PATCH net-next 1/6] r8152: add aldps_enable for rtl_ops Hayes Wang
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Hayes Wang @ 2016-06-27  5:07 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, Hayes Wang

In order to support new chips, adjust some codes. Then, add the settings
for the new chips.

Hayes Wang (6):
  r8152: add aldps_enable for rtl_ops
  r8152: add u1u2_enable for rtl_ops
  r8152: add power_cut_en for rtl_ops
  r8152: support the new chip 8050
  r8152: support RTL8153B
  r8152: add byte_enable for ocp_read_word function

 drivers/net/usb/r8152.c | 621 ++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 576 insertions(+), 45 deletions(-)

-- 
2.4.11

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH net v2 2/9] r8152: reset flow control patch when linking on for RTL8153B
@ 2020-01-22  1:41 Hayes Wang
  2021-04-16  8:04 ` [PATCH net-next 0/6] r8152: support new chips Hayes Wang
  2021-04-16 22:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 26+ messages in thread
From: Hayes Wang @ 2020-01-22  1:41 UTC (permalink / raw)
  To: netdev; +Cc: nic_swsd, linux-kernel, linux-usb, pmalani, grundler, Hayes Wang

When linking ON, the patch of flow control has to be reset. This
makes sure the patch works normally.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
 drivers/net/usb/r8152.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 115559707683..504db2348a3e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2865,6 +2865,17 @@ static int rtl8153_enable(struct r8152 *tp)
 	r8153_set_rx_early_timeout(tp);
 	r8153_set_rx_early_size(tp);
 
+	if (tp->version == RTL_VER_09) {
+		u32 ocp_data;
+
+		ocp_data = ocp_read_word(tp, MCU_TYPE_USB, USB_FW_TASK);
+		ocp_data &= ~FC_PATCH_TASK;
+		ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data);
+		usleep_range(1000, 2000);
+		ocp_data |= FC_PATCH_TASK;
+		ocp_write_word(tp, MCU_TYPE_USB, USB_FW_TASK, ocp_data);
+	}
+
 	return rtl_enable(tp);
 }
 
-- 
2.21.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-04-16 22:40 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27  5:07 [PATCH net-next 0/6] r8152: support new chips Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 1/6] r8152: add aldps_enable for rtl_ops Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 2/6] r8152: add u1u2_enable " Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 3/6] r8152: add power_cut_en " Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 4/6] r8152: support the new chip 8050 Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 5/6] r8152: support RTL8153B Hayes Wang
2016-06-27  5:07 ` [PATCH net-next 6/6] r8152: add byte_enable for ocp_read_word function Hayes Wang
2016-06-27 10:57   ` Sergei Shtylyov
2016-06-28  2:45 ` [PATCH net-next v2 0/6] r8152: support new chips Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 1/6] r8152: add aldps_enable for rtl_ops Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 2/6] r8152: add u1u2_enable " Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 3/6] r8152: add power_cut_en " Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 4/6] r8152: support the new chip 8050 Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 5/6] r8152: support RTL8153B Hayes Wang
2016-06-28  2:45   ` [PATCH net-next v2 6/6] r8152: add byte_enable for ocp_read_word function Hayes Wang
2016-06-28 12:28 ` [PATCH net-next v3 0/7] r8152: support new chips Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 1/7] r8152: add aldps_enable for rtl_ops Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 2/7] r8152: add u1u2_enable " Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 3/7] r8152: add power_cut_en " Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 4/7] r8152: add u2p3_enable " Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 5/7] r8152: support the new chip 8050 Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 6/7] r8152: support RTL8153B Hayes Wang
2016-06-28 12:28   ` [PATCH net-next v3 7/7] r8152: add byte_enable for ocp_read_word function Hayes Wang
2016-06-29  3:34   ` [PATCH net-next v3 0/7] r8152: support new chips Hayes Wang
2020-01-22  1:41 [PATCH net v2 2/9] r8152: reset flow control patch when linking on for RTL8153B Hayes Wang
2021-04-16  8:04 ` [PATCH net-next 0/6] r8152: support new chips Hayes Wang
2021-04-16 22:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®