UPSTREAM: net: phy: dp83867: Fix initialization of PHYCR register
authorStefan Hauser <stefan@shauser.net>
Fri, 1 Jul 2016 20:35:03 +0000 (22:35 +0200)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 31 May 2017 03:06:07 +0000 (11:06 +0800)
commit9b43f71655d0a67a4e8655c17f4b582620070b75
tree8def85042e41c5e188929e4c059582623a5bc2cd
parent6ffbbb8990ce8bc2b24264beb066e3a04a3f97b9
UPSTREAM: net: phy: dp83867: Fix initialization of PHYCR register

When initializing the PHY control register, the FIFO depth bits are
written without reading the previous register value, i.e. all other
bits are overwritten with zero. This disables automatic MDI-X
configuration, which is enabled by default. Fix initialization by doing
a read/modify/write operation.

Signed-off-by: Stefan Hauser <stefan@shauser.net>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit b291c418172f2cfbe009d81cd9a92f7a2de7c579)
Change-Id: If14021286ff6e8b770f6cfe0f4026e29414e75d8
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
drivers/net/phy/dp83867.c