Skip to contentSkip to conversation

3.10.4-rt1 : too many arguments to function 'phy_connect'

DISCUSSION Paul Chavent 3 participants 3 messages Aug 12, 2013 – Aug 28, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi.

When i compile this version (3.10.4-rt1) for typical da850 (arm omap) config i get this error :

CC drivers/net/ethernet/ti/davinci_emac.o
drivers/net/ethernet/ti/davinci_emac.c: In function 'emac_dev_open':
drivers/net/ethernet/ti/davinci_emac.c:1604:9: error: too many arguments to function 'phy_connect'

         PHY_INTERFACE_MODE_MII);
         ^

In file included from drivers/net/ethernet/ti/davinci_emac.c:56:0:
include/linux/phy.h:522:21: note: declared here
struct phy_device * phy_connect(struct net_device *dev, const char
*bus_id,

                     ^

There are some suspect lines in the patch that add an extra argument to the phy_connect function without modifying its signature.

The compilation complete if i remove this extra arg (but the kernel don't start, i will check my config for this point).

Regards.

Paul.

PS : please CC me, i haven't subscribed to this list.

#1 lore raw
Quoted 1 line · * Paul Chavent | 2013-08-12 09:31:55 [+0200]:

Hi.

Hi Paul,

Quoted 13 lines

When i compile this version (3.10.4-rt1) for typical da850 (arm omap) config i get this error :

CC drivers/net/ethernet/ti/davinci_emac.o
drivers/net/ethernet/ti/davinci_emac.c: In function 'emac_dev_open':
drivers/net/ethernet/ti/davinci_emac.c:1604:9: error: too many arguments to function 'phy_connect'

        PHY_INTERFACE_MODE_MII);
        ^

In file included from drivers/net/ethernet/ti/davinci_emac.c:56:0:
include/linux/phy.h:522:21: note: declared here
struct phy_device * phy_connect(struct net_device *dev, const char *bus_id,

Quoted 7 lines
                    ^

There are some suspect lines in the patch that add an extra argument to the phy_connect function without modifying its signature.

The compilation complete if i remove this extra arg (but the kernel don't start, i will check my config for this point).

The series files has a bunch of cpsw patches. For the next -rt release I'm going to remove all of them as they were only required for the v3.8 release were I backported the cpsw driver. If you drop them, cpsw will compile. After quick testing I've seen that the cpsw wasn't running nice but did not crash / hang the system. That is something that should be investigated.

Quoted 3 lines

Regards.

Paul.

Sebastian

#2 lore raw
In reply to Paul Chavent
Quoted 15 lines · Paul Chavent

Hi.

When i compile this version (3.10.4-rt1) for typical da850 (arm omap) config i get this error :

CC drivers/net/ethernet/ti/davinci_emac.o
drivers/net/ethernet/ti/davinci_emac.c: In function 'emac_dev_open':
drivers/net/ethernet/ti/davinci_emac.c:1604:9: error: too many arguments to function 'phy_connect'

          PHY_INTERFACE_MODE_MII);
          ^

In file included from drivers/net/ethernet/ti/davinci_emac.c:56:0:
include/linux/phy.h:522:21: note: declared here
struct phy_device * phy_connect(struct net_device *dev, const char
*bus_id,

Quoted 7 lines
                      ^

There are some suspect lines in the patch that add an extra argument to the phy_connect function without modifying its signature.

The compilation complete if i remove this extra arg (but the kernel don't start, i will check my config for this point).

I just ran into a similar problem when moving the Yocto MIPS reference board from 3.8 --> 3.10. It is caused by this commit added in 3.9:

------------------------------
commit f9a8f83b04e0c362a2fc660dbad980d24af209fc
Author: Florian Fainelli <[email protected]>
Date: Mon Jan 14 00:52:52 2013 +0000

net: phy: remove flags argument from phy_{attach, connect, connect_direct}

The flags argument of the phy_{attach,connect,connect_direct} functions is then used to assign a struct phy_device dev_flags with its value. All callers but the tg3 driver pass the flag 0, .....
------------------------------

I wonder if you removed the right argument, since that is all I did for the Yocto board, and it was happy...

Paul.
--

drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c +1 -1
@@ -131,7 +131,7 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
        }
 
        ag->phy_dev = phy_connect(dev, dev_name(&phydev->dev),
-                                 &ag71xx_phy_link_adjust, 0,
+                                 &ag71xx_phy_link_adjust,
                                  pdata->phy_if_mode);
 
        if (IS_ERR(ag->phy_dev)) {