summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/fman/mac.h
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-09-03 00:57:36 +0300
committerDavid S. Miller <davem@davemloft.net>2022-09-05 16:27:39 +0300
commitef2a8d5478b9ad653c318bdbb4f6e7f46c90f90b (patch)
tree0abc4ec937d7edd853a2ed03a32d71a5baf42cb5 /drivers/net/ethernet/freescale/fman/mac.h
parent914f8b228ede709274b8c80514b352248ec9da00 (diff)
downloadlinux-ef2a8d5478b9ad653c318bdbb4f6e7f46c90f90b.tar.xz
net: dpaa: Adjust queue depth on rate change
Instead of setting the queue depth once during probe, adjust it on the fly whenever we configure the link. This is a bit unusal, since usually the DPAA driver calls into the FMAN driver, but here we do the opposite. We need to add a netdev to struct mac_device for this, but it will soon live in the phylink config. I haven't tested this extensively, but it doesn't seem to break anything. We could possibly optimize this a bit by keeping track of the last rate, but for now we just update every time. 10GEC probably doesn't need to call into this at all, but I've added it for consistency. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Acked-by: Camelia Groza <camelia.groza@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/mac.h')
-rw-r--r--drivers/net/ethernet/freescale/fman/mac.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fman/mac.h b/drivers/net/ethernet/freescale/fman/mac.h
index a55efcb7998c..b95d384271bd 100644
--- a/drivers/net/ethernet/freescale/fman/mac.h
+++ b/drivers/net/ethernet/freescale/fman/mac.h
@@ -28,6 +28,7 @@ struct mac_device {
struct phy_device *phy_dev;
phy_interface_t phy_if;
struct device_node *phy_node;
+ struct net_device *net_dev;
bool autoneg_pause;
bool rx_pause_req;
@@ -56,6 +57,8 @@ struct mac_device {
int (*remove_hash_mac_addr)(struct fman_mac *mac_dev,
enet_addr_t *eth_addr);
+ void (*update_speed)(struct mac_device *mac_dev, int speed);
+
struct fman_mac *fman_mac;
struct mac_priv_s *priv;
};