* [PATCH 0/4] phylib: add context argument to adjust link callbacks
@ 2012-07-06 19:57 s-paulraj
2012-07-06 21:41 ` Florian Fainelli
0 siblings, 1 reply; 2+ messages in thread
From: s-paulraj @ 2012-07-06 19:57 UTC (permalink / raw)
To: netdev, davem, cyril, grant.likely, linux-keystone; +Cc: Sandeep Paulraj
From: Sandeep Paulraj <s-paulraj@ti.com>
This series of 4 patches adds a new context argument for the adjust link
callbacks. The existing phy_connect() and its variants don't have a way to
pass any private context information. This becomes necessary when, a SOC
has an on chip switch with multiple ports. We need port specific information
to figure out which port a given callback belongs to.
We can pass this context information in the phy_connect() and its
variants. This in turn gets passed into the adjust link callbacks on link
state change events.
NOTE: At this point of time patch 4 in this series passes a "NULL" to
the phy_connect() and its variants for all drivers that currently use
phy_connect() and its variants. This patch has been tested on a
Texas Instruments SOC, patches for which, as of now have not yet been
upstreamed; as a result of which this patch series does not yet
have an example of how this new feature is being actually used.
Sandeep Paulraj (4):
phylib: factor out handler callouts into helper
phylib: add context argument to adjust link callback
of/mdio: add context argument to adjust link callback
net: add context callback parameter to phy connect
drivers/net/ethernet/8390/ax88796.c | 4 ++--
drivers/net/ethernet/adi/bfin_mac.c | 4 ++--
drivers/net/ethernet/aeroflex/greth.c | 7 +++---
drivers/net/ethernet/amd/au1000_eth.c | 4 ++--
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++--
drivers/net/ethernet/broadcom/sb1250-mac.c | 6 ++---
drivers/net/ethernet/broadcom/tg3.c | 4 ++--
drivers/net/ethernet/cadence/macb.c | 4 ++--
drivers/net/ethernet/dnet.c | 6 ++---
drivers/net/ethernet/ethoc.c | 4 ++--
drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
drivers/net/ethernet/freescale/fec.c | 4 ++--
drivers/net/ethernet/freescale/fec_mpc52xx.c | 5 ++--
.../net/ethernet/freescale/fs_enet/fs_enet-main.c | 6 ++---
drivers/net/ethernet/freescale/gianfar.c | 8 +++----
drivers/net/ethernet/freescale/ucc_geth.c | 6 ++---
drivers/net/ethernet/lantiq_etop.c | 4 ++--
drivers/net/ethernet/nxp/lpc_eth.c | 5 ++--
drivers/net/ethernet/octeon/octeon_mgmt.c | 4 ++--
drivers/net/ethernet/pasemi/pasemi_mac.c | 4 ++--
drivers/net/ethernet/rdc/r6040.c | 4 ++--
drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
drivers/net/ethernet/s6gmac.c | 4 ++--
drivers/net/ethernet/smsc/smsc911x.c | 4 ++--
drivers/net/ethernet/smsc/smsc9420.c | 5 ++--
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--
drivers/net/ethernet/ti/cpmac.c | 4 ++--
drivers/net/ethernet/ti/cpsw.c | 5 ++--
drivers/net/ethernet/ti/davinci_emac.c | 4 ++--
drivers/net/ethernet/toshiba/tc35815.c | 5 ++--
drivers/net/ethernet/xilinx/ll_temac_main.c | 4 ++--
drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 ++--
drivers/net/ethernet/xscale/ixp4xx_eth.c | 4 ++--
drivers/net/phy/phy.c | 25 ++++++++++++--------
drivers/net/phy/phy_device.c | 23 +++++++++++-------
drivers/of/of_mdio.c | 24 ++++++++++++-------
include/linux/of_mdio.h | 15 ++++++------
include/linux/phy.h | 20 +++++++++-------
39 files changed, 149 insertions(+), 116 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 0/4] phylib: add context argument to adjust link callbacks
2012-07-06 19:57 [PATCH 0/4] phylib: add context argument to adjust link callbacks s-paulraj
@ 2012-07-06 21:41 ` Florian Fainelli
0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2012-07-06 21:41 UTC (permalink / raw)
To: s-paulraj; +Cc: netdev, davem, cyril, grant.likely, linux-keystone
Hello Sandeep,
Le vendredi 06 juillet 2012 21:57:33, s-paulraj@ti.com a écrit :
> From: Sandeep Paulraj <s-paulraj@ti.com>
>
> This series of 4 patches adds a new context argument for the adjust link
> callbacks. The existing phy_connect() and its variants don't have a way to
> pass any private context information. This becomes necessary when, a SOC
> has an on chip switch with multiple ports. We need port specific
> information to figure out which port a given callback belongs to.
> We can pass this context information in the phy_connect() and its
> variants. This in turn gets passed into the adjust link callbacks on link
> state change events.
Assuming that you want to use a phydev per one of your switch port, this would
mean that you register multiple phydevs within your ethernet driver. If so,
each phydev is already unique, and most likely also has an unique MDIO bus
address, this makes me wonder what is the purpose of the private pointer then?
>
> NOTE: At this point of time patch 4 in this series passes a "NULL" to
> the phy_connect() and its variants for all drivers that currently use
> phy_connect() and its variants. This patch has been tested on a
> Texas Instruments SOC, patches for which, as of now have not yet been
> upstreamed; as a result of which this patch series does not yet
> have an example of how this new feature is being actually used.
As David will probably tell you, introducing a new interface without any user
does not increase the chance of geting your patches merged ;)
>
> Sandeep Paulraj (4):
> phylib: factor out handler callouts into helper
> phylib: add context argument to adjust link callback
> of/mdio: add context argument to adjust link callback
> net: add context callback parameter to phy connect
>
> drivers/net/ethernet/8390/ax88796.c | 4 ++--
> drivers/net/ethernet/adi/bfin_mac.c | 4 ++--
> drivers/net/ethernet/aeroflex/greth.c | 7 +++---
> drivers/net/ethernet/amd/au1000_eth.c | 4 ++--
> drivers/net/ethernet/broadcom/bcm63xx_enet.c | 4 ++--
> drivers/net/ethernet/broadcom/sb1250-mac.c | 6 ++---
> drivers/net/ethernet/broadcom/tg3.c | 4 ++--
> drivers/net/ethernet/cadence/macb.c | 4 ++--
> drivers/net/ethernet/dnet.c | 6 ++---
> drivers/net/ethernet/ethoc.c | 4 ++--
> drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
> drivers/net/ethernet/freescale/fec.c | 4 ++--
> drivers/net/ethernet/freescale/fec_mpc52xx.c | 5 ++--
> .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 6 ++---
> drivers/net/ethernet/freescale/gianfar.c | 8 +++----
> drivers/net/ethernet/freescale/ucc_geth.c | 6 ++---
> drivers/net/ethernet/lantiq_etop.c | 4 ++--
> drivers/net/ethernet/nxp/lpc_eth.c | 5 ++--
> drivers/net/ethernet/octeon/octeon_mgmt.c | 4 ++--
> drivers/net/ethernet/pasemi/pasemi_mac.c | 4 ++--
> drivers/net/ethernet/rdc/r6040.c | 4 ++--
> drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
> drivers/net/ethernet/s6gmac.c | 4 ++--
> drivers/net/ethernet/smsc/smsc911x.c | 4 ++--
> drivers/net/ethernet/smsc/smsc9420.c | 5 ++--
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++--
> drivers/net/ethernet/ti/cpmac.c | 4 ++--
> drivers/net/ethernet/ti/cpsw.c | 5 ++--
> drivers/net/ethernet/ti/davinci_emac.c | 4 ++--
> drivers/net/ethernet/toshiba/tc35815.c | 5 ++--
> drivers/net/ethernet/xilinx/ll_temac_main.c | 4 ++--
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 3 ++-
> drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 ++--
> drivers/net/ethernet/xscale/ixp4xx_eth.c | 4 ++--
> drivers/net/phy/phy.c | 25
> ++++++++++++-------- drivers/net/phy/phy_device.c |
> 23 +++++++++++------- drivers/of/of_mdio.c
> | 24 ++++++++++++------- include/linux/of_mdio.h
> | 15 ++++++------ include/linux/phy.h
> | 20 +++++++++------- 39 files changed, 149 insertions(+), 116
> deletions(-)
--
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-06 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 19:57 [PATCH 0/4] phylib: add context argument to adjust link callbacks s-paulraj
2012-07-06 21:41 ` Florian Fainelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.