net: phy: Remove TI DP83822 from DP83848 driver
Subsystems (3)
PATCH v3 1/3 net: phy: Remove TI DP83822 from DP83848 driver
Removing the DP83822 device from the DP83848 to support the TI DP83822 dedicated driver that will initially support WoL settings.
---
v3 - No changes made
v2 - There was no v1 on this patch this is new.
drivers/net/phy/dp83848.c | 3 --- 1 file changed, 3 deletions(-)
drivers/net/phy/dp83848.c +0 -3
@@ -20,7 +20,6 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 -#define TI_DP83822_PHY_ID 0x2000a240/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */
@@ -80,7 +79,6 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, - { TI_DP83822_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);
@@ -110,7 +108,6 @@ static struct phy_driver dp83848_driver[] = {DP83848_PHY_DRIVER (NS_DP83848C_PHY_ID ,"NS DP83848C 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TI_DP83620_PHY_ID ,"TI DP83620 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ), -DP83848_PHY_DRIVER (TI_DP83822_PHY_ID ,"TI DP83822 10/100 Mbps PHY" ), };module_phy_driver (dp83848_driver);
Signature · 1 line
2.14.0
PATCH v3 2/3 net: phy: DP83822 initial driver submission
Add support for the TI DP83822 10/100Mbit ethernet phy.
The DP83822 provides flexibility to connect to a MAC through a standard MII, RMII or RGMII interface.
Datasheet:
http://www.ti.com/product/DP83822I/datasheet
---
v3 - Fixed WoL indication bit and removed mutex for suspend/resume -
https://www.mail-archive.com/[email protected]/msg191891.html and
https://www.mail-archive.com/[email protected]/msg191665.html
v2 - Updated per comments. Removed unnessary parantheis, called genphy_suspend/ resume routines and then performing WoL changes, reworked sopass storage and reduced the number of phy reads, and moved WOL_SECURE_ON -
https://www.mail-archive.com/[email protected]/msg191392.html
drivers/net/phy/Kconfig | 5 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dp83822.c | 302 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 308 insertions(+) create mode 100644 drivers/net/phy/dp83822.c
drivers/net/phy/Kconfig +5 -0
@@ -277,6 +277,11 @@ config DAVICOM_PHY ---help--- Currently supports dm9161e and dm9131 +config DP83822_PHY + tristate "Texas Instruments DP83822 PHY" + ---help--- + Supports the DP83822 PHY. + config DP83848_PHY tristate "Texas Instruments DP83848 PHY" ---help---
drivers/net/phy/Makefile +1 -0
@@ -55,6 +55,7 @@ obj-$(CONFIG_CICADA_PHY) += cicada.o 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_DP83848_PHY) += dp83848.o obj-$(CONFIG_DP83867_PHY) += dp83867.o obj-$(CONFIG_FIXED_PHY) += fixed_phy.o
drivers/net/phy/dp83822.c new file +302 -0
302 lines not on this page · raw message
Signature · 1 line
2.14.0
PATCH v3 3/3 net: phy: Change error to EINVAL for invalid MAC
In reply to Dan MurphyChange the return error code to EINVAL if the MAC
address is not valid in the set_wol function.
---
v3 - No changes made
v2 - There was no v1 on this patch this is new.
drivers/net/phy/at803x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/at803x.c +1 -1
@@ -167,7 +167,7 @@ static int at803x_set_wol(struct phy_device *phydev, mac = (const u8 *) ndev->dev_addr;if (!is_valid_ether_addr (mac)) -return -EFAULT ; +return -EINVAL ;for (i =0 ; i <3 ; i++) { phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,
Signature · 1 line
2.14.0
RE: [PATCH v3 2/3] net: phy: DP83822 initial driver submission
In reply to Dan MurphyQuoted 4 lines
Subject: [PATCH v3 2/3] net: phy: DP83822 initial driver submission
Add support for the TI DP83822 10/100Mbit ethernet phy.
Quoted 8 lines
The DP83822 provides flexibility to connect to a MAC through a standard MII, RMII or RGMII interface.
Datasheet:
http://www.ti.com/product/DP83822I/datasheetSigned-off-by Dan Murphy <[email protected]>---
Quoted 3 lines · Dan Murphy
Removing the DP83822 device from the DP83848 to support the TI DP83822 dedicated driver that will initially support WoL settings.
Hi Dan,
The ordering of patch 1 and 2 may have to be reversed, otherwise you are leaving people with the Generic PHY driver matching the DP83822 PHY after applying patch 1, and without proper interrupt management again unless they apply patch 2.
It may even be better to combine patch 1 and 2 actually to have a cleaner transition.
Sorry for noticing this so late in the series...
Quoted 39 lines
Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes made
v2 - There was no v1 on this patch this is new.drivers/net/phy/dp83848.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/phy/dp83848.c +0
-3@@ -20,7 +20,6 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 -#define TI_DP83822_PHY_ID 0x2000a240/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */ @@ -80,7 +79,6 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, - { TI_DP83822_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);@@ -110,7 +108,6 @@ static struct phy_driver dp83848_driver[] = {DP83848_PHY_DRIVER (NS_DP83848C_PHY_ID ,"NS DP83848C 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TI_DP83620_PHY_ID ,"TI DP83620 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ), -DP83848_PHY_DRIVER (TI_DP83822_PHY_ID ,"TI DP83822 10/100 Mbps PHY" ), };module_phy_driver (dp83848_driver);
Signature · 1 line
Florian
Florian
Quoted 6 lines · Florian Fainelli
Quoted 3 lines · Dan Murphy
Removing the DP83822 device from the DP83848 to support the TI DP83822 dedicated driver that will initially support WoL settings.
Hi Dan,
Quoted 8 lines
The ordering of patch 1 and 2 may have to be reversed, otherwise you are leaving people with the Generic PHY driver matching the DP83822 PHY after applying patch 1, and without proper interrupt management again unless they apply patch 2.
It may even be better to combine patch 1 and 2 actually to have a cleaner transition.
No worries I will squash patch 1 and 2.
Dan
Quoted 43 lines
Sorry for noticing this so late in the series...
Quoted 39 lines
Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes made
v2 - There was no v1 on this patch this is new.drivers/net/phy/dp83848.c | 3 --- 1 file changed, 3 deletions(-)drivers/net/phy/dp83848.c +0
-3@@ -20,7 +20,6 @@#define TI_DP83620_PHY_ID 0x20005ce0#define NS_DP83848C_PHY_ID 0x20005c90#define TLK10X_PHY_ID 0x2000a210 -#define TI_DP83822_PHY_ID 0x2000a240/* Registers */ #define DP83848_MICR 0x11/* MII Interrupt Control Register */ @@ -80,7 +79,6 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = { { NS_DP83848C_PHY_ID, 0xfffffff0 }, { TI_DP83620_PHY_ID, 0xfffffff0 }, { TLK10X_PHY_ID, 0xfffffff0 }, - { TI_DP83822_PHY_ID, 0xfffffff0 }, { } };MODULE_DEVICE_TABLE (mdio, dp83848_tbl);@@ -110,7 +108,6 @@ static struct phy_driver dp83848_driver[] = {DP83848_PHY_DRIVER (NS_DP83848C_PHY_ID ,"NS DP83848C 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TI_DP83620_PHY_ID ,"TI DP83620 10/100 Mbps PHY" ),DP83848_PHY_DRIVER (TLK10X_PHY_ID ,"TI TLK10X 10/100 Mbps PHY" ), -DP83848_PHY_DRIVER (TI_DP83822_PHY_ID ,"TI DP83822 10/100 Mbps PHY" ), };module_phy_driver (dp83848_driver);
Signature · 2 lines
------------------ Dan Murphy
Re: [PATCH v3 3/3] net: phy: Change error to EINVAL for invalid MAC
In reply to Dan MurphyQuoted 2 lines · Dan Murphy
Change the return error code to EINVAL if the MAC
address is not valid in theset_wolfunction.
Looks fine to me, since you are respining, do you mind using "net: phy:
at803x: Change error to EINVAL for invalid MAC" as a subject to further specify what this is about?
Thanks!
Quoted 24 lines
Signed-off-by Dan Murphy <[email protected]>---
v3 - No changes made
v2 - There was no v1 on this patch this is new.drivers/net/phy/at803x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/phy/at803x.c +1
-1@@ -167,7 +167,7 @@ static int at803x_set_wol(struct phy_device *phydev, mac = (const u8 *) ndev->dev_addr;if (!is_valid_ether_addr (mac)) -return -EFAULT ; +return -EINVAL ;for (i =0 ; i <3 ; i++) { phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,
Signature · 1 line
Florian