lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130401222235.GB19335@electric-eye.fr.zoreil.com>
Date:	Tue, 2 Apr 2013 00:22:35 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	Hayes Wang <hayeswang@...ltek.com>
Cc:	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 5/7] r8169: add a new chip for RTL8111G

Hayes Wang <hayeswang@...ltek.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 0211836..8d41508 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
[...]
> +static void rtl8168g_2_hw_phy_config(struct rtl8169_private *tp)
> +{
> +	rtl_apply_firmware(tp);
> +
> +	rtl_writephy(tp, 0x1f, 0x0bcc);
> +	rtl_w1w0_phy(tp, 0x14, 0x0000, 0x0100);
> +	rtl_writephy(tp, 0x1f, 0x0a44);
> +	rtl_w1w0_phy(tp, 0x11, 0x00c0, 0x0000);
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	rtl_writephy(tp, 0x13, 0x8084);
> +	rtl_w1w0_phy(tp, 0x14, 0x0000, 0x6000);
> +	rtl_w1w0_phy(tp, 0x10, 0x1003, 0x0000);
> +
> +	/* Enable UC LPF tune function */
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	rtl_writephy(tp, 0x13, 0x8012);
> +	rtl_w1w0_phy(tp, 0x14, 0x8000, 0x0000);
> +
> +	rtl_writephy(tp, 0x1f, 0x0bce);
> +	rtl_writephy(tp, 0x12, 0x8860);
> +
> +	/* Channel Estimation: master */
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	rtl_writephy(tp, 0x13, 0x80f3);
> +	rtl_w1w0_phy(tp, 0x14, 0x8b00, 0x7400);
> +	rtl_writephy(tp, 0x13, 0x80f0);
> +	rtl_w1w0_phy(tp, 0x14, 0x3a00, 0xc500);
> +	rtl_writephy(tp, 0x13, 0x80ef);
> +	rtl_w1w0_phy(tp, 0x14, 0x0500, 0xfa00);
> +	rtl_writephy(tp, 0x13, 0x80f6);
> +	rtl_w1w0_phy(tp, 0x14, 0x6e00, 0x9100);
> +	rtl_writephy(tp, 0x13, 0x80ec);
> +	rtl_w1w0_phy(tp, 0x14, 0x6800, 0x9700);
> +	rtl_writephy(tp, 0x13, 0x80ed);
> +	rtl_w1w0_phy(tp, 0x14, 0x7c00, 0x8300);
> +	rtl_writephy(tp, 0x13, 0x80f2);
> +	rtl_w1w0_phy(tp, 0x14, 0xf400, 0x0b00);
> +	rtl_writephy(tp, 0x13, 0x80f4);
> +	rtl_w1w0_phy(tp, 0x14, 0x8500, 0x7a00);
> +
> +	/* Channel Estimation: slave */
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	rtl_writephy(tp, 0x13, 0x8110);
> +	rtl_w1w0_phy(tp, 0x14, 0xa800, 0x5700);
> +	rtl_writephy(tp, 0x13, 0x810f);
> +	rtl_w1w0_phy(tp, 0x14, 0x1d00, 0xe200);
> +	rtl_writephy(tp, 0x13, 0x8111);
> +	rtl_w1w0_phy(tp, 0x14, 0xf500, 0x0a00);
> +	rtl_writephy(tp, 0x13, 0x8113);
> +	rtl_w1w0_phy(tp, 0x14, 0x6100, 0x9e00);
> +	rtl_writephy(tp, 0x13, 0x8115);
> +	rtl_w1w0_phy(tp, 0x14, 0x9200, 0x6d00);
> +	rtl_writephy(tp, 0x13, 0x810e);
> +	rtl_w1w0_phy(tp, 0x14, 0x0400, 0xfb00);
> +	rtl_writephy(tp, 0x13, 0x810c);
> +	rtl_w1w0_phy(tp, 0x14, 0x7c00, 0x8300);
> +	rtl_writephy(tp, 0x13, 0x810b);
> +	rtl_w1w0_phy(tp, 0x14, 0x5a00, 0xa500);
> +
> +	/* Channel Estimation: 100 */
> +	rtl_writephy(tp, 0x1f, 0x0a43);
> +	rtl_writephy(tp, 0x13, 0x80d1);
> +	rtl_w1w0_phy(tp, 0x14, 0xff00, 0x0000);
> +	rtl_writephy(tp, 0x13, 0x80cd);
> +	rtl_w1w0_phy(tp, 0x14, 0x9e00, 0x6100);
> +	rtl_writephy(tp, 0x13, 0x80d3);
> +	rtl_w1w0_phy(tp, 0x14, 0x0e00, 0xf100);
> +	rtl_writephy(tp, 0x13, 0x80d5);
> +	rtl_w1w0_phy(tp, 0x14, 0xca00, 0x3500);
> +	rtl_writephy(tp, 0x13, 0x80d7);
> +	rtl_w1w0_phy(tp, 0x14, 0x8400, 0x7b00);
> +
> +	rtl_writephy(tp, 0x1f, 0x0000);

There is close to zero added value for this stuff in the kernel.
You may as well move it completely into the firmware.

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ