mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 04:21:18 +02:00
net: dsa: introduce a .port_probe() method in struct dsa_ops
Some drivers might want to execute code for each port at probe time, as opposed to executing code just-in-time for the port selected for networking. To cater to that use case, introduce a .port_probe() callback method into the DSA switch operations which is called for each available port, at the end of dsa_port_probe(). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Tested-by: Michael Walle <michael@walle.cc>
This commit is contained in:
committed by
Ramon Fried
parent
5eee5ab916
commit
4b46e83885
@@ -57,7 +57,8 @@
|
||||
/**
|
||||
* struct dsa_ops - DSA operations
|
||||
*
|
||||
* @port_enable: Initialize a switch port for I/O.
|
||||
* @port_probe: Initialize a switch port.
|
||||
* @port_enable: Enable I/O for a port.
|
||||
* @port_disable: Disable I/O for a port.
|
||||
* @xmit: Insert the DSA tag for transmission.
|
||||
* DSA drivers receive a copy of the packet with headroom and
|
||||
@@ -69,6 +70,8 @@
|
||||
* master including any additional headers.
|
||||
*/
|
||||
struct dsa_ops {
|
||||
int (*port_probe)(struct udevice *dev, int port,
|
||||
struct phy_device *phy);
|
||||
int (*port_enable)(struct udevice *dev, int port,
|
||||
struct phy_device *phy);
|
||||
void (*port_disable)(struct udevice *dev, int port,
|
||||
|
Reference in New Issue
Block a user