diff mbox

[3.8.y.z,extended,stable] Patch "r8169: check ALDPS bit and disable it if enabled for the 8168g" has been added to staging queue

Message ID 20131212063340.GC1998@linux-g7tt.site
State New
Headers show

Commit Message

David Chang Dec. 12, 2013, 6:33 a.m. UTC
Hi,

On Wed, Dec 11, 2013 at 12:09:39PM -0800, Kamal Mostafa wrote:
> This is a note to let you know that I have just added a patch titled
> 
>     r8169: check ALDPS bit and disable it if enabled for the 8168g
> 
> to the linux-3.8.y-queue branch of the 3.8.y.z extended stable tree 
> which can be found at:
> 
>  http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.8.y-queue
> 
> This patch is scheduled to be released in version 3.8.13.15.
> 
> If you, or anyone else, feels it should not be added to this tree, please 
> reply to this email.
> 
> For more information about the 3.8.y.z tree, see
> https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
> 
> Thanks.
> -Kamal
> 
> ------
> 
> From c25806cd8a5d31ef68e4316d01af1c6d2d52fa73 Mon Sep 17 00:00:00 2001
> From: David Chang <dchang@suse.com>
> Date: Wed, 27 Nov 2013 15:48:36 +0800
> Subject: r8169: check ALDPS bit and disable it if enabled for the 8168g
> 
> [ Upstream commit 1bac1072425c86f1ac85bd5967910706677ef8b3 ]
> 
> Windows driver will enable ALDPS function, but linux driver and firmware
> do not have any configuration related to ALDPS function for 8168g.
> So restart system to linux and remove the NIC cable, LAN enter ALDPS,
> then LAN RX will be disabled.
> 
> This issue can be easily reproduced on dual boot windows and linux
> system with RTL_GIGA_MAC_VER_40 chip.
> 
> Realtek said, ALDPS function can be disabled by configuring to PHY,
> switch to page 0x0A43, reg0x10 bit2=0.
> 
> Signed-off-by: David Chang <dchang@suse.com>
> Acked-by: Hayes Wang <hayeswang@realtek.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  drivers/net/ethernet/realtek/r8169.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 996318b..8add72c 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -3425,6 +3425,11 @@ static void rtl8102e_hw_phy_config(struct rtl8169_private *tp)
>  		{ 0x1f, 0x0000 }
>  	};
> 
> +	/* Check ALDPS bit, disable it if enabled */
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	if (rtl_readphy(tp, 0x10) & 0x0004)
> +		rtl_w1w0_phy(tp, 0x10, 0x0000, 0x0004);
> +

It's good to see the patch be applied into the stable tree.
But could you please refresh the patch to move the fix to end
of rtl8168g_1_hw_phy_config()?
Thank you!

David

>  	rtl_writephy(tp, 0x1f, 0x0000);
>  	rtl_patchphy(tp, 0x11, 1 << 12);
>  	rtl_patchphy(tp, 0x19, 1 << 13);
> --
> 1.8.3.2
> 
>
diff mbox

Patch

diff --git a/drivers_net_ethernet_realtek_r8169.c b/drivers_net_ethernet_realtek_r8169.c
index 996318b..ef0226a 100644
--- a/drivers_net_ethernet_realtek_r8169.c
+++ b/drivers_net_ethernet_realtek_r8169.c
@@ -3414,6 +3414,11 @@  static void rtl8168g_1_hw_phy_config(struct rtl8169_private *tp)
        rtl_w1w0_phy_ocp(tp, 0xa438, 0x8000, 0x0000);

        rtl_w1w0_phy_ocp(tp, 0xc422, 0x4000, 0x2000);
+
+       /* Check ALDPS bit, disable it if enabled */
+       rtl_writephy(tp, 0x1f, 0x0a43);
+       if (rtl_readphy(tp, 0x10) & 0x0004)
+               rtl_w1w0_phy(tp, 0x10, 0x0000, 0x0004);
 }

Regards,