mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Chun-Hao Lin <hau@realtek.com>
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 06/10] r8169:change function name and behavior of function "rtl_w1w0_phy"
Date: Wed, 1 Oct 2014 00:33:37 +0200	[thread overview]
Message-ID: <20140930223337.GA27610@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1412089230-10208-6-git-send-email-hau@realtek.com>

Chun-Hao Lin <hau@realtek.com> :
> Change function name from "rtl_w1w0_phy" to "rtl_w0w1_phy".
> And its behavior from "or first then mask" to "mask first then or".

- I don't mind if its changed for a reason but the commit message doesn't
  tell why. Is it related to the overlap of the masks below ?

- rtl_w1w0_phy was supposed to abbreviate "write ones then write zeros"
  where parameters are taken in this order. You won't hit the 80 cols
  limit if you replace it with something like "rtl_set_clear_phy" (if you
  use something longer it won't fit for rtl_w1w0_eri).

[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 1bf6696..e68fe5e 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
[...]
> @@ -3575,33 +3575,33 @@ static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
>  	/* CHN EST parameters adjust - giga master */
>  	rtl_writephy(tp, 0x1f, 0x0a43);
>  	rtl_writephy(tp, 0x13, 0x809b);
> -	rtl_w1w0_phy(tp, 0x14, 0x8000, 0xf800);
> +	rtl_w0w1_phy(tp, 0x14, 0x8000, 0xf800);
>  	rtl_writephy(tp, 0x13, 0x80a2);
> -	rtl_w1w0_phy(tp, 0x14, 0x8000, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x8000, 0xff00);
>  	rtl_writephy(tp, 0x13, 0x80a4);
> -	rtl_w1w0_phy(tp, 0x14, 0x8500, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x8500, 0xff00);
>  	rtl_writephy(tp, 0x13, 0x809c);
> -	rtl_w1w0_phy(tp, 0x14, 0xbd00, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0xbd00, 0xff00);
>  	rtl_writephy(tp, 0x1f, 0x0000);
>  
>  	/* CHN EST parameters adjust - giga slave */
>  	rtl_writephy(tp, 0x1f, 0x0a43);
>  	rtl_writephy(tp, 0x13, 0x80ad);
> -	rtl_w1w0_phy(tp, 0x14, 0x7000, 0xf800);
> +	rtl_w0w1_phy(tp, 0x14, 0x7000, 0xf800);
>  	rtl_writephy(tp, 0x13, 0x80b4);
> -	rtl_w1w0_phy(tp, 0x14, 0x5000, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x5000, 0xff00);
>  	rtl_writephy(tp, 0x13, 0x80ac);
> -	rtl_w1w0_phy(tp, 0x14, 0x4000, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x4000, 0xff00);
>  	rtl_writephy(tp, 0x1f, 0x0000);
>  
>  	/* CHN EST parameters adjust - fnet */
>  	rtl_writephy(tp, 0x1f, 0x0a43);
>  	rtl_writephy(tp, 0x13, 0x808e);
> -	rtl_w1w0_phy(tp, 0x14, 0x1200, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x1200, 0xff00);
>  	rtl_writephy(tp, 0x13, 0x8090);
> -	rtl_w1w0_phy(tp, 0x14, 0xe500, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0xe500, 0xff00);
>  	rtl_writephy(tp, 0x13, 0x8092);
> -	rtl_w1w0_phy(tp, 0x14, 0x9f00, 0xff00);
> +	rtl_w0w1_phy(tp, 0x14, 0x9f00, 0xff00);
>  	rtl_writephy(tp, 0x1f, 0x0000);
>  
>  	/* enable R-tune & PGA-retune function */
> @@ -3620,57 +3620,57 @@ static void rtl8168h_1_hw_phy_config(struct rtl8169_private *tp)
>  	dout_tapbin &= 0xf000;
>  	rtl_writephy(tp, 0x1f, 0x0a43);
>  	rtl_writephy(tp, 0x13, 0x827a);
> -	rtl_w1w0_phy(tp, 0x14, dout_tapbin, 0xf000);
> +	rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000);
>  	rtl_writephy(tp, 0x13, 0x827b);
> -	rtl_w1w0_phy(tp, 0x14, dout_tapbin, 0xf000);
> +	rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000);
>  	rtl_writephy(tp, 0x13, 0x827c);
> -	rtl_w1w0_phy(tp, 0x14, dout_tapbin, 0xf000);
> +	rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000);
>  	rtl_writephy(tp, 0x13, 0x827d);
> -	rtl_w1w0_phy(tp, 0x14, dout_tapbin, 0xf000);
> +	rtl_w0w1_phy(tp, 0x14, dout_tapbin, 0xf000);
[...]

-- 
Ueimor

  reply	other threads:[~2014-09-30 22:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 15:00 [PATCH net-next 01/10] r8169:change uppercase number to lowercase nubmer Chun-Hao Lin
2014-09-30 15:00 ` [PATCH net-next 02/10] r8169:add disable/enable RTL8168G pll function Chun-Hao Lin
2014-09-30 20:43   ` David Miller
2014-09-30 15:00 ` [PATCH net-next 03/10] r8169:add disable/enable RTL8168GU mcu power managment interrupt Chun-Hao Lin
2014-09-30 15:00 ` [PATCH net-next 04/10] r8168:add support more chips to get mac address from backup mac address register Chun-Hao Lin
2014-09-30 15:00 ` [PATCH net-next 05/10] r8169:add more chips to support magic packet v2 Chun-Hao Lin
2014-09-30 15:00 ` [PATCH net-next 06/10] r8169:change function name and behavior of function "rtl_w1w0_phy" Chun-Hao Lin
2014-09-30 22:33   ` Francois Romieu [this message]
2014-09-30 15:00 ` [PATCH net-next 07/10] r8169:change function name of function "rtl_w1w0_eri" Chun-Hao Lin
2014-09-30 22:37   ` Francois Romieu
2014-09-30 15:00 ` [PATCH net-next 08/10] r8169:change function name of function "r8168dp_check_dash" to "r8168_check_dash" Chun-Hao Lin
2014-09-30 20:45   ` David Miller
2014-09-30 15:00 ` [PATCH net-next 09/10] r8169:modify the behavior of function "rtl8168_oob_notify" Chun-Hao Lin
2014-09-30 15:00 ` [PATCH net-next 10/10] r8169:call "rtl8168_driver_start" "rtl8168_driver_stop" only when dash is enabled Chun-Hao Lin
2014-09-30 20:46   ` David Miller

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=20140930223337.GA27610@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=hau@realtek.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®