Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread David Miller
From: Dan Murphy 
Date: Fri, 11 May 2018 13:08:19 -0500

> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Applied to net-next, thank you.


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread David Miller
From: Dan Murphy 
Date: Fri, 11 May 2018 13:08:19 -0500

> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Applied to net-next, thank you.


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread David Miller
From: Andrew Lunn 
Date: Fri, 11 May 2018 21:10:11 +0200

> Humm, i thought i had given one. But i cannot find it in the mail
> archive. Going senile :-(

You aren't going senile, there is just are a huge number of patches
being submitted since net-next openned up.


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread David Miller
From: Andrew Lunn 
Date: Fri, 11 May 2018 21:10:11 +0200

> Humm, i thought i had given one. But i cannot find it in the mail
> archive. Going senile :-(

You aren't going senile, there is just are a huge number of patches
being submitted since net-next openned up.


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Florian Fainelli
On 05/11/2018 11:08 AM, Dan Murphy wrote:
> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Reviewed-by: Florian Fainelli 
-- 
Florian


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Florian Fainelli
On 05/11/2018 11:08 AM, Dan Murphy wrote:
> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Reviewed-by: Florian Fainelli 
-- 
Florian


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Andrew Lunn
On Fri, May 11, 2018 at 01:51:28PM -0500, Dan Murphy wrote:
> Andrew
> 
> On 05/11/2018 01:30 PM, Andrew Lunn wrote:
> > On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
> >> Add support for the DP83811 phy.
> >>
> >> The DP83811 supports both rgmii and sgmii interfaces.
> >> There are 2 part numbers for this the DP83TC811R does not
> >> reliably support the SGMII interface but the DP83TC811S will.
> >>
> >> There is not a way to differentiate these parts from the
> >> hardware or register set.  So this is controlled via the DT
> >> to indicate which phy mode is required.  Or the part can be
> >> strapped to a certain interface.
> >>
> >> Data sheet can be found here:
> >> http://www.ti.com/product/DP83TC811S-Q1/description
> >> http://www.ti.com/product/DP83TC811R-Q1/description
> >>
> >> Signed-off-by: Dan Murphy 
> > 
> > Hi Dan
> > 
> > It is normal to add any Reviewed-by, or Tested-by: tags you received,
> > so long as you don't make major changes.
> > 
> 
> Thanks for the reminder.
> 
> I usually add them if I get them explicitly stated in the review.

Humm, i thought i had given one. But i cannot find it in the mail
archive. Going senile :-(

Reviewed-by: Andrew Lunn 

Andrew


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Andrew Lunn
On Fri, May 11, 2018 at 01:51:28PM -0500, Dan Murphy wrote:
> Andrew
> 
> On 05/11/2018 01:30 PM, Andrew Lunn wrote:
> > On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
> >> Add support for the DP83811 phy.
> >>
> >> The DP83811 supports both rgmii and sgmii interfaces.
> >> There are 2 part numbers for this the DP83TC811R does not
> >> reliably support the SGMII interface but the DP83TC811S will.
> >>
> >> There is not a way to differentiate these parts from the
> >> hardware or register set.  So this is controlled via the DT
> >> to indicate which phy mode is required.  Or the part can be
> >> strapped to a certain interface.
> >>
> >> Data sheet can be found here:
> >> http://www.ti.com/product/DP83TC811S-Q1/description
> >> http://www.ti.com/product/DP83TC811R-Q1/description
> >>
> >> Signed-off-by: Dan Murphy 
> > 
> > Hi Dan
> > 
> > It is normal to add any Reviewed-by, or Tested-by: tags you received,
> > so long as you don't make major changes.
> > 
> 
> Thanks for the reminder.
> 
> I usually add them if I get them explicitly stated in the review.

Humm, i thought i had given one. But i cannot find it in the mail
archive. Going senile :-(

Reviewed-by: Andrew Lunn 

Andrew


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Dan Murphy
Andrew

On 05/11/2018 01:30 PM, Andrew Lunn wrote:
> On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
>> Add support for the DP83811 phy.
>>
>> The DP83811 supports both rgmii and sgmii interfaces.
>> There are 2 part numbers for this the DP83TC811R does not
>> reliably support the SGMII interface but the DP83TC811S will.
>>
>> There is not a way to differentiate these parts from the
>> hardware or register set.  So this is controlled via the DT
>> to indicate which phy mode is required.  Or the part can be
>> strapped to a certain interface.
>>
>> Data sheet can be found here:
>> http://www.ti.com/product/DP83TC811S-Q1/description
>> http://www.ti.com/product/DP83TC811R-Q1/description
>>
>> Signed-off-by: Dan Murphy 
> 
> Hi Dan
> 
> It is normal to add any Reviewed-by, or Tested-by: tags you received,
> so long as you don't make major changes.
> 

Thanks for the reminder.

I usually add them if I get them explicitly stated in the review.

I have not seen any Reviewed-by or Tested-by tags in any of the replies for the
patch.  But I may have missed it.

Dan

> Andrew
> 


-- 
--
Dan Murphy


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Dan Murphy
Andrew

On 05/11/2018 01:30 PM, Andrew Lunn wrote:
> On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
>> Add support for the DP83811 phy.
>>
>> The DP83811 supports both rgmii and sgmii interfaces.
>> There are 2 part numbers for this the DP83TC811R does not
>> reliably support the SGMII interface but the DP83TC811S will.
>>
>> There is not a way to differentiate these parts from the
>> hardware or register set.  So this is controlled via the DT
>> to indicate which phy mode is required.  Or the part can be
>> strapped to a certain interface.
>>
>> Data sheet can be found here:
>> http://www.ti.com/product/DP83TC811S-Q1/description
>> http://www.ti.com/product/DP83TC811R-Q1/description
>>
>> Signed-off-by: Dan Murphy 
> 
> Hi Dan
> 
> It is normal to add any Reviewed-by, or Tested-by: tags you received,
> so long as you don't make major changes.
> 

Thanks for the reminder.

I usually add them if I get them explicitly stated in the review.

I have not seen any Reviewed-by or Tested-by tags in any of the replies for the
patch.  But I may have missed it.

Dan

> Andrew
> 


-- 
--
Dan Murphy


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Andrew Lunn
On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Hi Dan

It is normal to add any Reviewed-by, or Tested-by: tags you received,
so long as you don't make major changes.

Andrew


Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Andrew Lunn
On Fri, May 11, 2018 at 01:08:19PM -0500, Dan Murphy wrote:
> Add support for the DP83811 phy.
> 
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
> 
> There is not a way to differentiate these parts from the
> hardware or register set.  So this is controlled via the DT
> to indicate which phy mode is required.  Or the part can be
> strapped to a certain interface.
> 
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
> 
> Signed-off-by: Dan Murphy 

Hi Dan

It is normal to add any Reviewed-by, or Tested-by: tags you received,
so long as you don't make major changes.

Andrew


[PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Dan Murphy
Add support for the DP83811 phy.

The DP83811 supports both rgmii and sgmii interfaces.
There are 2 part numbers for this the DP83TC811R does not
reliably support the SGMII interface but the DP83TC811S will.

There is not a way to differentiate these parts from the
hardware or register set.  So this is controlled via the DT
to indicate which phy mode is required.  Or the part can be
strapped to a certain interface.

Data sheet can be found here:
http://www.ti.com/product/DP83TC811S-Q1/description
http://www.ti.com/product/DP83TC811R-Q1/description

Signed-off-by: Dan Murphy 
---

v3 - Variable length alignment - https://patchwork.kernel.org/patch/10389657/

v2 - Remove extra config_init in reset, update config_init call back function
fix a checkpatch alignment issue, add SGMII check in autoneg api - 
https://patchwork.kernel.org/patch/10389323/

 drivers/net/phy/Kconfig |   5 +
 drivers/net/phy/Makefile|   1 +
 drivers/net/phy/dp83tc811.c | 347 
 3 files changed, 353 insertions(+)
 create mode 100644 drivers/net/phy/dp83tc811.c

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index bdfbabb86ee0..810140a9e114 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -285,6 +285,11 @@ config DP83822_PHY
---help---
  Supports the DP83822 PHY.
 
+config DP83TC811_PHY
+   tristate "Texas Instruments DP83TC822 PHY"
+   ---help---
+ Supports the DP83TC822 PHY.
+
 config DP83848_PHY
tristate "Texas Instruments DP83848 PHY"
---help---
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 01acbcb2c798..00445b61a9a8 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_CORTINA_PHY) += cortina.o
 obj-$(CONFIG_DAVICOM_PHY)  += davicom.o
 obj-$(CONFIG_DP83640_PHY)  += dp83640.o
 obj-$(CONFIG_DP83822_PHY)  += dp83822.o
+obj-$(CONFIG_DP83TC811_PHY)+= dp83tc811.o
 obj-$(CONFIG_DP83848_PHY)  += dp83848.o
 obj-$(CONFIG_DP83867_PHY)  += dp83867.o
 obj-$(CONFIG_FIXED_PHY)+= fixed_phy.o
diff --git a/drivers/net/phy/dp83tc811.c b/drivers/net/phy/dp83tc811.c
new file mode 100644
index ..081d99aa3985
--- /dev/null
+++ b/drivers/net/phy/dp83tc811.c
@@ -0,0 +1,347 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for the Texas Instruments DP83TC811 PHY
+ *
+ * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DP83TC811_PHY_ID   0x2000a253
+#define DP83811_DEVADDR0x1f
+
+#define MII_DP83811_SGMII_CTRL 0x09
+#define MII_DP83811_INT_STAT1  0x12
+#define MII_DP83811_INT_STAT2  0x13
+#define MII_DP83811_RESET_CTRL 0x1f
+
+#define DP83811_HW_RESET   BIT(15)
+#define DP83811_SW_RESET   BIT(14)
+
+/* INT_STAT1 bits */
+#define DP83811_RX_ERR_HF_INT_EN   BIT(0)
+#define DP83811_MS_TRAINING_INT_EN BIT(1)
+#define DP83811_ANEG_COMPLETE_INT_EN   BIT(2)
+#define DP83811_ESD_EVENT_INT_EN   BIT(3)
+#define DP83811_WOL_INT_EN BIT(4)
+#define DP83811_LINK_STAT_INT_EN   BIT(5)
+#define DP83811_ENERGY_DET_INT_EN  BIT(6)
+#define DP83811_LINK_QUAL_INT_EN   BIT(7)
+
+/* INT_STAT2 bits */
+#define DP83811_JABBER_DET_INT_EN  BIT(0)
+#define DP83811_POLARITY_INT_ENBIT(1)
+#define DP83811_SLEEP_MODE_INT_EN  BIT(2)
+#define DP83811_OVERTEMP_INT_ENBIT(3)
+#define DP83811_OVERVOLTAGE_INT_EN BIT(6)
+#define DP83811_UNDERVOLTAGE_INT_ENBIT(7)
+
+#define MII_DP83811_RXSOP1 0x04a5
+#define MII_DP83811_RXSOP2 0x04a6
+#define MII_DP83811_RXSOP3 0x04a7
+
+/* WoL Registers */
+#define MII_DP83811_WOL_CFG0x04a0
+#define MII_DP83811_WOL_STAT   0x04a1
+#define MII_DP83811_WOL_DA10x04a2
+#define MII_DP83811_WOL_DA20x04a3
+#define MII_DP83811_WOL_DA30x04a4
+
+/* WoL bits */
+#define DP83811_WOL_MAGIC_EN   BIT(0)
+#define DP83811_WOL_SECURE_ON  BIT(5)
+#define DP83811_WOL_EN BIT(7)
+#define DP83811_WOL_INDICATION_SEL BIT(8)
+#define DP83811_WOL_CLR_INDICATION BIT(11)
+
+/* SGMII CTRL bits */
+#define DP83811_TDR_AUTO   BIT(8)
+#define DP83811_SGMII_EN   BIT(12)
+#define DP83811_SGMII_AUTO_NEG_EN  BIT(13)
+#define DP83811_SGMII_TX_ERR_DIS   BIT(14)
+#define DP83811_SGMII_SOFT_RESET   BIT(15)
+
+static int dp83811_ack_interrupt(struct phy_device *phydev)
+{
+   int err;
+
+   err = phy_read(phydev, MII_DP83811_INT_STAT1);
+   if (err < 0)
+   return err;
+
+   err = phy_read(phydev, MII_DP83811_INT_STAT2);
+   if (err < 0)
+   return err;
+
+   return 0;
+}
+
+static int dp83811_set_wol(struct phy_device *phydev,
+  struct ethtool_wolinfo *wol)
+{
+   struct net_device *ndev = phydev->attached_dev;
+   const u8 *mac;
+   u16 

[PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy

2018-05-11 Thread Dan Murphy
Add support for the DP83811 phy.

The DP83811 supports both rgmii and sgmii interfaces.
There are 2 part numbers for this the DP83TC811R does not
reliably support the SGMII interface but the DP83TC811S will.

There is not a way to differentiate these parts from the
hardware or register set.  So this is controlled via the DT
to indicate which phy mode is required.  Or the part can be
strapped to a certain interface.

Data sheet can be found here:
http://www.ti.com/product/DP83TC811S-Q1/description
http://www.ti.com/product/DP83TC811R-Q1/description

Signed-off-by: Dan Murphy 
---

v3 - Variable length alignment - https://patchwork.kernel.org/patch/10389657/

v2 - Remove extra config_init in reset, update config_init call back function
fix a checkpatch alignment issue, add SGMII check in autoneg api - 
https://patchwork.kernel.org/patch/10389323/

 drivers/net/phy/Kconfig |   5 +
 drivers/net/phy/Makefile|   1 +
 drivers/net/phy/dp83tc811.c | 347 
 3 files changed, 353 insertions(+)
 create mode 100644 drivers/net/phy/dp83tc811.c

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index bdfbabb86ee0..810140a9e114 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -285,6 +285,11 @@ config DP83822_PHY
---help---
  Supports the DP83822 PHY.
 
+config DP83TC811_PHY
+   tristate "Texas Instruments DP83TC822 PHY"
+   ---help---
+ Supports the DP83TC822 PHY.
+
 config DP83848_PHY
tristate "Texas Instruments DP83848 PHY"
---help---
diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile
index 01acbcb2c798..00445b61a9a8 100644
--- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile
@@ -57,6 +57,7 @@ obj-$(CONFIG_CORTINA_PHY) += cortina.o
 obj-$(CONFIG_DAVICOM_PHY)  += davicom.o
 obj-$(CONFIG_DP83640_PHY)  += dp83640.o
 obj-$(CONFIG_DP83822_PHY)  += dp83822.o
+obj-$(CONFIG_DP83TC811_PHY)+= dp83tc811.o
 obj-$(CONFIG_DP83848_PHY)  += dp83848.o
 obj-$(CONFIG_DP83867_PHY)  += dp83867.o
 obj-$(CONFIG_FIXED_PHY)+= fixed_phy.o
diff --git a/drivers/net/phy/dp83tc811.c b/drivers/net/phy/dp83tc811.c
new file mode 100644
index ..081d99aa3985
--- /dev/null
+++ b/drivers/net/phy/dp83tc811.c
@@ -0,0 +1,347 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Driver for the Texas Instruments DP83TC811 PHY
+ *
+ * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DP83TC811_PHY_ID   0x2000a253
+#define DP83811_DEVADDR0x1f
+
+#define MII_DP83811_SGMII_CTRL 0x09
+#define MII_DP83811_INT_STAT1  0x12
+#define MII_DP83811_INT_STAT2  0x13
+#define MII_DP83811_RESET_CTRL 0x1f
+
+#define DP83811_HW_RESET   BIT(15)
+#define DP83811_SW_RESET   BIT(14)
+
+/* INT_STAT1 bits */
+#define DP83811_RX_ERR_HF_INT_EN   BIT(0)
+#define DP83811_MS_TRAINING_INT_EN BIT(1)
+#define DP83811_ANEG_COMPLETE_INT_EN   BIT(2)
+#define DP83811_ESD_EVENT_INT_EN   BIT(3)
+#define DP83811_WOL_INT_EN BIT(4)
+#define DP83811_LINK_STAT_INT_EN   BIT(5)
+#define DP83811_ENERGY_DET_INT_EN  BIT(6)
+#define DP83811_LINK_QUAL_INT_EN   BIT(7)
+
+/* INT_STAT2 bits */
+#define DP83811_JABBER_DET_INT_EN  BIT(0)
+#define DP83811_POLARITY_INT_ENBIT(1)
+#define DP83811_SLEEP_MODE_INT_EN  BIT(2)
+#define DP83811_OVERTEMP_INT_ENBIT(3)
+#define DP83811_OVERVOLTAGE_INT_EN BIT(6)
+#define DP83811_UNDERVOLTAGE_INT_ENBIT(7)
+
+#define MII_DP83811_RXSOP1 0x04a5
+#define MII_DP83811_RXSOP2 0x04a6
+#define MII_DP83811_RXSOP3 0x04a7
+
+/* WoL Registers */
+#define MII_DP83811_WOL_CFG0x04a0
+#define MII_DP83811_WOL_STAT   0x04a1
+#define MII_DP83811_WOL_DA10x04a2
+#define MII_DP83811_WOL_DA20x04a3
+#define MII_DP83811_WOL_DA30x04a4
+
+/* WoL bits */
+#define DP83811_WOL_MAGIC_EN   BIT(0)
+#define DP83811_WOL_SECURE_ON  BIT(5)
+#define DP83811_WOL_EN BIT(7)
+#define DP83811_WOL_INDICATION_SEL BIT(8)
+#define DP83811_WOL_CLR_INDICATION BIT(11)
+
+/* SGMII CTRL bits */
+#define DP83811_TDR_AUTO   BIT(8)
+#define DP83811_SGMII_EN   BIT(12)
+#define DP83811_SGMII_AUTO_NEG_EN  BIT(13)
+#define DP83811_SGMII_TX_ERR_DIS   BIT(14)
+#define DP83811_SGMII_SOFT_RESET   BIT(15)
+
+static int dp83811_ack_interrupt(struct phy_device *phydev)
+{
+   int err;
+
+   err = phy_read(phydev, MII_DP83811_INT_STAT1);
+   if (err < 0)
+   return err;
+
+   err = phy_read(phydev, MII_DP83811_INT_STAT2);
+   if (err < 0)
+   return err;
+
+   return 0;
+}
+
+static int dp83811_set_wol(struct phy_device *phydev,
+  struct ethtool_wolinfo *wol)
+{
+   struct net_device *ndev = phydev->attached_dev;
+   const u8 *mac;
+   u16 value;
+
+   if