* [PATCH v2] net: phy: micrel: add support for KSZ8795
@ 2017-01-27 7:46 Sean Nyekjaer
2017-01-27 16:11 ` David Miller
2017-01-27 18:55 ` Florian Fainelli
0 siblings, 2 replies; 5+ messages in thread
From: Sean Nyekjaer @ 2017-01-27 7:46 UTC (permalink / raw)
To: netdev; +Cc: Sean Nyekjaer, andrew
This is adds support for the PHYs in the KSZ8795 5port managed switch.
It will allow to detect the link between the switch and the soc
and uses the same read_status functions as the KSZ8873MLL switch.
Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
---
Changes in v2:
- Removed "switch" name
drivers/net/phy/micrel.c | 14 ++++++++++++++
include/linux/micrel_phy.h | 2 ++
2 files changed, 16 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index ea92d524d5a8..fab56c9350cf 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
.get_stats = kszphy_get_stats,
.suspend = genphy_suspend,
.resume = genphy_resume,
+}, {
+ .phy_id = PHY_ID_KSZ8795,
+ .phy_id_mask = MICREL_PHY_ID_MASK,
+ .name = "Micrel KSZ8795",
+ .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause),
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = kszphy_config_init,
+ .config_aneg = ksz8873mll_config_aneg,
+ .read_status = ksz8873mll_read_status,
+ .get_sset_count = kszphy_get_sset_count,
+ .get_strings = kszphy_get_strings,
+ .get_stats = kszphy_get_stats,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
} };
module_phy_driver(ksphy_driver);
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 257173e0095e..f541da68d1e7 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -35,6 +35,8 @@
#define PHY_ID_KSZ886X 0x00221430
#define PHY_ID_KSZ8863 0x00221435
+#define PHY_ID_KSZ8795 0x00221550
+
/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
#define MICREL_PHY_FXEN 0x00000002
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] net: phy: micrel: add support for KSZ8795
2017-01-27 7:46 [PATCH v2] net: phy: micrel: add support for KSZ8795 Sean Nyekjaer
@ 2017-01-27 16:11 ` David Miller
2017-01-27 18:55 ` Florian Fainelli
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2017-01-27 16:11 UTC (permalink / raw)
To: sean.nyekjaer; +Cc: netdev, andrew
From: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Date: Fri, 27 Jan 2017 08:46:23 +0100
> This is adds support for the PHYs in the KSZ8795 5port managed switch.
>
> It will allow to detect the link between the switch and the soc
> and uses the same read_status functions as the KSZ8873MLL switch.
>
> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
> ---
> Changes in v2:
> - Removed "switch" name
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net: phy: micrel: add support for KSZ8795
2017-01-27 7:46 [PATCH v2] net: phy: micrel: add support for KSZ8795 Sean Nyekjaer
2017-01-27 16:11 ` David Miller
@ 2017-01-27 18:55 ` Florian Fainelli
2017-01-27 19:52 ` Sean Nyekjær
1 sibling, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2017-01-27 18:55 UTC (permalink / raw)
To: Sean Nyekjaer, netdev; +Cc: andrew
On 01/26/2017 11:46 PM, Sean Nyekjaer wrote:
> This is adds support for the PHYs in the KSZ8795 5port managed switch.
>
> It will allow to detect the link between the switch and the soc
> and uses the same read_status functions as the KSZ8873MLL switch.
>
> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
> ---
> Changes in v2:
> - Removed "switch" name
>
> drivers/net/phy/micrel.c | 14 ++++++++++++++
> include/linux/micrel_phy.h | 2 ++
> 2 files changed, 16 insertions(+)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index ea92d524d5a8..fab56c9350cf 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
> .get_stats = kszphy_get_stats,
> .suspend = genphy_suspend,
> .resume = genphy_resume,
> +}, {
> + .phy_id = PHY_ID_KSZ8795,
> + .phy_id_mask = MICREL_PHY_ID_MASK,
> + .name = "Micrel KSZ8795",
> + .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause),
This is wrong, it should be PHY_GBIT_FEATURES or PHY_BASIC_FEATURES.
Including the Pause/AsymPause feature bits is not longer necessary, the
PHY library takes care of adding these automatically to let your MAC do
flow control auto-negotiation later on.
Please submit an incremental fix to that.
> + .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
> + .config_init = kszphy_config_init,
> + .config_aneg = ksz8873mll_config_aneg,
> + .read_status = ksz8873mll_read_status,
> + .get_sset_count = kszphy_get_sset_count,
> + .get_strings = kszphy_get_strings,
> + .get_stats = kszphy_get_stats,
> + .suspend = genphy_suspend,
> + .resume = genphy_resume,
> } };
>
> module_phy_driver(ksphy_driver);
> diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
> index 257173e0095e..f541da68d1e7 100644
> --- a/include/linux/micrel_phy.h
> +++ b/include/linux/micrel_phy.h
> @@ -35,6 +35,8 @@
> #define PHY_ID_KSZ886X 0x00221430
> #define PHY_ID_KSZ8863 0x00221435
>
> +#define PHY_ID_KSZ8795 0x00221550
> +
> /* struct phy_device dev_flags definitions */
> #define MICREL_PHY_50MHZ_CLK 0x00000001
> #define MICREL_PHY_FXEN 0x00000002
>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] net: phy: micrel: add support for KSZ8795
2017-01-27 18:55 ` Florian Fainelli
@ 2017-01-27 19:52 ` Sean Nyekjær
2017-01-27 20:19 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Sean Nyekjær @ 2017-01-27 19:52 UTC (permalink / raw)
To: Florian Fainelli, netdev; +Cc: andrew
On 2017-01-27 19:55, Florian Fainelli wrote:
> On 01/26/2017 11:46 PM, Sean Nyekjaer wrote:
>> This is adds support for the PHYs in the KSZ8795 5port managed switch.
>>
>> It will allow to detect the link between the switch and the soc
>> and uses the same read_status functions as the KSZ8873MLL switch.
>>
>> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
>> ---
>> Changes in v2:
>> - Removed "switch" name
>>
>> drivers/net/phy/micrel.c | 14 ++++++++++++++
>> include/linux/micrel_phy.h | 2 ++
>> 2 files changed, 16 insertions(+)
>>
>> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
>> index ea92d524d5a8..fab56c9350cf 100644
>> --- a/drivers/net/phy/micrel.c
>> +++ b/drivers/net/phy/micrel.c
>> @@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
>> .get_stats = kszphy_get_stats,
>> .suspend = genphy_suspend,
>> .resume = genphy_resume,
>> +}, {
>> + .phy_id = PHY_ID_KSZ8795,
>> + .phy_id_mask = MICREL_PHY_ID_MASK,
>> + .name = "Micrel KSZ8795",
>> + .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause),
> This is wrong, it should be PHY_GBIT_FEATURES or PHY_BASIC_FEATURES.
> Including the Pause/AsymPause feature bits is not longer necessary, the
> PHY library takes care of adding these automatically to let your MAC do
> flow control auto-negotiation later on.
>
> Please submit an incremental fix to that.
By this you mean a v3 or a new commit?
I'm checking with hardware now...
>
>> + .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
>> + .config_init = kszphy_config_init,
>> + .config_aneg = ksz8873mll_config_aneg,
>> + .read_status = ksz8873mll_read_status,
>> + .get_sset_count = kszphy_get_sset_count,
>> + .get_strings = kszphy_get_strings,
>> + .get_stats = kszphy_get_stats,
>> + .suspend = genphy_suspend,
>> + .resume = genphy_resume,
>> } };
>>
>> module_phy_driver(ksphy_driver);
>> diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
>> index 257173e0095e..f541da68d1e7 100644
>> --- a/include/linux/micrel_phy.h
>> +++ b/include/linux/micrel_phy.h
>> @@ -35,6 +35,8 @@
>> #define PHY_ID_KSZ886X 0x00221430
>> #define PHY_ID_KSZ8863 0x00221435
>>
>> +#define PHY_ID_KSZ8795 0x00221550
>> +
>> /* struct phy_device dev_flags definitions */
>> #define MICREL_PHY_50MHZ_CLK 0x00000001
>> #define MICREL_PHY_FXEN 0x00000002
>>
>
/Sean
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] net: phy: micrel: add support for KSZ8795
2017-01-27 19:52 ` Sean Nyekjær
@ 2017-01-27 20:19 ` Florian Fainelli
0 siblings, 0 replies; 5+ messages in thread
From: Florian Fainelli @ 2017-01-27 20:19 UTC (permalink / raw)
To: Sean Nyekjær, netdev; +Cc: andrew
On 01/27/2017 11:52 AM, Sean Nyekjær wrote:
>
>
> On 2017-01-27 19:55, Florian Fainelli wrote:
>> On 01/26/2017 11:46 PM, Sean Nyekjaer wrote:
>>> This is adds support for the PHYs in the KSZ8795 5port managed switch.
>>>
>>> It will allow to detect the link between the switch and the soc
>>> and uses the same read_status functions as the KSZ8873MLL switch.
>>>
>>> Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
>>> ---
>>> Changes in v2:
>>> - Removed "switch" name
>>>
>>> drivers/net/phy/micrel.c | 14 ++++++++++++++
>>> include/linux/micrel_phy.h | 2 ++
>>> 2 files changed, 16 insertions(+)
>>>
>>> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
>>> index ea92d524d5a8..fab56c9350cf 100644
>>> --- a/drivers/net/phy/micrel.c
>>> +++ b/drivers/net/phy/micrel.c
>>> @@ -1014,6 +1014,20 @@ static struct phy_driver ksphy_driver[] = {
>>> .get_stats = kszphy_get_stats,
>>> .suspend = genphy_suspend,
>>> .resume = genphy_resume,
>>> +}, {
>>> + .phy_id = PHY_ID_KSZ8795,
>>> + .phy_id_mask = MICREL_PHY_ID_MASK,
>>> + .name = "Micrel KSZ8795",
>>> + .features = (SUPPORTED_Pause | SUPPORTED_Asym_Pause),
>> This is wrong, it should be PHY_GBIT_FEATURES or PHY_BASIC_FEATURES.
>> Including the Pause/AsymPause feature bits is not longer necessary, the
>> PHY library takes care of adding these automatically to let your MAC do
>> flow control auto-negotiation later on.
>>
>> Please submit an incremental fix to that.
> By this you mean a v3 or a new commit?
Incremental means a new commit here, on top of this patch right here.
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-27 20:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-27 7:46 [PATCH v2] net: phy: micrel: add support for KSZ8795 Sean Nyekjaer
2017-01-27 16:11 ` David Miller
2017-01-27 18:55 ` Florian Fainelli
2017-01-27 19:52 ` Sean Nyekjær
2017-01-27 20:19 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox