1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-30 08:32:52 +08:00

Add port activate and deactivate methods

This commit is contained in:
Alex Forencich 2019-08-19 18:25:13 -07:00
parent 7477cda192
commit 35d73dde80
2 changed files with 16 additions and 0 deletions

View File

@ -278,6 +278,8 @@ void mqnic_destroy_netdev(struct net_device *ndev);
// mqnic_port.c
int mqnic_create_port(struct mqnic_priv *priv, struct mqnic_port **port_ptr, int index, u8 __iomem *hw_addr);
void mqnic_destroy_port(struct mqnic_priv *priv, struct mqnic_port **port_ptr);
int mqnic_activate_port(struct mqnic_priv *priv, struct mqnic_port *port);
void mqnic_deactivate_port(struct mqnic_priv *priv, struct mqnic_port *port);
// mqnic_ptp.c
void mqnic_register_phc(struct mqnic_dev *mdev);

View File

@ -96,3 +96,17 @@ void mqnic_destroy_port(struct mqnic_priv *priv, struct mqnic_port **port_ptr)
kfree(port);
}
int mqnic_activate_port(struct mqnic_priv *priv, struct mqnic_port *port)
{
// enable schedulers
iowrite32(0xffffffff, port->hw_addr+MQNIC_PORT_REG_SCHED_ENABLE);
return 0;
}
void mqnic_deactivate_port(struct mqnic_priv *priv, struct mqnic_port *port)
{
// disable schedulers
iowrite32(0, port->hw_addr+MQNIC_PORT_REG_SCHED_ENABLE);
}