[PATCH uboot v2016.05-aspeed-openbmc 4/9] net/aspeednic: start mac after ring buffers are initialized
Cédric Le Goater
clg at kaod.org
Thu Jun 30 02:09:46 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 3f79b949194a..8b85893a4f74 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -1140,7 +1140,6 @@ static int aspeednic_init(struct eth_device* dev, bd_t* bis)
aspeednic_probe_phy(dev);
aspeednic_write_hwaddr(dev);
- set_mac_control_register(dev);
for (i = 0; i < NUM_RX_DESC; i++) {
rx_ring[i].status = cpu_to_le32(RXPKT_RDY);
@@ -1165,6 +1164,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