e1000: correctly handle phy_ctrl reserved & self-clearing bits
authorGabriel L. Somlo <gsomlo@gmail.com>
Wed, 6 Aug 2014 18:07:10 +0000 (14:07 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 14 Aug 2014 11:22:25 +0000 (13:22 +0200)
commit1195fed9e6790bd8fd86b0dc33e2442d70355ac6
tree2d1b042aa87ff60a5fb353082e75b2231f28e5f1
parent7f9efb6b80f3ee4545a14f17025329cc2c3c0a93
e1000: correctly handle phy_ctrl reserved & self-clearing bits

Make phyreg_writeops responsible for actually writing their
respective phy registers, rather than rely on set_mdic() to
do it on their behalf.

The only current instance of phyreg_writeops is set_phy_ctrl();
modify it to write the register on its own, while also correctly
handling reserved and self-clearing bits.

have_autoneg() does not need to check for MII_CR_RESTART_AUTO_NEG,
since the only time the flag comes into play is during set_phy_ctrl(),
and, following this patch, never actually gets written to the phy
control register.

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/e1000.c