* [PATCH] phylib: use MDIO_DEVS[12]
@ 2014-08-22 19:56 Sergei Shtylyov
2014-08-22 20:41 ` Florian Fainelli
2014-08-23 4:17 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2014-08-22 19:56 UTC (permalink / raw)
To: netdev, f.fainelli
The bare register numbers are used despite <uapi/linux/mdio.h> has MDIO_DEVS[12]
#define'd for those.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
---
This patch is against DaveM's 'net-next.git' repo.
drivers/net/phy/phy_device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: net-next/drivers/net/phy/phy_device.c
===================================================================
--- net-next.orig/drivers/net/phy/phy_device.c
+++ net-next/drivers/net/phy/phy_device.c
@@ -230,13 +230,13 @@ static int get_phy_c45_ids(struct mii_bu
for (i = 1;
i < num_ids && c45_ids->devices_in_package == 0;
i++) {
- reg_addr = MII_ADDR_C45 | i << 16 | 6;
+ reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS2;
phy_reg = mdiobus_read(bus, addr, reg_addr);
if (phy_reg < 0)
return -EIO;
c45_ids->devices_in_package = (phy_reg & 0xffff) << 16;
- reg_addr = MII_ADDR_C45 | i << 16 | 5;
+ reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS1;
phy_reg = mdiobus_read(bus, addr, reg_addr);
if (phy_reg < 0)
return -EIO;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phylib: use MDIO_DEVS[12]
2014-08-22 19:56 [PATCH] phylib: use MDIO_DEVS[12] Sergei Shtylyov
@ 2014-08-22 20:41 ` Florian Fainelli
2014-08-23 4:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2014-08-22 20:41 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: netdev
2014-08-22 12:56 GMT-07:00 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>:
> The bare register numbers are used despite <uapi/linux/mdio.h> has MDIO_DEVS[12]
> #define'd for those.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
>
> ---
> This patch is against DaveM's 'net-next.git' repo.
>
> drivers/net/phy/phy_device.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: net-next/drivers/net/phy/phy_device.c
> ===================================================================
> --- net-next.orig/drivers/net/phy/phy_device.c
> +++ net-next/drivers/net/phy/phy_device.c
> @@ -230,13 +230,13 @@ static int get_phy_c45_ids(struct mii_bu
> for (i = 1;
> i < num_ids && c45_ids->devices_in_package == 0;
> i++) {
> - reg_addr = MII_ADDR_C45 | i << 16 | 6;
> + reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS2;
> phy_reg = mdiobus_read(bus, addr, reg_addr);
> if (phy_reg < 0)
> return -EIO;
> c45_ids->devices_in_package = (phy_reg & 0xffff) << 16;
>
> - reg_addr = MII_ADDR_C45 | i << 16 | 5;
> + reg_addr = MII_ADDR_C45 | i << 16 | MDIO_DEVS1;
> phy_reg = mdiobus_read(bus, addr, reg_addr);
> if (phy_reg < 0)
> return -EIO;
>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phylib: use MDIO_DEVS[12]
2014-08-22 19:56 [PATCH] phylib: use MDIO_DEVS[12] Sergei Shtylyov
2014-08-22 20:41 ` Florian Fainelli
@ 2014-08-23 4:17 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-08-23 4:17 UTC (permalink / raw)
To: sergei.shtylyov; +Cc: netdev, f.fainelli
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Fri, 22 Aug 2014 23:56:47 +0400
> The bare register numbers are used despite <uapi/linux/mdio.h> has MDIO_DEVS[12]
> #define'd for those.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-23 4:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 19:56 [PATCH] phylib: use MDIO_DEVS[12] Sergei Shtylyov
2014-08-22 20:41 ` Florian Fainelli
2014-08-23 4:17 ` 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).