Skip to content

Commit

Permalink
aspeedinc: fix how duplex is chosen for BCM54612
Browse files Browse the repository at this point in the history
According to BCM54612's datasheet, bit 7 of register openbmc#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 <[email protected]>
  • Loading branch information
Wei-Chung Wen committed Aug 31, 2017
1 parent 2c84d38 commit 2dd547b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/aspeednic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2dd547b

Please sign in to comment.