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] [day] [month] [year] [list]
Message-ID: <acb8368f-2ead-cf3e-c099-18aeeab2b3f3@ti.com>
Date:   Thu, 10 Sep 2020 13:21:38 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>,
        <f.fainelli@...il.com>, <hkallweit1@...il.com>,
        <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v3 2/3] net: phy: dp83869: support Wake on LAN

Andrew

On 9/10/20 1:02 PM, Andrew Lunn wrote:
>>>>    static int dp83869_config_port_mirroring(struct phy_device *phydev)
>>>>    {
>>>>    	struct dp83869_private *dp83869 = phydev->priv;
>>> Overall this code looks quite similar to dp83867, is there no way to
>>> factor this out?
>> Factor what out?  Yes the DP83867 and DP83869 are very similar in registers
>> and bitmaps.  They just differ in their feature sets.
>>
>> The WoL code was copied and pasted to the 869 and I would like to keep the
>> two files as similar as I can as it will be easier to fix and find bugs.
> It will be even easier if they shared the same code. You could create
> a library of functions, like bcm-phy-lib.c.

If I do that I would want to add in the DP83822 and the DP83811 as well 
even though the SOP and Data registers are different the code is the same.

I can just pass in the register numbers in.

That will have to be something I refactor later as it will rip up at 
least 4 TI drivers if not more.

Dan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ