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:
parent
7477cda192
commit
35d73dde80
@ -278,6 +278,8 @@ void mqnic_destroy_netdev(struct net_device *ndev);
|
|||||||
// mqnic_port.c
|
// mqnic_port.c
|
||||||
int mqnic_create_port(struct mqnic_priv *priv, struct mqnic_port **port_ptr, int index, u8 __iomem *hw_addr);
|
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);
|
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
|
// mqnic_ptp.c
|
||||||
void mqnic_register_phc(struct mqnic_dev *mdev);
|
void mqnic_register_phc(struct mqnic_dev *mdev);
|
||||||
|
@ -96,3 +96,17 @@ void mqnic_destroy_port(struct mqnic_priv *priv, struct mqnic_port **port_ptr)
|
|||||||
kfree(port);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user