[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers |
Date: |
Thu, 14 Aug 2014 18:09:16 +0200 |
From: "Gabriel L. Somlo" <address@hidden>
Signed-off-by: Gabriel Somlo <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/net/e1000.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index 04c0f91..a2c4608 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -233,13 +233,30 @@ static const char phy_regcap[0x20] = {
/* PHY_ID2 documented in 8254x_GBe_SDM.pdf, pp. 250 */
static const uint16_t phy_reg_init[] = {
- [PHY_CTRL] = 0x1140,
- [PHY_STATUS] = 0x794d, /* link initially up with not completed autoneg */
- [PHY_ID1] = 0x141, /* [PHY_ID2] configured per DevId, from e1000_reset() */
- [PHY_1000T_CTRL] = 0x0e00, [M88E1000_PHY_SPEC_CTRL] =
0x360,
- [M88E1000_EXT_PHY_SPEC_CTRL] = 0x0d60, [PHY_AUTONEG_ADV] = 0xde1,
- [PHY_LP_ABILITY] = 0x1e0, [PHY_1000T_STATUS] = 0x3c00,
+ [PHY_CTRL] = MII_CR_SPEED_SELECT_MSB |
+ MII_CR_FULL_DUPLEX |
+ MII_CR_AUTO_NEG_EN,
+
+ [PHY_STATUS] = MII_SR_EXTENDED_CAPS |
+ MII_SR_LINK_STATUS | /* link initially up */
+ MII_SR_AUTONEG_CAPS |
+ /* MII_SR_AUTONEG_COMPLETE: initially NOT completed */
+ MII_SR_PREAMBLE_SUPPRESS |
+ MII_SR_EXTENDED_STATUS |
+ MII_SR_10T_HD_CAPS |
+ MII_SR_10T_FD_CAPS |
+ MII_SR_100X_HD_CAPS |
+ MII_SR_100X_FD_CAPS,
+
+ [PHY_ID1] = 0x141,
+ /* [PHY_ID2] configured per DevId, from e1000_reset() */
+ [PHY_AUTONEG_ADV] = 0xde1,
+ [PHY_LP_ABILITY] = 0x1e0,
+ [PHY_1000T_CTRL] = 0x0e00,
+ [PHY_1000T_STATUS] = 0x3c00,
+ [M88E1000_PHY_SPEC_CTRL] = 0x360,
[M88E1000_PHY_SPEC_STATUS] = 0xac00,
+ [M88E1000_EXT_PHY_SPEC_CTRL] = 0x0d60,
};
static const uint32_t mac_reg_init[] = {
--
MST
- [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE, (continued)
- [Qemu-devel] [PULL 04/12] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 05/12] pc-dimm: validate node property, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 06/12] pc-dimm: fix up error message, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 07/12] numa: show hex number in error message for consistency and prefix them with 0x, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 08/12] acpi: align RSDP, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 09/12] ivshmem: fix building when debug mode is enabled, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 03/12] hw/audio/intel-hda: Fix MSI capability address, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 10/12] e1000: correctly handle phy_ctrl reserved & self-clearing bits, Michael S. Tsirkin, 2014/08/14
- [Qemu-devel] [PULL 11/12] e1000: use symbolic constants to init phy ctrl & status registers,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 12/12] pc: Get rid of pci-info leftovers, Michael S. Tsirkin, 2014/08/14
- Re: [Qemu-devel] [PULL 00/12] post-2.1 bugfixes, Peter Maydell, 2014/08/15