summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/net/thunderx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/net/thunderx.c b/src/drivers/net/thunderx.c
index 306adc459..901ecba11 100644
--- a/src/drivers/net/thunderx.c
+++ b/src/drivers/net/thunderx.c
@@ -1146,10 +1146,17 @@ static int txnic_lmac_probe ( struct txnic_lmac *lmac ) {
* @v lmac Logical MAC
*/
static void txnic_lmac_remove ( struct txnic_lmac *lmac ) {
+ uint64_t config;
/* Sanity check */
assert ( lmac->vnic != NULL );
+ /* Disable packet receive and transmit */
+ config = readq ( lmac->regs + BGX_CMR_CONFIG );
+ config &= ~( BGX_CMR_CONFIG_DATA_PKT_TX_EN |
+ BGX_CMR_CONFIG_DATA_PKT_RX_EN );
+ writeq ( config, ( lmac->regs + BGX_CMR_CONFIG ) );
+
/* Unregister network device */
unregister_netdev ( lmac->vnic->netdev );