Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Jakub Kicinski <kuba@kernel.org>, <davem@davemloft.net>,
<f.fainelli@gmail.com>, <hkallweit1@gmail.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v3 2/3] net: phy: dp83869: support Wake on LAN
Date: Thu, 10 Sep 2020 13:21:38 -0500 [thread overview]
Message-ID: <acb8368f-2ead-cf3e-c099-18aeeab2b3f3@ti.com> (raw)
In-Reply-To: <20200910180257.GD3354160@lunn.ch>
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
next prev parent reply other threads:[~2020-09-10 18:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 11:42 [PATCH net-next v3 0/3] DP83869 Feature additions Dan Murphy
2020-09-03 11:42 ` [PATCH net-next v3 1/3] net: dp83869: Add ability to advertise Fiber connection Dan Murphy
2020-09-05 18:17 ` Jakub Kicinski
2020-09-07 14:29 ` Andrew Lunn
2020-09-10 17:54 ` Dan Murphy
2020-09-10 18:09 ` Andrew Lunn
2020-09-03 11:42 ` [PATCH net-next v3 2/3] net: phy: dp83869: support Wake on LAN Dan Murphy
2020-09-05 18:34 ` Jakub Kicinski
2020-09-10 17:34 ` Dan Murphy
2020-09-10 18:02 ` Andrew Lunn
2020-09-10 18:21 ` Dan Murphy [this message]
2020-09-03 11:42 ` [PATCH net-next v3 3/3] net: dp83869: Add speed optimization feature Dan Murphy
2020-09-05 18:38 ` Jakub Kicinski
2020-09-08 14:07 ` Dan Murphy
2020-09-08 17:47 ` Jakub Kicinski
2020-09-10 17:34 ` Dan Murphy
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=acb8368f-2ead-cf3e-c099-18aeeab2b3f3@ti.com \
--to=dmurphy@ti.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).