diff mbox series

[net,v2,2/9] r8152: reset flow control patch when linking on for RTL8153B

Message ID 1394712342-15778-350-Taiwan-albertk@realtek.com (mailing list archive)
State Superseded
Headers show
Series r8152: serial fixes | expand

Commit Message

Hayes Wang Jan. 22, 2020, 1:41 a.m. UTC
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(+)

Comments

patchwork-bot+netdevbpf@kernel.org April 16, 2021, 10:40 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (refs/heads/master):

On Fri, 16 Apr 2021 16:04:31 +0800 you wrote:
> Support new RTL8153 and RTL8156 series.
> 
> Hayes Wang (6):
>   r8152: set inter fram gap time depending on speed
>   r8152: adjust rtl8152_check_firmware function
>   r8152: add help function to change mtu
>   r8152: support new chips
>   r8152: support PHY firmware for RTL8156 series
>   r8152: search the configuration of vendor mode
> 
> [...]

Here is the summary with links:
  - [net-next,1/6] r8152: set inter fram gap time depending on speed
    https://git.kernel.org/netdev/net-next/c/5133bcc74815
  - [net-next,2/6] r8152: adjust rtl8152_check_firmware function
    https://git.kernel.org/netdev/net-next/c/a8a7be178e81
  - [net-next,3/6] r8152: add help function to change mtu
    https://git.kernel.org/netdev/net-next/c/67ce1a806f16
  - [net-next,4/6] r8152: support new chips
    https://git.kernel.org/netdev/net-next/c/195aae321c82
  - [net-next,5/6] r8152: support PHY firmware for RTL8156 series
    https://git.kernel.org/netdev/net-next/c/4a51b0e8a014
  - [net-next,6/6] r8152: search the configuration of vendor mode
    https://git.kernel.org/netdev/net-next/c/c2198943e33b

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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);
 }