[PATCH 3/3] net/aspeednic: start mac after ring buffers are initialized

Cédric Le Goater clg at kaod.org
Wed Jun 29 17:37:18 AEST 2016


The set_mac_control_register() routine enables MAC reception and DMAs
before the initialization of the ring buffers.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 drivers/net/aspeednic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
index cea3394728cc..d0b786ba9f39 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -1141,7 +1141,6 @@ static int aspeednic_init(struct eth_device* dev, bd_t* bis)
 	aspeednic_probe_phy(dev);
 
 	set_mac_address(dev, bis);
-	set_mac_control_register(dev);
 
 	for (i = 0; i < NUM_RX_DESC; i++) {
 		rx_ring[i].status = cpu_to_le32(RXPKT_RDY);
@@ -1166,6 +1165,7 @@ static int aspeednic_init(struct eth_device* dev, bd_t* bis)
 	OUTL(dev, ((u32) &rx_ring), RXR_BADR_REG);
 	OUTL(dev, RX_BUFF_SZ, RBSR_REG);
 
+	set_mac_control_register(dev);
 	START_MAC(dev);
 
 	tx_new = 0;
-- 
2.1.4



More information about the openbmc mailing list