* [PATCH] micrel: add support for KSZ8041RNLI
@ 2013-12-09 23:20 Sergei Shtylyov
2013-12-10 13:19 ` Geert Uytterhoeven
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2013-12-09 23:20 UTC (permalink / raw)
To: netdev; +Cc: linux-sh
Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
match the documented ID of 0x0022151x (where 'x' is the revision). We have
to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
This patch is atop of DaveM's 'net-next.git' repo.
drivers/net/phy/micrel.c | 15 +++++++++++++++
include/linux/micrel_phy.h | 2 ++
2 files changed, 17 insertions(+)
Index: net-next/drivers/net/phy/micrel.c
===================================================================
--- net-next.orig/drivers/net/phy/micrel.c
+++ net-next/drivers/net/phy/micrel.c
@@ -336,6 +336,21 @@ static struct phy_driver ksphy_driver[]
.resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
+ .phy_id = PHY_ID_KSZ8041RNLI,
+ .phy_id_mask = 0x00fffff0,
+ .name = "Micrel KSZ8041RNLI",
+ .features = PHY_BASIC_FEATURES |
+ SUPPORTED_Pause | SUPPORTED_Asym_Pause,
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = kszphy_config_init,
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .ack_interrupt = kszphy_ack_interrupt,
+ .config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .driver = { .owner = THIS_MODULE,},
+}, {
.phy_id = PHY_ID_KSZ8051,
.phy_id_mask = 0x00fffff0,
.name = "Micrel KSZ8051",
Index: net-next/include/linux/micrel_phy.h
===================================================================
--- net-next.orig/include/linux/micrel_phy.h
+++ net-next/include/linux/micrel_phy.h
@@ -22,6 +22,8 @@
#define PHY_ID_KSZ8021 0x00221555
#define PHY_ID_KSZ8031 0x00221556
#define PHY_ID_KSZ8041 0x00221510
+/* undocumented */
+#define PHY_ID_KSZ8041RNLI 0x00221537
#define PHY_ID_KSZ8051 0x00221550
/* same id: ks8001 Rev. A/B, and ks8721 Rev 3. */
#define PHY_ID_KSZ8001 0x0022161A
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-09 23:20 [PATCH] micrel: add support for KSZ8041RNLI Sergei Shtylyov
@ 2013-12-10 13:19 ` Geert Uytterhoeven
2013-12-10 17:21 ` Sergei Shtylyov
2013-12-11 3:26 ` David Miller
2013-12-11 18:58 ` David Miller
2 siblings, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2013-12-10 13:19 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev@vger.kernel.org, Linux-sh list
Hi Sergei,
On Tue, Dec 10, 2013 at 12:20 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
> match the documented ID of 0x0022151x (where 'x' is the revision). We have
> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
I don't seem to get "net eth0: Receive FIFO Overflow" anymore after applying
this patch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-10 13:19 ` Geert Uytterhoeven
@ 2013-12-10 17:21 ` Sergei Shtylyov
2013-12-10 19:05 ` Geert Uytterhoeven
0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2013-12-10 17:21 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: netdev@vger.kernel.org, Linux-sh list
Hello.
On 10-12-2013 17:19, Geert Uytterhoeven wrote:
>> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
>> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
>> match the documented ID of 0x0022151x (where 'x' is the revision). We have
>> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
>> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Thanks. Though it's not the last version probably...
> I don't seem to get "net eth0: Receive FIFO Overflow" anymore after applying
> this patch.
Cool.
So you also enabled the Micrel PHY driver in .config? Asking because it's
not in 'koelsch_defconfig' or any other R-Car defconfig yet...
> Gr{oetje,eeting}s,
>
> Geert
WBR, Sergei
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-10 17:21 ` Sergei Shtylyov
@ 2013-12-10 19:05 ` Geert Uytterhoeven
0 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2013-12-10 19:05 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev@vger.kernel.org, Linux-sh list
On Tue, Dec 10, 2013 at 6:21 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
>> I don't seem to get "net eth0: Receive FIFO Overflow" anymore after
>> applying
>> this patch.
>
>
> Cool.
> So you also enabled the Micrel PHY driver in .config? Asking because it's
> not in 'koelsch_defconfig' or any other R-Car defconfig yet...
Of course, CONFIG_MICREL_PHY=y. Dmesg before and after:
-net eth0: attached phy 1 to driver Generic PHY
+net eth0: attached phy 1 to driver Micrel KSZ8041RNLI
libphy: r8a7791-ether-ff:01 - Link is Up - 100/Full
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-09 23:20 [PATCH] micrel: add support for KSZ8041RNLI Sergei Shtylyov
2013-12-10 13:19 ` Geert Uytterhoeven
@ 2013-12-11 3:26 ` David Miller
2013-12-11 15:39 ` Sergei Shtylyov
2013-12-11 18:58 ` David Miller
2 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2013-12-11 3:26 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-sh
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 10 Dec 2013 02:20:41 +0300
> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
> match the documented ID of 0x0022151x (where 'x' is the revision). We have
> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> This patch is atop of DaveM's 'net-next.git' repo.
You said something to Geert about "Though it's not the last version
probably..." are you talking about this patch needing more revisions?
If so, please make it explicit that you are posting something that is
just for feedback and not applying by using "RFC" in the subject line.
Thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-11 3:26 ` David Miller
@ 2013-12-11 15:39 ` Sergei Shtylyov
0 siblings, 0 replies; 11+ messages in thread
From: Sergei Shtylyov @ 2013-12-11 15:39 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-sh
Hello.
On 11-12-2013 7:26, David Miller wrote:
>> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
>> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
>> match the documented ID of 0x0022151x (where 'x' is the revision). We have
>> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
>> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> ---
>> This patch is atop of DaveM's 'net-next.git' repo.
> You said something to Geert about "Though it's not the last version
> probably..." are you talking about this patch needing more revisions?
Well, maybe. I half-expected some criticisms. My changelog was somewhat
tautological, and I'm not sure about the ID mask, perhaps it should be
0x00ffffff to also cover the revision field. Since the ID is totally
undocumented, I'm just not very sure how to deal with it properly.
> If so, please make it explicit that you are posting something that is
> just for feedback and not applying by using "RFC" in the subject line.
At the time of sending I intended it to be applied, if no negative
comments would have been posted.
> Thanks.
WBR, Sergei
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-09 23:20 [PATCH] micrel: add support for KSZ8041RNLI Sergei Shtylyov
2013-12-10 13:19 ` Geert Uytterhoeven
2013-12-11 3:26 ` David Miller
@ 2013-12-11 18:58 ` David Miller
2013-12-11 21:28 ` Sergei Shtylyov
2 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2013-12-11 18:58 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-sh
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Tue, 10 Dec 2013 02:20:41 +0300
> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
> match the documented ID of 0x0022151x (where 'x' is the revision). We have
> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> This patch is atop of DaveM's 'net-next.git' repo.
Since this is just a simple device ID addition, I applied this to
'net', thanks.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-11 18:58 ` David Miller
@ 2013-12-11 21:28 ` Sergei Shtylyov
2013-12-11 21:11 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2013-12-11 21:28 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-sh
Hello.
On 12/11/2013 09:58 PM, David Miller wrote:
>> Renesas R-Car development boards use KSZ8041RNLI PHY which for some reason has
>> ID of 0x00221537 that is not documented for KSZ8041-family PHYs and does not
>> match the documented ID of 0x0022151x (where 'x' is the revision). We have
>> to add the new #define PHY_ID_* and new ksphy_driver[] entry, almost the same
>> as KSZ8041 one, differing only in the 'phy_id' and 'name' fields.
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> ---
>> This patch is atop of DaveM's 'net-next.git' repo.
> Since this is just a simple device ID addition, I applied this to
> 'net', thanks.
Hm, thanks, of course. But I don't see much difference w/my 'sh_eth'
driver patch adding support for R8A7791 which you've queued for 3.14. Oh,
well, not that it matters much...
WBR, Sergei
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-11 21:28 ` Sergei Shtylyov
@ 2013-12-11 21:11 ` David Miller
2013-12-11 23:02 ` Sergei Shtylyov
0 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2013-12-11 21:11 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-sh
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Thu, 12 Dec 2013 00:28:47 +0300
> Hm, thanks, of course. But I don't see much difference w/my 'sh_eth'
> driver patch adding support for R8A7791 which you've queued for
> 3.14. Oh, well, not that it matters much...
Sorry about that, want me to put it into 'net' too?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-11 21:11 ` David Miller
@ 2013-12-11 23:02 ` Sergei Shtylyov
2013-12-11 22:10 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2013-12-11 23:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-sh
Hello.
On 12/12/2013 12:11 AM, David Miller wrote:
>> Hm, thanks, of course. But I don't see much difference w/my 'sh_eth'
>> driver patch adding support for R8A7791 which you've queued for
>> 3.14. Oh, well, not that it matters much...
> Sorry about that, want me to put it into 'net' too?
Well, the R8A7791 Ether platform support should appear only in 3.14, so
don't bother. I just wanted to understand the principle you follow...
WBR, Sergei
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] micrel: add support for KSZ8041RNLI
2013-12-11 23:02 ` Sergei Shtylyov
@ 2013-12-11 22:10 ` David Miller
0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2013-12-11 22:10 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, linux-sh
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Thu, 12 Dec 2013 02:02:16 +0300
> Well, the R8A7791 Ether platform support should appear only in 3.14,
> so don't bother. I just wanted to understand the principle you
> follow...
Generally speaking, if the change to support a new device is simply
a matter of adding a new device ID I tend to queue it up for 'net'.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2013-12-11 23:02 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-09 23:20 [PATCH] micrel: add support for KSZ8041RNLI Sergei Shtylyov
2013-12-10 13:19 ` Geert Uytterhoeven
2013-12-10 17:21 ` Sergei Shtylyov
2013-12-10 19:05 ` Geert Uytterhoeven
2013-12-11 3:26 ` David Miller
2013-12-11 15:39 ` Sergei Shtylyov
2013-12-11 18:58 ` David Miller
2013-12-11 21:28 ` Sergei Shtylyov
2013-12-11 21:11 ` David Miller
2013-12-11 23:02 ` Sergei Shtylyov
2013-12-11 22:10 ` David Miller
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).