From 2dd547b84ddfe6f99bfecb89154bcef569f505cb Mon Sep 17 00:00:00 2001 From: Wei-Chung Wen Date: Mon, 21 Aug 2017 15:31:28 +0800 Subject: [PATCH] aspeedinc: fix how duplex is chosen for BCM54612 According to BCM54612's datasheet, bit 7 of register #11 with shadow value 01000 indicates current duplex mode. If bit 7 is 0, it is full-duplex mode; otherwise half-duplex mode. The old code misinterpreted this bit, and this commit fixes this. Change-Id: I2fdb469cdf72ad3efaa4b2976f8cbb43ec935655 Signed-off-by: Wei-Chung Wen --- drivers/net/aspeednic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c index 3f79adbdca0d..fb2d7c2bce13 100644 --- a/drivers/net/aspeednic.c +++ b/drivers/net/aspeednic.c @@ -1546,9 +1546,9 @@ static void set_mac_control_register (struct eth_device* dev) } } if (PHY_Duplex) { - MAC_CR_Register |= FULLDUP_bit; - } else { MAC_CR_Register &= ~FULLDUP_bit; + } else { + MAC_CR_Register |= FULLDUP_bit; } } else { printf("Unknow Chip_ID %x\n",Chip_ID);